I am new to Maven, I have a Java based web project with maven configured in my MyEclipse.
Now if I modified any java files then do I need to do Run as -> Mvn install
or Mvn package
?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
From the Lifecycle reference, install will run the project's integration tests, package won't.
If you really need to not install the generated artifacts, use at least verify.
mvn install
is the option that is most often used.mvn package
is seldom used, only if you're debugging some issue with the maven build process.See: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
Note that
mvn package
will only create a jar file.mvn install
will do that and install the jar (and class etc.) files in the proper places if other code depends on those jars.I usually do a
mvn clean install
; this deletes thetarget
directory and recreates all jars in that location.The clean helps with unneeded or removed stuff that can sometimes get in the way.
Rather then debug (some of the time) just start fresh all of the time.