Maven清理失败和Maven安装失败在命令提示符中。

huangapple 未分类评论42阅读模式
英文:

Maven clean failed and Maven install failed in command prompt

问题

以下是翻译好的内容:

我正在尝试构建一个Maven项目,但每次我清理或安装项目的 pom.xml 时,我都会遇到以下错误:

Microsoft Windows [Version 10.0.17763.1131]
(c) 2018 Microsoft Corporation. 版权所有。

C:\prosenjit\projects\CSIW Trunk 2>mvn clean
[INFO] 正在扫描项目...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] 正在构建 CSIW Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
正在下载: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] 总时间: 1.479s
[INFO] 完成于: Wed Apr 08 10:12:00 IST 2020
[INFO] 最终内存: 9M/243M
[INFO] ------------------------------------------------------------------------
[ERROR] 插件 org.apache.maven.plugins:maven-clean-plugin:2.4.1 或其某个依赖项无法解析: 无法读取 org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 的构件描述符: 无法传输构件 org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 到 central (http://repo1.maven.org/maven2): 服务器返回的HTTP响应代码为: 501,URL: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom -> [Help 1]
[ERROR]
[ERROR] 要查看错误的完整堆栈跟踪,请使用 -e 开关重新运行Maven。
[ERROR] 使用 -X 开关重新运行Maven以启用完整的调试日志记录。
[ERROR]
[ERROR] 有关错误和可能的解决方案的更多信息,请阅读以下文章:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
C:\prosenjit\projects\CSIW Trunk 2>mvn install
[INFO] 正在扫描项目...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] 正在构建 CSIW Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
正在下载: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-plugin-2.4.3.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] 总时间: 1.046s
[INFO] 完成于: Wed Apr 08 10:12:47 IST 2020
[INFO] 最终内存: 9M/243M
[INFO] ------------------------------------------------------------------------
[ERROR] 插件 org.apache.maven.plugins:maven-resources-plugin:2.4.3 或其某个依赖项无法解析: 无法读取 org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3 的构件描述符: 无法传输构件 org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 到 central (http://repo1.maven.org/maven2): 服务器返回的HTTP响应代码为: 501,URL: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-plugin-2.4.3.pom -> [Help 1]
[ERROR]
[ERROR] 要查看错误的完整堆栈跟踪,请使用 -e 开关重新运行Maven。
[ERROR] 使用 -X 开关重新运行Maven以启用完整的调试日志记录。
[ERROR]
[ERROR] 有关错误和可能的解决方案的更多信息,请阅读以下文章:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

我在我的环境中使用 Jdk-8,以下是我的Maven版本:

C:\prosenjit\projects\CSIW Trunk 2>mvn -version
Apache Maven 3.0.3 (r1075438; 2011-02-28 23:01:09+0530)
Maven home: C:\prosenjit\software\project software\maven\apache-maven-3.0.3
Java version: 1.8.0_201, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_201\jre
默认区域设置: en_US, 平台编码: Cp1252
操作系统名称: "windows 10", 版本: "10.0", 架构: "amd64", 家族: "dos"

请问有人可以帮助我成功构建这个项目吗?提前感谢。

英文:

I am trying to build a Maven project but everytime I clean or install the pom.xml of the project I'm getting the bellow error:

Microsoft Windows [Version 10.0.17763.1131]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\prosenjit\projects\CSIW Trunk 2>mvn clean
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building CSIW Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.479s
[INFO] Finished at: Wed Apr 08 10:12:00 IST 2020
[INFO] Final Memory: 9M/243M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 from/to central (http://repo1.maven.org/maven2): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
C:\prosenjit\projects\CSIW Trunk 2>mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building CSIW Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-plugin-2.4.3.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.046s
[INFO] Finished at: Wed Apr 08 10:12:47 IST 2020
[INFO] Final Memory: 9M/243M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 from/to central (http://repo1.maven.org/maven2): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.3/maven-resources-plugin-2.4.3.pom -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

The pom of the project I'm using is as below:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <parent>
    <groupId>neo.sprint.com</groupId>
    <artifactId>NeoAdv</artifactId>
    <version>0.0.1-SNAPSHOT</version>
  </parent>
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.sprint.neo</groupId>
	<artifactId>CSIW</artifactId>
	<packaging>war</packaging>
	<version>0.0.1-SNAPSHOT</version>
	<name>CSIW Maven Webapp</name>
	<url>http://maven.apache.org</url>

	<properties>
		<spring.version>4.2.1.RELEASE</spring.version>
		<hibernate.version>4.2.1.Final</hibernate.version>
	</properties>
	
	<dependencies>
     <dependency>
	    <groupId>neo.sprint.com</groupId>
	    <artifactId>LoginFramework</artifactId>
	    <version>0.0.1-SNAPSHOT</version>
	</dependency>
	
	<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>3.8.1</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
			<version>${spring.version}</version>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
			<version>${spring.version}</version>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>${spring.version}</version>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
			<version>${spring.version}</version>
		</dependency>

		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
			<version>${hibernate.version}</version>
		</dependency>

		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.9</version>
		</dependency>

		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
			<version>1.2.2</version>
		</dependency>


		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>3.0.1</version>
		</dependency>


		<dependency>
			<groupId>com.sun.faces</groupId>
			<artifactId>jsf-impl</artifactId>
			<version>2.2.4</version>
		</dependency>

		<dependency>
			<groupId>com.sun.faces</groupId>
			<artifactId>jsf-api</artifactId>
			<version>2.2.4</version>
		</dependency>
		
		<dependency>
			<groupId>org.primefaces</groupId>
			<artifactId>primefaces</artifactId>
			<version>6.2</version>
		</dependency>

		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>javax.servlet.jsp-api</artifactId>
			<version>2.3.1</version>
		</dependency>
		<!-- Added for File Upload in RIM -->
		<dependency>
  			 <groupId>commons-fileupload</groupId>
  			 <artifactId>commons-fileupload</artifactId>
  			 <version>1.2.1</version> <!-- makesure correct version here -->
		</dependency>
		<dependency>
    		<groupId>org.apache.commons</groupId>
    		<artifactId>commons-io</artifactId>
    		<version>1.3.2</version>
		</dependency>
		
		<!-- https://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans -->
		<dependency>
   		 <groupId>org.apache.xmlbeans</groupId>
   		 <artifactId>xmlbeans</artifactId>
   		 <version>2.4.0</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.apache.axis/axis -->
		<dependency>
		    <groupId>org.apache.axis</groupId>
		    <artifactId>axis</artifactId>
		    <version>1.4</version>
		</dependency>
		<dependency>
    		<groupId>org.glassfish</groupId>
    		<artifactId>javax.xml.rpc</artifactId>
   			 <version>3.0.1-b19</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/commons-discovery/commons-discovery -->
		<dependency>
		    <groupId>commons-discovery</groupId>
		    <artifactId>commons-discovery</artifactId>
		    <version>0.4</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/wsdl4j/wsdl4j -->
		<dependency>
		    <groupId>wsdl4j</groupId>
		    <artifactId>wsdl4j</artifactId>
		    <version>1.6.2</version>
		</dependency>
		

		<!-- Primefaces Theme Library -->
		<!-- <dependency> <groupId>org.primefaces.themes</groupId> <artifactId>blitzer</artifactId> 
			<version>1.0.10</version> </dependency> -->
		<dependency>
			<groupId>org.primefaces.extensions</groupId>
			<artifactId>all-themes</artifactId>
			<version>1.0.8</version>
		</dependency>

		<dependency>
			<groupId>javassist</groupId>
			<artifactId>javassist</artifactId>
			<version>3.12.1.GA</version>
		</dependency>

		<dependency>
			<groupId>com.oracle</groupId>
			<artifactId>ojdbc6</artifactId>
			<version>6.0.0.0</version>
		</dependency>
		<!-- User defined jar.... installation reference CSIW\src\main\webapp\WEB-INF\doc\Maven_Local_Jar.txt -->
		<dependency>
			<groupId>Rim-FilterRules</groupId>
			<artifactId>RimFilterRules</artifactId>
			<version>1.0</version>
		</dependency>
		<dependency>
			<groupId>Rim-MergeRules</groupId>
			<artifactId>RimMergeRules</artifactId>
			<version>1.0</version>
		</dependency>
		
		<dependency>
			<groupId>Rim-Validation</groupId>
			<artifactId>RimValidation</artifactId>
			<version>1.0</version>
		</dependency>
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi-ooxml</artifactId>
			<version>3.16</version>
		</dependency>
	
		<!-- JSTL Library -->
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
			<version>1.1.2</version>
		</dependency>

		<!-- https://mvnrepository.com/artifact/net.sourceforge.jexcelapi/jxl -->
		<dependency>
		    <groupId>net.sourceforge.jexcelapi</groupId>
		    <artifactId>jxl</artifactId>
		    <version>2.6</version>
		</dependency>	
		
		<dependency>
           <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
      </dependency>
		
		 <dependency>
			<groupId>Query-Config</groupId>
			<artifactId>QueryConfig</artifactId>
			<version>1.0</version>
		</dependency>
		
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>4.2.1.RELEASE</version>
		</dependency>
		
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context-support</artifactId>
			<version>4.2.1.RELEASE</version>
		</dependency>
		
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-oxm</artifactId>
			<version>4.2.1.RELEASE</version>
		</dependency>
		
		<dependency>
		    <groupId>javax.mail</groupId>
		    <artifactId>mail</artifactId>
		    <version>1.4.7</version>
		    <scope>provided</scope>
		    <exclusions>
		        <exclusion>
		            <artifactId>activation</artifactId>
		            <groupId>javax.activation</groupId>
		        </exclusion>
		    </exclusions>
		</dependency>
		
		<dependency>
			<groupId>org.freemarker</groupId>
			<artifactId>freemarker</artifactId>
			<version>2.3.20</version>
		</dependency> 
		
		<dependency>
			<groupId>cglib</groupId>
			<artifactId>cglib</artifactId>
			<version>2.2.2</version>
		</dependency>

		<dependency>
			<groupId>DB-Query</groupId>
			<artifactId>DBQuery</artifactId>
			<version>1.0</version>
		</dependency>
		<dependency>
			<groupId>DB-Query</groupId>
			<artifactId>SqlDBQuery</artifactId>
			<version>1.0</version>
		</dependency>
		<dependency>
			<groupId>DB-Query</groupId>
			<artifactId>QueryDocApproval</artifactId>
			<version>1.0</version>
		</dependency>
		
		<!--  cxw debug - Added for Java13, on Tomcat 9 -->
		
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-core</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>javax.activation</groupId>
            <artifactId>activation</artifactId>
            <version>1.1.1</version>
        </dependency>
	
	</dependencies>
	
	<build>
	  	<plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
                <compilerArgument>-XDignore.symbol.file=true</compilerArgument>
            </configuration>
        </plugin>
        
		</plugins>
    
		<finalName>CSIW</finalName>
	</build>
</project>

I'm using Jdk-8 in my environment and below is the Maven version:

C:\prosenjit\projects\CSIW Trunk 2>mvn -version
Apache Maven 3.0.3 (r1075438; 2011-02-28 23:01:09+0530)
Maven home: C:\prosenjit\software\project software\maven\apache-maven-3.0.3
Java version: 1.8.0_201, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_201\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"

Can anyone please help to build the project successfully? Thanks in advance.

huangapple
  • 本文由 发表于 2020年4月8日 13:16:28
  • 转载请务必保留本文链接:https://java.coder-hub.com/61093774.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定