Actually it's a core bug caused by enforcer being an aggregator and requiring 
dependencies. You can simply switch from "enforce-once" to "enforce". See 
MECLIPSE-11 for more information.

-----Original Message-----
From: Kenney Westerhof [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 13, 2007 6:59 PM
To: Maven Users List
Subject: Re: module ordering

Hi,

This is a bug in the enforcer plugin. Disabling it from the core-parent pom 
fixes
it.

-- Kenney

Steve Ebersole wrote:
> I am having a problem getting multi-module builds to work right.
> 
> All this stuff is publicly accessible, if someone was willing to take a look 
> and try to help me figure it out.  There are a couple of piece of information 
> you'd need:
> 1) First, you'd need to define the jboss repo in addition to the central repo:
>             <repositories>
>                 <repository>
>                     <id>jboss</id>
>                     <url>http://repository.jboss.com/maven2</url>
>                     <releases>
>                         <enabled>true</enabled>
>                     </releases>
>                     <snapshots>
>                         <enabled>false</enabled>
>                     </snapshots>
>                 </repository>
>             </repositories>
>             <pluginRepositories>
>                 <pluginRepository>
>                     <id>jboss-plugins</id>
>                     <url>http://repository.jboss.com/maven2</url>
>                     <releases>
>                         <enabled>true</enabled>
>                     </releases>
>                     <snapshots>
>                         <enabled>false</enabled>
>                     </snapshots>
>                 </pluginRepository>
>             </pluginRepositories>
> 
> 2) Check out the parent poms and install them locally:
> a) http://anonsvn.jboss.org/repos/testhibernate/maven-poms/trunk/core-parent/
> b) 
> http://anonsvn.jboss.org/repos/testhibernate/maven-poms/trunk/core-manual-parent/
> 
> 3) Check out the project:
> http://anonsvn.jboss.org/repos/testhibernate/core/trunk/
> 
> 
> The situation is that I have a root project (./pom.xml) which defines a 
> number of sub-projects via modules.  Some of those sub-projects have 
> dependencies on one another.  So for example, ./core/pom.xml is depended upon 
> by a number of other modules.
> 
> Attempts to run 'mvn install' against the root project fail.  They fail in a 
> bizarre fashion.  The output shows that maven believes (I think) that 
> ./core/pom.xml has a dependency on ./cache-ehcache/pom.xml.  It fails because 
> ./cache-ehcache/pom.xml does then in fact have a dependency back to 
> ./core/pom.xml:
> 
> [INFO] Scanning for projects...
> [INFO] Reactor build order:
> [INFO]   Hibernate Core
> [INFO]   Hibernate Ehcache Integration
> [INFO]   Hibernate JBossCache Integration
> [INFO]   Hibernate JBossCache2.x Integration
> [INFO]   Hibernate OSCache Integration
> [INFO]   Hibernate SwarmCache Integration
> [INFO]   Hibernate C3P0 ConnectionProvider
> [INFO]   Hibernate Proxool ConnectionProvider
> [INFO]   Hibernate JMX Module
> [INFO]   Hibernate Testing
> [INFO]   Hibernate Testsuite
> [INFO]   Hibernate Example
> [INFO]   Hibernate Manual (en-US)
> [INFO]   Hibernate Manual (fr-FR)
> [INFO]   Hibernate Manual (aggregator)
> [INFO]   Hibernate Tutorial
> [INFO]   Hibernate Core - Documentation
> [INFO]   Hibernate Core Aggregator
> [INFO] 
> ------------------------------------------------------------------------
> ---
> [INFO] Building Hibernate Core
> [INFO]    task-segment: [install]
> [INFO] 
> ------------------------------------------------------------------------
> ---
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
>  
> Missing:
> ----------
> 1) org.hibernate:hibernate-core:jar:3.3.0-SNAPSHOT
>  
>   Try downloading the file manually from the project website.
>  
>   Then, install it using the command:
>       mvn install:install-file -DgroupId=org.hibernate 
> -DartifactId=hibernate-c
> re \
>           -Dversion=3.3.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
> Alternatively, if you host your own repository you can deploy the file there:
>     mvn deploy:deploy-file -DgroupId=org.hibernate -DartifactId=hibernate-core
>  
>           -Dversion=3.3.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file \
>            -Durl=[url] -DrepositoryId=[id]
>  
>   Path to dependency:
>         1) org.hibernate:hibernate-ehcache:jar:3.3.0-SNAPSHOT
>         2) org.hibernate:hibernate-core:jar:3.3.0-SNAPSHOT
>  
> ----------
> 1 required artifact is missing.
>  
> for artifact:
>   org.hibernate:hibernate-ehcache:jar:3.3.0-SNAPSHOT
>  
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2),
>   jboss (http://repository.jboss.com/maven2)
> 
> 
> But, dependency:analyze shows that core really does not have a dep on ehcache 
> module:
> 
> [INFO] [dependency:analyze]
> [INFO] Used declared dependencies:
> [INFO]    commons-collections:commons-collections:jar:3.1:compile
> [INFO]    javax.transaction:jta:jar:1.1:compile
> [INFO]    javassist:javassist:jar:3.4.GA:compile
> [INFO]    javax.security:jaas:jar:1.0.01:provided
> [INFO]    ant:ant:jar:1.6.5:provided
> [INFO]    commons-logging:commons-logging:jar:1.0.4:compile
> [INFO]    javax.security:jacc:jar:1.0:provided
> [INFO]    dom4j:dom4j:jar:1.6.1:compile
> [INFO]    cglib:cglib:jar:2.1_3:compile
> [INFO]    asm:asm-attrs:jar:1.5.3:compile
> [INFO]    antlr:antlr:jar:2.7.6:compile
> [INFO] Used undeclared dependencies:
> [WARNING]    asm:asm:jar:1.5.3:compile
> [WARNING]    xml-apis:xml-apis:jar:1.0.b2:compile
> [INFO] Unused declared dependencies:
> [INFO]    None
> [WARNING] Potential problems discovered.
> [INFO] Found Resolved Dependency / DependencyManagement mismatches:
> [INFO]  Ignoring Direct Dependencies.
> [INFO]    None
> 
> At this point I have no clue what the problem is.  :(
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to