簡體   English   中英

Maven工程編譯

[英]Maven project compiling

我正在嘗試通過運行“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>

在屬性上,您必須聲明一個值

<properties>
<xmlName>${xmlName}</xmlName>  <--------  <xmlName>SomeValueHere</xmlName>
</properties

您在屬性中傳遞了一個不期望的參數

Maven 嘗試將它傳遞給可能在構建階段的其他地方,而不是傳遞一個參數的值,因此它再次在屬性中查找參數的值。 然后你有遞歸消息!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM