[英]Maven project compiling
i'm trying to compile maven project by running "mvn clean compile"我正在尝试通过运行“mvn clean compile”来编译 maven 项目
and i get error like this:我得到这样的错误:
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Resolving expression: '${xmlName}': Detected the following recursive expression cycle in 'xmlName': [xmlName] @
[ERROR] Resolving expression: '${xmlName}': Detected the following recursive expression cycle in 'xmlName': [xmlName] @
[ERROR] Resolving expression: '${xmlName}': Detected the following recursive expression cycle in 'xmlName': [xmlName] @
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project automation:automation:1.0-SNAPSHOT (C:\Users\Vartotojas\Desktop\Automatiniai testia\automation\pom.xml) has 3 errors
[ERROR] Resolving expression: '${xmlName}': Detected the following recursive expression cycle in 'xmlName': [xmlName] -> [Help 2]
[ERROR] Resolving expression: '${xmlName}': Detected the following recursive expression cycle in 'xmlName': [xmlName] -> [Help 2]
[ERROR] Resolving expression: '${xmlName}': Detected the following recursive expression cycle in 'xmlName': [xmlName] -> [Help 2]
[ERROR]
i have tryied to search problems in POM.XML, but i did not find anything..我已经尝试在 POM.XML 中搜索问题,但我没有找到任何东西..
maybe problem could be somewhere here in POM.XML:也许问题可能出在 POM.XML 中的某个地方:
<configuration>
<suiteXmlFiles>src/testResources/${xmlName}</suiteXmlFiles>
<argLine>-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"</argLine>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
</build>
<properties>
<xmlName>${xmlName}</xmlName>
<maven-surefire-plugin.version>2.20.1</maven-surefire-plugin.version>
On properties you must declare a value在属性上,您必须声明一个值
<properties>
<xmlName>${xmlName}</xmlName> <-------- <xmlName>SomeValueHere</xmlName>
</properties
You have passed an argument in properties which is not expected您在属性中传递了一个不期望的参数
Maven tries to pass that somewhere else probably in build phase and instead of a value it passes an argument, so it goes again to find the value of the argument in properties. Maven 尝试将它传递给可能在构建阶段的其他地方,而不是传递一个参数的值,因此它再次在属性中查找参数的值。 Then you have the recursion message!
然后你有递归消息!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.