You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Chris Graham (JIRA)" <ji...@codehaus.org> on 2008/07/16 08:23:27 UTC

[jira] Created: (MNG-3666) Adding SCOPE in a consolidation POM stops the child dependencies from being resolved

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



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

        

[jira] Commented: (MNG-3666) Adding SCOPE in a consolidation POM stops the child dependencies from being resolved

Posted by "Chris Graham (JIRA)" <ji...@codehaus.org>.
    [ 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

        

[jira] Updated: (MNG-3666) Adding SCOPE in a consolidation POM stops the child dependencies from being resolved

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-3666:
------------------------------

      Description: 
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


  was:

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


    Fix Version/s: 2.0.x

from a cursory look it does seem wrong, the scopes should collect over the tree. I wonder if this is related to the import changes - did it work in earlier versions of Maven?

> 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