覆盖输出主目录中的资源文件

我有两个不同的Java模块A和B,其中A是B的依存关系。在两个模块中我都有一个.property文件:

operation=${my-prop}

$ {my-prop}的值因模块而异(我在每个模块的主pom内都有一个属性,A内的值为“ true”,B内的值为“ false”)

每个模块的pom中都有:

 <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <resources>
                        <resource>
                            <directory>src/main/resources</directory>
                            <filtering>true</filtering>
                        </resource>
                    </resources>
                    <overwrite>true</overwrite>
                    <nonFilteredFileExtensions>
                        <nonFilteredFileExtension>nix64</nonFilteredFileExtension>
                    </nonFilteredFileExtensions>
                </configuration>
            </plugin>

构建模块A时,在jar内可以看到正确的.property文件(operation = true);插入时,当我构建模块B时,在jar中找到A的.property文件(operation = true);有什么建议吗?

jieqicheng 回答:覆盖输出主目录中的资源文件

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3158076.html

大家都在问