我正在尝试通过运行"mvn clean compile“来编译maven项目
我得到的错误如下:
[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]我已经尝试在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>发布于 2021-03-30 04:57:21
在属性上,必须声明一个值
<properties>
<xmlName>${xmlName}</xmlName> <-------- <xmlName>SomeValueHere</xmlName>
</properties您在属性中传递了一个意外的参数
Maven尝试将其传递到其他地方,可能是在构建阶段,它传递的不是一个值,而是一个参数,因此它再次在属性中查找该参数的值。然后你就有了递归消息!
https://stackoverflow.com/questions/66861370
复制相似问题