[ http://jira.codehaus.org/browse/MNG-3666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=144269#action_144269 ]
Chris Graham commented on MNG-3666: ----------------------------------- I'm fairly new to Maven, so all I can say with certainity, is that I saw the issue with 2.0.9. I'm really not sure about previous versions. Should be easy enough to test with though.. -Chris > Adding SCOPE in a consolidation POM stops the child dependencies from being > resolved > ------------------------------------------------------------------------------------ > > Key: MNG-3666 > URL: http://jira.codehaus.org/browse/MNG-3666 > Project: Maven 2 > Issue Type: Bug > Components: Dependencies > Affects Versions: 2.0.9 > Environment: WIN XP SP2, JDK 1.5 > Reporter: Chris Graham > Fix For: 2.0.x > > > If a consolidated/library pom has a scope in it, it fails to resolve it's > child dependencies. > Consider this from a top level pom: > <dependency> > <groupId>com.ibm.db2.jcc</groupId> > <artifactId>library</artifactId> > <version>V8-FP15</version> > <type>pom</type> > <scope>test</scope> > </dependency> > This is what works: > <?xml version="1.0" encoding="UTF-8"?> > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi= > "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= > "http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/maven-v4_0_0.xsd"> > <modelVersion>4.0.0</modelVersion> > <groupId>com.ibm.db2.jcc</groupId> > <artifactId>library</artifactId> > <version>V8-FP15</version> > <packaging>pom</packaging> > <name>Master POM for the DB2 Universal Drivers from V8 FP15.</name> > <description>POM was created from install:install-file</description> > <dependencies> > <dependency> > <groupId>com.ibm.db2.jcc</groupId> > <artifactId>db2jcc</artifactId> > <version>V8-FP15</version> > </dependency> > <dependency> > <groupId>com.ibm.db2.jcc</groupId> > <artifactId>db2jcc_license_cisuz</artifactId> > <version>V8-FP15</version> > </dependency> > <dependency> > <groupId>com.ibm.db2.jcc</groupId> > <artifactId>db2jcc_license_cu</artifactId> > <version>V8-FP15</version> > </dependency> > </dependencies> > </project> > If I add a scope of <anything> to each dependency, it fails to resolve it's > children. > I consider this a bug. > If you are depending on a pom of type pom and the scope attribute is not > needed (it should be specified in the top level dependency definition), then > it should be ignored. At the very least it should not cease processing it's > children. > This is the broken one, for reference: > <?xml version="1.0" encoding="UTF-8"?> > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi= > "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= > "http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/maven-v4_0_0.xsd"> > <modelVersion>4.0.0</modelVersion> > <groupId>com.ibm.db2.jcc</groupId> > <artifactId>library</artifactId> > <version>V8-FP15</version> > <packaging>pom</packaging> > <name>Master POM for the DB2 Universal Drivers from V8 FP15.</name> > <description>POM was created from install:install-file</description> > <dependencies> > <dependency> > <groupId>com.ibm.db2.jcc</groupId> > <artifactId>db2jcc</artifactId> > <version>V8-FP15</version> > <scope>runtime</scope> > </dependency> > <dependency> > <groupId>com.ibm.db2.jcc</groupId> > <artifactId>db2jcc_license_cisuz</artifactId> > <version>V8-FP15</version> > <scope>runtime</scope> > </dependency> > <dependency> > <groupId>com.ibm.db2.jcc</groupId> > <artifactId>db2jcc_license_cu</artifactId> > <version>V8-FP15</version> > <scope>runtime</scope> > </dependency> > </dependencies> > </project> > This all came about from taking all three individual dependencies from a pom > and attempting to package them up into a single dependency to make inclusion > easier. Drove me nuts for a few days, but I thought that I'd raise it here to > save some other poor soul the same pain. > -Chris -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira