开发者

Can I have the same profile in pom.xml and in profiles.xml?

开发者 https://www.devze.com 2023-01-09 07:10 出处:网络
This is my pom.xml (portion of it): <profiles> <profile> <id>production</id> ... </profile>

This is my pom.xml (portion of it):

<profiles>
  <profile>
    <id>production</id>
    ...
  </profile>
</profile>

This is my profiles.xml:

<profilesXml>
  <profiles>
    <profile>
      <id>production</id>
      ...
    <开发者_开发技巧;/profile>
  </profiles>
</profilesXml>

Maven says:

[WARNING] Overriding profile: 'production' (source: pom) with
new instance from source: profiles.xml

What am I doing wrong?


Well, you can. But the warning message is pretty clear: the profile from the external file will override the one from the pom.

PS: As a side note, I really wonder why you're "playing" with the profiles.xml which is deprecated and removed from Maven 3. That's just a dead feature.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号