我是maven的新手,经过几年的编程,主要是在Ruby和JS中,我回到了Java。
我刚刚开始使用Maven,当我运行mvn clean
时,我收到以下错误(我在OS X El-Capitan 10.11.6上运行):
[INFO] Scanning for projects...
[ERROR]
[ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.artifactId' for commons-lang:>commons-lang:jar with value '>commons-lang' does not match a valid id pattern. @ line 15, column 25 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.chen:HelloWorld:0.0.1-SNAPSHOT (/Users/chenn/Development/HelloWorld/pom.xml) has 1 error
[ERROR] 'dependencies.dependency.artifactId' for commons-lang:>commons-lang:jar with value '>commons-lang' does not match a valid id pattern. @ line 15, column 25
[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/ProjectBuildingException
POM文件:
<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/xsd/maven-4.0.0.xsd">
<groupId>com.chen</groupId>
<artifactId>HelloWorld</artifactId>
<version>0.0.1-SNAPSHOT</version>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>>commons-lang</artifactId>
<version>2.6</version>
</dependency>
</dependencies>
</project>
我一直试图找到答案,但在路上挣扎。
答案 0 :(得分:1)
<artifactId>**>**commons-lang</artifactId>
你有一个&gt;这一行太多了
答案 1 :(得分:0)
>
中的额外artifactId
会导致您遇到问题。