简体   繁体   English

Maven-如何仅在Java EE项目上重建.xml文件

[英]Maven - how to rebuild .xml files only on a Java EE project

As the title states. 如标题所述。
I've made changes to .xml file only. 我仅对.xml文件进行了更改。 Do I need to mvn clean install the whole project or a simple mvn install ? 我需要mvn clean install全新mvn clean install整个项目还是简单的mvn install Or maybe mvn generate-sources will do the stuff? 或者也许mvn generate-sources会做这些事情?
Can anyone elaborate? 谁能详细说明?

To build the artifact, you need to call mvn package . 要构建工件,您需要调用mvn package If you do not do a clean, beware that remainders of the previous build might still exist. 如果不进行清理,请注意,以前版本的其余部分可能仍然存在。 Changing the code of a class is generally fine, while changing the dependencies in the POM is not (you might end up with both versions of an artifact if you change the version in the POM). 更改类的代码通常没问题,而更改POM中的依赖项则不行(如果更改POM中的版本,则最终可能会出现工件的两个版本)。

Your hibernate case is somewhere in between, so you probably need to make experiments. 您的休眠情况介于两者之间,因此您可能需要进行实验。 Maven does not make any guarantees. Maven不做任何保证。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM