通过属性激活 Maven 多项目配置文件
我在激活个人资料时遇到问题。有一个带有配置文件的主pom:
<profile>
<id>EntityUpdater</id>
<activation>
<property>
<name>entityupdater.start</name>
<value>true</value>
</property>
</activation>
....
在我的childpom(jar包)中我指定了属性:
<properties>
<!-- ENTITY UPDATER CONFIG -->
<entityupdater.start>true</entityupdater.start>
....
但是在构建过程中配置文件没有启动。
如果有人能帮助我,我会很高兴。
最好的问候,丹尼尔
I have a problem to activate a profile. There is a master pom with the profile:
<profile>
<id>EntityUpdater</id>
<activation>
<property>
<name>entityupdater.start</name>
<value>true</value>
</property>
</activation>
....
In my childpom (jar package) I specify the property:
<properties>
<!-- ENTITY UPDATER CONFIG -->
<entityupdater.start>true</entityupdater.start>
....
But in the build process the profile does not start.
I would be very happy if anyone could help me.
Best regards, Daniel
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,Maven 只能触发基于属性的配置文件,如果您从命令行将它们作为 JVM 参数传递:
mvn clean package -Dentityupdater.start
Unfortunately, Maven can only trigger property based profiles, if you are passing them in from the command-line as JVM args:
mvn clean package -Dentityupdater.start