首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Maven项目编译

Maven项目编译
EN

Stack Overflow用户
提问于 2021-03-30 04:41:56
回答 1查看 37关注 0票数 1

我正在尝试通过运行"mvn clean compile“来编译maven项目

我得到的错误如下:

代码语言:javascript
复制
[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的某个地方:

代码语言:javascript
复制
<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>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-03-30 04:57:21

在属性上,必须声明一个值

代码语言:javascript
复制
<properties>
<xmlName>${xmlName}</xmlName>  <--------  <xmlName>SomeValueHere</xmlName>
</properties

您在属性中传递了一个意外的参数

Maven尝试将其传递到其他地方,可能是在构建阶段,它传递的不是一个值,而是一个参数,因此它再次在属性中查找该参数的值。然后你就有了递归消息!

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66861370

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档