Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven Can';我不能下载它的插件 我用的是什么 爪哇9 马文3 GitLab CI 处境_Maven_Maven 3_Gitlab Ci - Fatal编程技术网

Maven Can';我不能下载它的插件 我用的是什么 爪哇9 马文3 GitLab CI 处境

Maven Can';我不能下载它的插件 我用的是什么 爪哇9 马文3 GitLab CI 处境,maven,maven-3,gitlab-ci,Maven,Maven 3,Gitlab Ci,我一直在尝试为我的项目在GitLab上获得一个带有CI的maven构建设置。我需要用mvn clean install编译我的项目,因为我使用了多个模块 在当地,我可以按照我的要求建造罐子。当我执行mvn clean install时,它运行时没有错误 问题 对于GitLab CI,我使用docker映像maven:3-jdk-9,因为我想使用maven 3,而我使用的是java 9。带有mvn clean install的构建总是失败,因为它无法下载必要的maven插件 这里是错误 我试过的

我一直在尝试为我的项目在GitLab上获得一个带有CI的maven构建设置。我需要用mvn clean install编译我的项目,因为我使用了多个模块

在当地,我可以按照我的要求建造罐子。当我执行
mvn clean install
时,它运行时没有错误

问题 对于GitLab CI,我使用docker映像
maven:3-jdk-9
,因为我想使用maven 3,而我使用的是java 9。带有
mvn clean install
的构建总是失败,因为它无法下载必要的maven插件

这里是错误

我试过的
  • 使用
    mvn clean install-s.m2/settings.xml
    insead为中心和建筑添加带有代理的设置文件
  • .m2/settings.xml

    
    马文中心酒店
    真的
    https
    repo.maven.apache.org
    80
    
  • 使用maven clean插件:3.0.0(不确定是否正确,请检查注释)

  • 创建本地GitLab CI运行程序

  • 使用Java9Docker映像并手动安装maven

  • 笔记 如果这是一个简单的错误,请提前道歉,我对使用maven不是很有经验


    谢谢你的帮助

    @nullpointer你说的是maven 3.7.0还是maven编译器插件3.7.0?我是说maven clean插件3.0.0。@nullpointer我如何将其设置为使用该版本?通过编辑项目的pom.xml文件的
    build
    部分。@nullpointer我已将
    maven-clean-plugin3.0.0
    添加到我的构建插件中,但仍在使用同样的错误。我做得对吗?很抱歉,它不允许我格式化。@nullpointer你是说maven 3.7.0还是maven编译器插件3.7.0我是说maven clean插件3.0.0。@nullpointer我如何将其设置为使用该版本?通过编辑项目pom.xml文件的
    build
    部分。@nullpointer我已将
    maven-clean-plugin3.0.0
    添加到我的构建中但是我仍然得到同样的错误。我做得对吗?对不起,它不允许我格式化它。
    [ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): Failed to transfer file: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom. Return code is: 400 , ReasonPhrase:Bad Request.
    
    <settings>
        <proxies>
            <proxy>
                <id>maven central</id>
                <active>true</active>
                <protocol>https</protocol>
                <host>repo.maven.apache.org</host>
                <port>80</port>
            </proxy>
        </proxies>
    </settings>