[ 
https://jira.codehaus.org/browse/MNG-3666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Benedict updated MNG-3666:
-------------------------------

    Fix Version/s:     (was: Issues to be reviewed for 3.x)

> Adding SCOPE in a consolidation POM stops the child dependencies from being 
> resolved
> ------------------------------------------------------------------------------------
>
>                 Key: MNG-3666
>                 URL: https://jira.codehaus.org/browse/MNG-3666
>             Project: Maven
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.9
>         Environment: WIN XP SP2, JDK 1.5
>            Reporter: Chris Graham
>
> 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 was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to