简体   繁体   中英

Maven multi module, dependency between modules

I created a maven multi modules project with 2 modules: core and service. Service module is using core module (core is declared as a dependency on service module). The parent pom version is 1.0-SNAPSHOT (so the modules too). During the maven clean package phase, maven is not fetching core module neither from my local repo nor from remote repo (nexus). It is always building with core module within the project and not fetching any more recent SNAPSHOT version from repo (local/remote). Is that the expected behaviour?

If you build the project, it will build everything. The command clean package will resolve the inter-module dependencies inside the project.

Everything else would probably lead to surprising results.

If you really just want to build just one module, use the -pl parameter.

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.

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