首页 > 解决方案 > Mojo Codehaus 属性插件替代品

问题描述

我目前正在尝试与 Codehaus Mojo Properties 合作。我今天早上才知道的。

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>properties-maven-plugin</artifactId>
    <version>1.0.0</version>
</plugin>

所以我不能说我是这方面的专家。但是当试图建立一个战争文件时,我不断得到:

Caused by: org.apache.maven.plugin.MojoFailureException: Circular property definition:

我的插件配置是:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>properties-maven-plugin</artifactId>
    <inherited>true</inherited>
    <executions>
        <execution>
            <id>read-pal-properties</id>
            <phase>initialize</phase>
            <goals>
                <goal>read-project-properties</goal>
            </goals>                        
            <configuration>
                <files>
                    <file>${project.basedir}\src\main\resources\system.properties</file>
                </files>
            </configuration>
        </execution>
    </executions>
</plugin>

失败的属性是:

webserver.websphere=WebSphere:cell=${webserver.cell},node=${webserver.node},server=${webserver.server}

我用谷歌搜索了一下,发现这是一个已知的错误。所以只是想看看是否有其他插件可以做同样的工作。

https://github.com/mojohaus/properties-maven-plugin/issues/27

任何帮助,将不胜感激。

标签: javamavenproperties

解决方案


如果超过 2 年仍未找到答案,请使用 1.0-alpha-2 版本


推荐阅读