You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Peter Kahn <ci...@gmail.com> on 2012/09/21 20:19:40 UTC

Transitive Dep warning on root pom change

Hi all,

What's the maven way to allow to build individual modules and ensure that
changes to parent pom are uploaded into the local repository

Let's say I have three modules: one parent, two children (dbmod, appmod)
parent:    dependencyManagement defines jdbc-foo 1.5
dbmod:   dependencies defines jdbc-foo getting version from parent
appmod: depens on dbmod

I build from parent getting parent-pom with jdbc-foo 1.5, dbmod using
jdbc-foo 1.5 and appmod.
I update source control and parent pom changes to jdbc-foo 1.6
I build in dbmod directory
I build in appmod directory
  appmod fetches dbmod from local repository and uses local repo version of
parent pom
  maven issues: "[WARNING] The POM for ...dbmod:jar:3.5.0-SNAPSHOT is
invalid, transitive dependencies (if any) will not be available: 1 problem
was encountered while building the effective model for dbmod:3.5.0-SNAPSHOT"
  compilation fails because my code relied on access to jdbc-foo 1.6 changes

I can resolve the problem these way:
If I install the parent pom file manually the problem, (mvn install-file
...)
If I build from the parent (if I have 80+ modules, this isn't ideal)
if I build from the parent selecting the desired project and using
also-make (mvn -am -pl :appmod  ...)

If there a config setting that would force parent install other than "-am
pl :mod" or is this the "maven way" to handle the situation?


Thanks

Peter




-- 
Peter Kahn
citizenkahn@gmail.com
http://www.google.com/profiles/citizenkahn
Awareness - Intention - Action