> -----Original Message----- > From: Guillaume Polet > Sent: Sunday, September 11, 2011 4:07 > To: Maven Users List > Subject: [maven] Re: Auto building parent and sibling > projects as needed > > The problem is that a child does not know where the sources > of its parents are located,
Is it not the point of <relativePath>../pom.xml</relativePath>? > and therefore it is completely > unable to trigger its build. You probably have set up one or > more parent aggregator projects and you mapped this hierarchy > onto the file/directory structure but this is not mandatory > at all. You can very well use a parent just to define the > default version to use for dependencies, or the default > target of the compiler, other properties that are common > through all your projects and many more things. > You should probably read again the first two paragraphs here: > http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project _Inheritance_vs_Project_Aggregation Read that before and again. See the bottom of the email and attachment (the poms). > The first one explains the benefits of inheritance while the > second explain the aggregation. > > Hope this helps you clear things out. Still stuck at the same place, but thanks for confirming what I read. > > Cheers, > Guillaume > > Le 11/09/2011 06:21, Jason Pyeron a écrit : > > I am trying to understand why maven's reactor would not add > a parent > > and a parent's children to the build when it is detected that the > > dependency is not in the repository. > > > > Is there a use case to NOT auto build? Or is there a > technical hurdle > > to overcome to accomplish this in the reactor design? > > > > Could I be missing a concept on maven usage? > > > > I have a project which has a very large set of parent/child/sibling > > dependencies I am migrating from our ant build system. When an > > engineer needs to make changes on their part it would be > best for them > > to execute mvn from that parts directory. > > jpyeron@black /projects/cascade/trunk/tmp/test $ mvn compile [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] parent [INFO] A [INFO] B [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building parent 1.0.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building A 1.0.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ A --- [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\Documents and Settings\All Users\Desktop\projects\cascade\trunk\tmp\test\A\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ A --- [INFO] No sources to compile [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building B 1.0.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ B --- [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\Documents and Settings\All Users\Desktop\projects\cascade\trunk\tmp\test\B\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ B --- [INFO] No sources to compile [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] parent ............................................ SUCCESS [0.000s] [INFO] A ................................................. SUCCESS [0.719s] [INFO] B ................................................. SUCCESS [0.047s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.891s [INFO] Finished at: Sun Sep 11 11:33:49 EDT 2011 [INFO] Final Memory: 3M/121M [INFO] ------------------------------------------------------------------------ jpyeron@black /projects/cascade/trunk/tmp/test $ cd B jpyeron@black /projects/cascade/trunk/tmp/test/B $ mvn compile [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building B 1.0.0 [INFO] ------------------------------------------------------------------------ [WARNING] The POM for us.pdinc.foo.maven.test:A:jar:1.0.0 is missing, no dependency information available [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.234s [INFO] Finished at: Sun Sep 11 11:34:03 EDT 2011 [INFO] Final Memory: 2M/121M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project B: Could not resolve dependencies for project us.pdinc.foo.maven.test:B:jar:1.0.0: Failure to find us.pdinc.foo.maven.test:A:jar:1.0.0 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100 - - +1 (443) 269-1555 x333 Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00.
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
