I know that when you run mvn install
it will compile, package, and copy the binaries in the local .m2 repository.
I recently created a maven project in intelliJ and ran mvn install
. I then checked the .m2 repository and the generated binaries were there. When I tried to add a dependency to that newly created snapshot from another intelliJ project, they aren't being picked up.
mvn install
besides copying the new snapshot into .m2? mvn dependency:tree
is usually the best tool for figuring out what's going on with dependencies.
Sometimes with IDE's they use their own repo or don't pick things up. I'd generally do a sanity check mvn clean install from the command line to make sure things are working correctly.
Here is the default lifecycle of maven. When you execute one phase - all previous phases are executed before it. So if you call mvn install
previous 21 actions will run before install
phase which is 22.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.