You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Celso Gomes Barreto Junior (JIRA)" <ji...@codehaus.org> on 2006/04/26 23:24:20 UTC

[jira] Created: (MNG-2241) Versions are required when it shouldn't with multi-modules projects and war dependencies

Versions are required when it shouldn't with multi-modules projects and war dependencies
----------------------------------------------------------------------------------------

         Key: MNG-2241
         URL: http://jira.codehaus.org/browse/MNG-2241
     Project: Maven 2
        Type: Bug

    Versions: 2.0.4    
 Environment: Maven 2.0.4, Java 5, Windows XP
    Reporter: Celso Gomes Barreto Junior


In a multi-project with a parent pom which should enforces modules's versions in dependencyManagement element, when I use a war dependnecy it starts to require the version declaration in child pom's dependencies. When I use jar dependencies, it works fine.

Project structure:

parent project
          |_ web (war)
          |_ commons   (jar)
          |_ webcommons (war)

--------------------------------------------------
parent project pom:

<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <name>Procdev - Referência</name>
  <groupId>globo</groupId>
  <artifactId>procdevref</artifactId>
  <packaging>pom</packaging>
  <version>0.0.1</version>
  <description>no</description>

  <modules>
    <module>web</module>
    <module>commons</module>
    <module>webcommons</module>
  </modules>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>globo</groupId>
        <artifactId>procdevref-web</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>globo</groupId>
        <artifactId>procdevref-commons</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>globo</groupId>
        <artifactId>procdevref-webcommons</artifactId>
        <version>${project.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

</project>
--------------------------------------------------
web project pom:

<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>globo</groupId>
    <artifactId>procdevref</artifactId>
    <version>0.0.1</version>
  </parent>
  <name>Procdev Web</name>
  <artifactId>procdevref-web</artifactId>
  <packaging>war</packaging>
  <version>0.0.1</version>
  <description>no</description>
  <dependencies>
    <dependency>
      <groupId>globo</groupId>
      <artifactId>procdevref-webcommons</artifactId>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>globo</groupId>
      <artifactId>procdevref-commons</artifactId>
    </dependency>
    <dependency>
      <groupId>jstl</groupId>
      <artifactId>jstl</artifactId>
      <version>[1.1.2,]</version>
    </dependency>
    <dependency>
      <groupId>taglibs</groupId>
      <artifactId>standard</artifactId>
      <version>[1.1.2,]</version>
    </dependency>
  </dependencies>
</project>

--------------------------------------------------
webcommons project pom:

<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>globo</groupId>
    <artifactId>procdevref</artifactId>
    <version>0.0.1</version>
  </parent>

  <name>Procdev Web Commons</name>
  <artifactId>procdevref-webcommons</artifactId>
  <packaging>war</packaging>
  <version>0.0.1</version>
  <description>no</description>
</project>

--------------------------------------------------
commons project pom:

<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>globo</groupId>
    <artifactId>procdevref</artifactId>
    <version>0.0.1</version>
  </parent>
  <name>Procdev Commons</name>
  <artifactId>procdevref-commons</artifactId>
  <packaging>jar</packaging>
  <version>0.0.1</version>
  <description>no</description>
</project>

When i Run it with "mvn -X clean install" I get:

+ Error stacktraces are turned on.
Maven version: 2.0.4
[DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settin
gs\celso.cs\.m2\plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: 'C:\java\maven-2.0.4\b
in\..\conf\plugin-registry.xml'
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: globo:procdevref-web
POM Location: C:\Projetos\ProcdevReferencia\web\pom.xml
Validation Messages:

    [0]  'dependencies.dependency.version' is missing for globo:procdevref-webco
mmons


Reason: Failed to validate POM

-- 
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-2241) Versions are required when it shouldn't with multi-modules projects and war dependencies

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

Jason van Zyl updated MNG-2241:
-------------------------------

    Fix Version/s:     (was: 3.x)
                   3.0-alpha-7

> Versions are required when it shouldn't with multi-modules projects and war dependencies
> ----------------------------------------------------------------------------------------
>
>                 Key: MNG-2241
>                 URL: http://jira.codehaus.org/browse/MNG-2241
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>         Environment: Maven 2.0.4, Java 5, Windows XP
>            Reporter: Celso Gomes Barreto Junior
>             Fix For: 3.0-alpha-7
>
>
> In a multi-project with a parent pom which should enforces modules's versions in dependencyManagement element, when I use a war dependnecy it starts to require the version declaration in child pom's dependencies. When I use jar dependencies, it works fine.
> Project structure:
> parent project
>           |_ web (war)
>           |_ commons   (jar)
>           |_ webcommons (war)
> --------------------------------------------------
> parent project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <name>Procdev - Referência</name>
>   <groupId>globo</groupId>
>   <artifactId>procdevref</artifactId>
>   <packaging>pom</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
>   <modules>
>     <module>web</module>
>     <module>commons</module>
>     <module>webcommons</module>
>   </modules>
>   <dependencyManagement>
>     <dependencies>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-web</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-commons</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-webcommons</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>     </dependencies>
>   </dependencyManagement>
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.1</version>
>       <scope>test</scope>
>     </dependency>
>   </dependencies>
> </project>
> --------------------------------------------------
> web project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Web</name>
>   <artifactId>procdevref-web</artifactId>
>   <packaging>war</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
>   <dependencies>
>     <dependency>
>       <groupId>globo</groupId>
>       <artifactId>procdevref-webcommons</artifactId>
>       <type>war</type>
>     </dependency>
>     <dependency>
>       <groupId>globo</groupId>
>       <artifactId>procdevref-commons</artifactId>
>     </dependency>
>     <dependency>
>       <groupId>jstl</groupId>
>       <artifactId>jstl</artifactId>
>       <version>[1.1.2,]</version>
>     </dependency>
>     <dependency>
>       <groupId>taglibs</groupId>
>       <artifactId>standard</artifactId>
>       <version>[1.1.2,]</version>
>     </dependency>
>   </dependencies>
> </project>
> --------------------------------------------------
> webcommons project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Web Commons</name>
>   <artifactId>procdevref-webcommons</artifactId>
>   <packaging>war</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
> </project>
> --------------------------------------------------
> commons project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Commons</name>
>   <artifactId>procdevref-commons</artifactId>
>   <packaging>jar</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
> </project>
> When i Run it with "mvn -X clean install" I get:
> + Error stacktraces are turned on.
> Maven version: 2.0.4
> [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settin
> gs\celso.cs\.m2\plugin-registry.xml'
> [DEBUG] Building Maven global-level plugin registry from: 'C:\java\maven-2.0.4\b
> in\..\conf\plugin-registry.xml'
> [INFO] Scanning for projects...
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
> Project ID: globo:procdevref-web
> POM Location: C:\Projetos\ProcdevReferencia\web\pom.xml
> Validation Messages:
>     [0]  'dependencies.dependency.version' is missing for globo:procdevref-webco
> mmons
> Reason: Failed to validate POM

-- 
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-2241) Versions are required when it shouldn't with multi-modules projects and war dependencies

Posted by "Dhruva B. Reddy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=129556#action_129556 ] 

Dhruva B. Reddy commented on MNG-2241:
--------------------------------------

I see the same problem specifying "classifier" in the parent POM (2.0.8, Java 5, Windows XP).

> Versions are required when it shouldn't with multi-modules projects and war dependencies
> ----------------------------------------------------------------------------------------
>
>                 Key: MNG-2241
>                 URL: http://jira.codehaus.org/browse/MNG-2241
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>         Environment: Maven 2.0.4, Java 5, Windows XP
>            Reporter: Celso Gomes Barreto Junior
>             Fix For: 2.1
>
>
> In a multi-project with a parent pom which should enforces modules's versions in dependencyManagement element, when I use a war dependnecy it starts to require the version declaration in child pom's dependencies. When I use jar dependencies, it works fine.
> Project structure:
> parent project
>           |_ web (war)
>           |_ commons   (jar)
>           |_ webcommons (war)
> --------------------------------------------------
> parent project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <name>Procdev - Referência</name>
>   <groupId>globo</groupId>
>   <artifactId>procdevref</artifactId>
>   <packaging>pom</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
>   <modules>
>     <module>web</module>
>     <module>commons</module>
>     <module>webcommons</module>
>   </modules>
>   <dependencyManagement>
>     <dependencies>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-web</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-commons</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-webcommons</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>     </dependencies>
>   </dependencyManagement>
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.1</version>
>       <scope>test</scope>
>     </dependency>
>   </dependencies>
> </project>
> --------------------------------------------------
> web project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Web</name>
>   <artifactId>procdevref-web</artifactId>
>   <packaging>war</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
>   <dependencies>
>     <dependency>
>       <groupId>globo</groupId>
>       <artifactId>procdevref-webcommons</artifactId>
>       <type>war</type>
>     </dependency>
>     <dependency>
>       <groupId>globo</groupId>
>       <artifactId>procdevref-commons</artifactId>
>     </dependency>
>     <dependency>
>       <groupId>jstl</groupId>
>       <artifactId>jstl</artifactId>
>       <version>[1.1.2,]</version>
>     </dependency>
>     <dependency>
>       <groupId>taglibs</groupId>
>       <artifactId>standard</artifactId>
>       <version>[1.1.2,]</version>
>     </dependency>
>   </dependencies>
> </project>
> --------------------------------------------------
> webcommons project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Web Commons</name>
>   <artifactId>procdevref-webcommons</artifactId>
>   <packaging>war</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
> </project>
> --------------------------------------------------
> commons project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Commons</name>
>   <artifactId>procdevref-commons</artifactId>
>   <packaging>jar</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
> </project>
> When i Run it with "mvn -X clean install" I get:
> + Error stacktraces are turned on.
> Maven version: 2.0.4
> [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settin
> gs\celso.cs\.m2\plugin-registry.xml'
> [DEBUG] Building Maven global-level plugin registry from: 'C:\java\maven-2.0.4\b
> in\..\conf\plugin-registry.xml'
> [INFO] Scanning for projects...
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
> Project ID: globo:procdevref-web
> POM Location: C:\Projetos\ProcdevReferencia\web\pom.xml
> Validation Messages:
>     [0]  'dependencies.dependency.version' is missing for globo:procdevref-webco
> mmons
> Reason: Failed to validate POM

-- 
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-2241) Versions are required when it shouldn't with multi-modules projects and war dependencies

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

Benjamin Bentmann updated MNG-2241:
-----------------------------------

    Description: 
In a multi-project with a parent pom which should enforces modules's versions in dependencyManagement element, when I use a war dependnecy it starts to require the version declaration in child pom's dependencies. When I use jar dependencies, it works fine.
{noformat}
Project structure:

parent project
          |_ web (war)
          |_ commons   (jar)
          |_ webcommons (war)
{noformat}
--------------------------------------------------
parent project pom:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <name>Procdev - Referência</name>
  <groupId>globo</groupId>
  <artifactId>procdevref</artifactId>
  <packaging>pom</packaging>
  <version>0.0.1</version>
  <description>no</description>

  <modules>
    <module>web</module>
    <module>commons</module>
    <module>webcommons</module>
  </modules>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>globo</groupId>
        <artifactId>procdevref-web</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>globo</groupId>
        <artifactId>procdevref-commons</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>globo</groupId>
        <artifactId>procdevref-webcommons</artifactId>
        <version>${project.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
{code}
--------------------------------------------------
web project pom:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>globo</groupId>
    <artifactId>procdevref</artifactId>
    <version>0.0.1</version>
  </parent>
  <name>Procdev Web</name>
  <artifactId>procdevref-web</artifactId>
  <packaging>war</packaging>
  <version>0.0.1</version>
  <description>no</description>
  <dependencies>
    <dependency>
      <groupId>globo</groupId>
      <artifactId>procdevref-webcommons</artifactId>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>globo</groupId>
      <artifactId>procdevref-commons</artifactId>
    </dependency>
    <dependency>
      <groupId>jstl</groupId>
      <artifactId>jstl</artifactId>
      <version>[1.1.2,]</version>
    </dependency>
    <dependency>
      <groupId>taglibs</groupId>
      <artifactId>standard</artifactId>
      <version>[1.1.2,]</version>
    </dependency>
  </dependencies>
</project>
{code}
--------------------------------------------------
webcommons project pom:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>globo</groupId>
    <artifactId>procdevref</artifactId>
    <version>0.0.1</version>
  </parent>

  <name>Procdev Web Commons</name>
  <artifactId>procdevref-webcommons</artifactId>
  <packaging>war</packaging>
  <version>0.0.1</version>
  <description>no</description>
</project>
{code}
--------------------------------------------------
commons project pom:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>globo</groupId>
    <artifactId>procdevref</artifactId>
    <version>0.0.1</version>
  </parent>
  <name>Procdev Commons</name>
  <artifactId>procdevref-commons</artifactId>
  <packaging>jar</packaging>
  <version>0.0.1</version>
  <description>no</description>
</project>
{code}
When i Run it with "mvn -X clean install" I get:
{noformat}
+ Error stacktraces are turned on.
Maven version: 2.0.4
[DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settings\celso.cs\.m2\plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: 'C:\java\maven-2.0.4\bin\..\conf\plugin-registry.xml'
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: globo:procdevref-web
POM Location: C:\Projetos\ProcdevReferencia\web\pom.xml
Validation Messages:

    [0]  'dependencies.dependency.version' is missing for globo:procdevref-webcommons


Reason: Failed to validate POM
{noformat}

  was:
In a multi-project with a parent pom which should enforces modules's versions in dependencyManagement element, when I use a war dependnecy it starts to require the version declaration in child pom's dependencies. When I use jar dependencies, it works fine.

Project structure:

parent project
          |_ web (war)
          |_ commons   (jar)
          |_ webcommons (war)

--------------------------------------------------
parent project pom:

<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <name>Procdev - Referência</name>
  <groupId>globo</groupId>
  <artifactId>procdevref</artifactId>
  <packaging>pom</packaging>
  <version>0.0.1</version>
  <description>no</description>

  <modules>
    <module>web</module>
    <module>commons</module>
    <module>webcommons</module>
  </modules>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>globo</groupId>
        <artifactId>procdevref-web</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>globo</groupId>
        <artifactId>procdevref-commons</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>globo</groupId>
        <artifactId>procdevref-webcommons</artifactId>
        <version>${project.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

</project>
--------------------------------------------------
web project pom:

<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>globo</groupId>
    <artifactId>procdevref</artifactId>
    <version>0.0.1</version>
  </parent>
  <name>Procdev Web</name>
  <artifactId>procdevref-web</artifactId>
  <packaging>war</packaging>
  <version>0.0.1</version>
  <description>no</description>
  <dependencies>
    <dependency>
      <groupId>globo</groupId>
      <artifactId>procdevref-webcommons</artifactId>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>globo</groupId>
      <artifactId>procdevref-commons</artifactId>
    </dependency>
    <dependency>
      <groupId>jstl</groupId>
      <artifactId>jstl</artifactId>
      <version>[1.1.2,]</version>
    </dependency>
    <dependency>
      <groupId>taglibs</groupId>
      <artifactId>standard</artifactId>
      <version>[1.1.2,]</version>
    </dependency>
  </dependencies>
</project>

--------------------------------------------------
webcommons project pom:

<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>globo</groupId>
    <artifactId>procdevref</artifactId>
    <version>0.0.1</version>
  </parent>

  <name>Procdev Web Commons</name>
  <artifactId>procdevref-webcommons</artifactId>
  <packaging>war</packaging>
  <version>0.0.1</version>
  <description>no</description>
</project>

--------------------------------------------------
commons project pom:

<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>globo</groupId>
    <artifactId>procdevref</artifactId>
    <version>0.0.1</version>
  </parent>
  <name>Procdev Commons</name>
  <artifactId>procdevref-commons</artifactId>
  <packaging>jar</packaging>
  <version>0.0.1</version>
  <description>no</description>
</project>

When i Run it with "mvn -X clean install" I get:

+ Error stacktraces are turned on.
Maven version: 2.0.4
[DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settin
gs\celso.cs\.m2\plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: 'C:\java\maven-2.0.4\b
in\..\conf\plugin-registry.xml'
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: globo:procdevref-web
POM Location: C:\Projetos\ProcdevReferencia\web\pom.xml
Validation Messages:

    [0]  'dependencies.dependency.version' is missing for globo:procdevref-webco
mmons


Reason: Failed to validate POM


> Versions are required when it shouldn't with multi-modules projects and war dependencies
> ----------------------------------------------------------------------------------------
>
>                 Key: MNG-2241
>                 URL: http://jira.codehaus.org/browse/MNG-2241
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>         Environment: Maven 2.0.4, Java 5, Windows XP
>            Reporter: Celso Gomes Barreto Junior
>             Fix For: 3.0-alpha-8
>
>
> In a multi-project with a parent pom which should enforces modules's versions in dependencyManagement element, when I use a war dependnecy it starts to require the version declaration in child pom's dependencies. When I use jar dependencies, it works fine.
> {noformat}
> Project structure:
> parent project
>           |_ web (war)
>           |_ commons   (jar)
>           |_ webcommons (war)
> {noformat}
> --------------------------------------------------
> parent project pom:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <name>Procdev - Referência</name>
>   <groupId>globo</groupId>
>   <artifactId>procdevref</artifactId>
>   <packaging>pom</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
>   <modules>
>     <module>web</module>
>     <module>commons</module>
>     <module>webcommons</module>
>   </modules>
>   <dependencyManagement>
>     <dependencies>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-web</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-commons</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-webcommons</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>     </dependencies>
>   </dependencyManagement>
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.1</version>
>       <scope>test</scope>
>     </dependency>
>   </dependencies>
> </project>
> {code}
> --------------------------------------------------
> web project pom:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Web</name>
>   <artifactId>procdevref-web</artifactId>
>   <packaging>war</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
>   <dependencies>
>     <dependency>
>       <groupId>globo</groupId>
>       <artifactId>procdevref-webcommons</artifactId>
>       <type>war</type>
>     </dependency>
>     <dependency>
>       <groupId>globo</groupId>
>       <artifactId>procdevref-commons</artifactId>
>     </dependency>
>     <dependency>
>       <groupId>jstl</groupId>
>       <artifactId>jstl</artifactId>
>       <version>[1.1.2,]</version>
>     </dependency>
>     <dependency>
>       <groupId>taglibs</groupId>
>       <artifactId>standard</artifactId>
>       <version>[1.1.2,]</version>
>     </dependency>
>   </dependencies>
> </project>
> {code}
> --------------------------------------------------
> webcommons project pom:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Web Commons</name>
>   <artifactId>procdevref-webcommons</artifactId>
>   <packaging>war</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
> </project>
> {code}
> --------------------------------------------------
> commons project pom:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Commons</name>
>   <artifactId>procdevref-commons</artifactId>
>   <packaging>jar</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
> </project>
> {code}
> When i Run it with "mvn -X clean install" I get:
> {noformat}
> + Error stacktraces are turned on.
> Maven version: 2.0.4
> [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settings\celso.cs\.m2\plugin-registry.xml'
> [DEBUG] Building Maven global-level plugin registry from: 'C:\java\maven-2.0.4\bin\..\conf\plugin-registry.xml'
> [INFO] Scanning for projects...
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
> Project ID: globo:procdevref-web
> POM Location: C:\Projetos\ProcdevReferencia\web\pom.xml
> Validation Messages:
>     [0]  'dependencies.dependency.version' is missing for globo:procdevref-webcommons
> Reason: Failed to validate POM
> {noformat}

-- 
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-2241) Versions are required when it shouldn't with multi-modules projects and war dependencies

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

Benjamin Bentmann updated MNG-2241:
-----------------------------------

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

> Versions are required when it shouldn't with multi-modules projects and war dependencies
> ----------------------------------------------------------------------------------------
>
>                 Key: MNG-2241
>                 URL: http://jira.codehaus.org/browse/MNG-2241
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>         Environment: Maven 2.0.4, Java 5, Windows XP
>            Reporter: Celso Gomes Barreto Junior
>             Fix For: Issues to be reviewed for 3.x
>
>
> In a multi-project with a parent pom which should enforces modules's versions in dependencyManagement element, when I use a war dependnecy it starts to require the version declaration in child pom's dependencies. When I use jar dependencies, it works fine.
> {noformat}
> Project structure:
> parent project
>           |_ web (war)
>           |_ commons   (jar)
>           |_ webcommons (war)
> {noformat}
> --------------------------------------------------
> parent project pom:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <name>Procdev - Referência</name>
>   <groupId>globo</groupId>
>   <artifactId>procdevref</artifactId>
>   <packaging>pom</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
>   <modules>
>     <module>web</module>
>     <module>commons</module>
>     <module>webcommons</module>
>   </modules>
>   <dependencyManagement>
>     <dependencies>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-web</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-commons</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-webcommons</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>     </dependencies>
>   </dependencyManagement>
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.1</version>
>       <scope>test</scope>
>     </dependency>
>   </dependencies>
> </project>
> {code}
> --------------------------------------------------
> web project pom:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Web</name>
>   <artifactId>procdevref-web</artifactId>
>   <packaging>war</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
>   <dependencies>
>     <dependency>
>       <groupId>globo</groupId>
>       <artifactId>procdevref-webcommons</artifactId>
>       <type>war</type>
>     </dependency>
>     <dependency>
>       <groupId>globo</groupId>
>       <artifactId>procdevref-commons</artifactId>
>     </dependency>
>     <dependency>
>       <groupId>jstl</groupId>
>       <artifactId>jstl</artifactId>
>       <version>[1.1.2,]</version>
>     </dependency>
>     <dependency>
>       <groupId>taglibs</groupId>
>       <artifactId>standard</artifactId>
>       <version>[1.1.2,]</version>
>     </dependency>
>   </dependencies>
> </project>
> {code}
> --------------------------------------------------
> webcommons project pom:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Web Commons</name>
>   <artifactId>procdevref-webcommons</artifactId>
>   <packaging>war</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
> </project>
> {code}
> --------------------------------------------------
> commons project pom:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Commons</name>
>   <artifactId>procdevref-commons</artifactId>
>   <packaging>jar</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
> </project>
> {code}
> When i Run it with "mvn -X clean install" I get:
> {noformat}
> + Error stacktraces are turned on.
> Maven version: 2.0.4
> [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settings\celso.cs\.m2\plugin-registry.xml'
> [DEBUG] Building Maven global-level plugin registry from: 'C:\java\maven-2.0.4\bin\..\conf\plugin-registry.xml'
> [INFO] Scanning for projects...
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
> Project ID: globo:procdevref-web
> POM Location: C:\Projetos\ProcdevReferencia\web\pom.xml
> Validation Messages:
>     [0]  'dependencies.dependency.version' is missing for globo:procdevref-webcommons
> Reason: Failed to validate POM
> {noformat}

-- 
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-2241) Versions are required when it shouldn't with multi-modules projects and war dependencies

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

Brett Porter updated MNG-2241:
------------------------------

    Component/s: Dependencies

> Versions are required when it shouldn't with multi-modules projects and war dependencies
> ----------------------------------------------------------------------------------------
>
>                 Key: MNG-2241
>                 URL: http://jira.codehaus.org/browse/MNG-2241
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>         Environment: Maven 2.0.4, Java 5, Windows XP
>            Reporter: Celso Gomes Barreto Junior
>             Fix For: 2.1.x
>
>
> In a multi-project with a parent pom which should enforces modules's versions in dependencyManagement element, when I use a war dependnecy it starts to require the version declaration in child pom's dependencies. When I use jar dependencies, it works fine.
> Project structure:
> parent project
>           |_ web (war)
>           |_ commons   (jar)
>           |_ webcommons (war)
> --------------------------------------------------
> parent project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <name>Procdev - Referência</name>
>   <groupId>globo</groupId>
>   <artifactId>procdevref</artifactId>
>   <packaging>pom</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
>   <modules>
>     <module>web</module>
>     <module>commons</module>
>     <module>webcommons</module>
>   </modules>
>   <dependencyManagement>
>     <dependencies>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-web</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-commons</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-webcommons</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>     </dependencies>
>   </dependencyManagement>
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.1</version>
>       <scope>test</scope>
>     </dependency>
>   </dependencies>
> </project>
> --------------------------------------------------
> web project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Web</name>
>   <artifactId>procdevref-web</artifactId>
>   <packaging>war</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
>   <dependencies>
>     <dependency>
>       <groupId>globo</groupId>
>       <artifactId>procdevref-webcommons</artifactId>
>       <type>war</type>
>     </dependency>
>     <dependency>
>       <groupId>globo</groupId>
>       <artifactId>procdevref-commons</artifactId>
>     </dependency>
>     <dependency>
>       <groupId>jstl</groupId>
>       <artifactId>jstl</artifactId>
>       <version>[1.1.2,]</version>
>     </dependency>
>     <dependency>
>       <groupId>taglibs</groupId>
>       <artifactId>standard</artifactId>
>       <version>[1.1.2,]</version>
>     </dependency>
>   </dependencies>
> </project>
> --------------------------------------------------
> webcommons project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Web Commons</name>
>   <artifactId>procdevref-webcommons</artifactId>
>   <packaging>war</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
> </project>
> --------------------------------------------------
> commons project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Commons</name>
>   <artifactId>procdevref-commons</artifactId>
>   <packaging>jar</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
> </project>
> When i Run it with "mvn -X clean install" I get:
> + Error stacktraces are turned on.
> Maven version: 2.0.4
> [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settin
> gs\celso.cs\.m2\plugin-registry.xml'
> [DEBUG] Building Maven global-level plugin registry from: 'C:\java\maven-2.0.4\b
> in\..\conf\plugin-registry.xml'
> [INFO] Scanning for projects...
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
> Project ID: globo:procdevref-web
> POM Location: C:\Projetos\ProcdevReferencia\web\pom.xml
> Validation Messages:
>     [0]  'dependencies.dependency.version' is missing for globo:procdevref-webco
> mmons
> Reason: Failed to validate POM

-- 
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-2241) Versions are required when it shouldn't with multi-modules projects and war dependencies

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

Benjamin Bentmann updated MNG-2241:
-----------------------------------

    Fix Version/s:     (was: 3.0-alpha-8)
                   3.x (to be reviewed)

The current behavior matches the [documented design|http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Management]. Changing this, if at all, needs to be coupled to a model version update to not affect dependency resolution for existing POMs.

> Versions are required when it shouldn't with multi-modules projects and war dependencies
> ----------------------------------------------------------------------------------------
>
>                 Key: MNG-2241
>                 URL: http://jira.codehaus.org/browse/MNG-2241
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>         Environment: Maven 2.0.4, Java 5, Windows XP
>            Reporter: Celso Gomes Barreto Junior
>             Fix For: 3.0-beta-1
>
>
> In a multi-project with a parent pom which should enforces modules's versions in dependencyManagement element, when I use a war dependnecy it starts to require the version declaration in child pom's dependencies. When I use jar dependencies, it works fine.
> {noformat}
> Project structure:
> parent project
>           |_ web (war)
>           |_ commons   (jar)
>           |_ webcommons (war)
> {noformat}
> --------------------------------------------------
> parent project pom:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <name>Procdev - Referência</name>
>   <groupId>globo</groupId>
>   <artifactId>procdevref</artifactId>
>   <packaging>pom</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
>   <modules>
>     <module>web</module>
>     <module>commons</module>
>     <module>webcommons</module>
>   </modules>
>   <dependencyManagement>
>     <dependencies>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-web</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-commons</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-webcommons</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>     </dependencies>
>   </dependencyManagement>
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.1</version>
>       <scope>test</scope>
>     </dependency>
>   </dependencies>
> </project>
> {code}
> --------------------------------------------------
> web project pom:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Web</name>
>   <artifactId>procdevref-web</artifactId>
>   <packaging>war</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
>   <dependencies>
>     <dependency>
>       <groupId>globo</groupId>
>       <artifactId>procdevref-webcommons</artifactId>
>       <type>war</type>
>     </dependency>
>     <dependency>
>       <groupId>globo</groupId>
>       <artifactId>procdevref-commons</artifactId>
>     </dependency>
>     <dependency>
>       <groupId>jstl</groupId>
>       <artifactId>jstl</artifactId>
>       <version>[1.1.2,]</version>
>     </dependency>
>     <dependency>
>       <groupId>taglibs</groupId>
>       <artifactId>standard</artifactId>
>       <version>[1.1.2,]</version>
>     </dependency>
>   </dependencies>
> </project>
> {code}
> --------------------------------------------------
> webcommons project pom:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Web Commons</name>
>   <artifactId>procdevref-webcommons</artifactId>
>   <packaging>war</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
> </project>
> {code}
> --------------------------------------------------
> commons project pom:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Commons</name>
>   <artifactId>procdevref-commons</artifactId>
>   <packaging>jar</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
> </project>
> {code}
> When i Run it with "mvn -X clean install" I get:
> {noformat}
> + Error stacktraces are turned on.
> Maven version: 2.0.4
> [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settings\celso.cs\.m2\plugin-registry.xml'
> [DEBUG] Building Maven global-level plugin registry from: 'C:\java\maven-2.0.4\bin\..\conf\plugin-registry.xml'
> [INFO] Scanning for projects...
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
> Project ID: globo:procdevref-web
> POM Location: C:\Projetos\ProcdevReferencia\web\pom.xml
> Validation Messages:
>     [0]  'dependencies.dependency.version' is missing for globo:procdevref-webcommons
> Reason: Failed to validate POM
> {noformat}

-- 
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-2241) Versions are required when it shouldn't with multi-modules projects and war dependencies

Posted by "Kenney Westerhof (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_99681 ] 

Kenney Westerhof commented on MNG-2241:
---------------------------------------

Specifying <type> in the dependencies in depMgt for deps that aren't <packaging>jar should solve this.

However this needs to be fixed. A more strict separation between packaging, types, and classifiers should be enforced.
The default of <type>jar</type> in a dependency is bogus - it needs to be the same as the <packaging> from the pom for that artifact/dependency.

Specifing, for instance, a test-jar dependency, you can say <type>test-jar</type>. Since this is not a derived artifact, classifiers don't apply here.
It's an alternative packaging, so <type>test-jar</type> is correct. Classifiers shouldn't apply here.
The same goes for attached assemblies. 
Are Javadoc and source jars considered derived or alternative? Since the source _could_ theoretically be derived from the main artifact, it could be a classifier,
though you'd miss the javadoc, so I think these are alternatives, and a <type> is wise here.

For war and ear artifacts, the packaging _is_ the main type; it's not an attachment, either derived or alternative, so <type> shouldn't be needed
in dependencies or dependencyManagement.

Also, i've never seen multiple classifiers for one type, where the type is not the main type.

Anyway, since this (<type>jar</type> being the default for dependencies) is documented, this should be a closed-won't fix, though since I disagree with
the spec/documentation I'll leave this open.


> Versions are required when it shouldn't with multi-modules projects and war dependencies
> ----------------------------------------------------------------------------------------
>
>                 Key: MNG-2241
>                 URL: http://jira.codehaus.org/browse/MNG-2241
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.0.4
>         Environment: Maven 2.0.4, Java 5, Windows XP
>            Reporter: Celso Gomes Barreto Junior
>             Fix For: 2.1.x
>
>
> In a multi-project with a parent pom which should enforces modules's versions in dependencyManagement element, when I use a war dependnecy it starts to require the version declaration in child pom's dependencies. When I use jar dependencies, it works fine.
> Project structure:
> parent project
>           |_ web (war)
>           |_ commons   (jar)
>           |_ webcommons (war)
> --------------------------------------------------
> parent project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <name>Procdev - Referência</name>
>   <groupId>globo</groupId>
>   <artifactId>procdevref</artifactId>
>   <packaging>pom</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
>   <modules>
>     <module>web</module>
>     <module>commons</module>
>     <module>webcommons</module>
>   </modules>
>   <dependencyManagement>
>     <dependencies>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-web</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-commons</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-webcommons</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>     </dependencies>
>   </dependencyManagement>
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.1</version>
>       <scope>test</scope>
>     </dependency>
>   </dependencies>
> </project>
> --------------------------------------------------
> web project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Web</name>
>   <artifactId>procdevref-web</artifactId>
>   <packaging>war</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
>   <dependencies>
>     <dependency>
>       <groupId>globo</groupId>
>       <artifactId>procdevref-webcommons</artifactId>
>       <type>war</type>
>     </dependency>
>     <dependency>
>       <groupId>globo</groupId>
>       <artifactId>procdevref-commons</artifactId>
>     </dependency>
>     <dependency>
>       <groupId>jstl</groupId>
>       <artifactId>jstl</artifactId>
>       <version>[1.1.2,]</version>
>     </dependency>
>     <dependency>
>       <groupId>taglibs</groupId>
>       <artifactId>standard</artifactId>
>       <version>[1.1.2,]</version>
>     </dependency>
>   </dependencies>
> </project>
> --------------------------------------------------
> webcommons project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Web Commons</name>
>   <artifactId>procdevref-webcommons</artifactId>
>   <packaging>war</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
> </project>
> --------------------------------------------------
> commons project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Commons</name>
>   <artifactId>procdevref-commons</artifactId>
>   <packaging>jar</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
> </project>
> When i Run it with "mvn -X clean install" I get:
> + Error stacktraces are turned on.
> Maven version: 2.0.4
> [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settin
> gs\celso.cs\.m2\plugin-registry.xml'
> [DEBUG] Building Maven global-level plugin registry from: 'C:\java\maven-2.0.4\b
> in\..\conf\plugin-registry.xml'
> [INFO] Scanning for projects...
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
> Project ID: globo:procdevref-web
> POM Location: C:\Projetos\ProcdevReferencia\web\pom.xml
> Validation Messages:
>     [0]  'dependencies.dependency.version' is missing for globo:procdevref-webco
> mmons
> Reason: Failed to validate POM

-- 
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-2241) Versions are required when it shouldn't with multi-modules projects and war dependencies

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2241?page=all ]

John Casey updated MNG-2241:
----------------------------

    Fix Version: 2.1

> Versions are required when it shouldn't with multi-modules projects and war dependencies
> ----------------------------------------------------------------------------------------
>
>          Key: MNG-2241
>          URL: http://jira.codehaus.org/browse/MNG-2241
>      Project: Maven 2
>         Type: Bug

>     Versions: 2.0.4
>  Environment: Maven 2.0.4, Java 5, Windows XP
>     Reporter: Celso Gomes Barreto Junior
>      Fix For: 2.1

>
>
> In a multi-project with a parent pom which should enforces modules's versions in dependencyManagement element, when I use a war dependnecy it starts to require the version declaration in child pom's dependencies. When I use jar dependencies, it works fine.
> Project structure:
> parent project
>           |_ web (war)
>           |_ commons   (jar)
>           |_ webcommons (war)
> --------------------------------------------------
> parent project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <name>Procdev - Referência</name>
>   <groupId>globo</groupId>
>   <artifactId>procdevref</artifactId>
>   <packaging>pom</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
>   <modules>
>     <module>web</module>
>     <module>commons</module>
>     <module>webcommons</module>
>   </modules>
>   <dependencyManagement>
>     <dependencies>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-web</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-commons</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>       <dependency>
>         <groupId>globo</groupId>
>         <artifactId>procdevref-webcommons</artifactId>
>         <version>${project.version}</version>
>       </dependency>
>     </dependencies>
>   </dependencyManagement>
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.1</version>
>       <scope>test</scope>
>     </dependency>
>   </dependencies>
> </project>
> --------------------------------------------------
> web project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Web</name>
>   <artifactId>procdevref-web</artifactId>
>   <packaging>war</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
>   <dependencies>
>     <dependency>
>       <groupId>globo</groupId>
>       <artifactId>procdevref-webcommons</artifactId>
>       <type>war</type>
>     </dependency>
>     <dependency>
>       <groupId>globo</groupId>
>       <artifactId>procdevref-commons</artifactId>
>     </dependency>
>     <dependency>
>       <groupId>jstl</groupId>
>       <artifactId>jstl</artifactId>
>       <version>[1.1.2,]</version>
>     </dependency>
>     <dependency>
>       <groupId>taglibs</groupId>
>       <artifactId>standard</artifactId>
>       <version>[1.1.2,]</version>
>     </dependency>
>   </dependencies>
> </project>
> --------------------------------------------------
> webcommons project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Web Commons</name>
>   <artifactId>procdevref-webcommons</artifactId>
>   <packaging>war</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
> </project>
> --------------------------------------------------
> commons project pom:
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <parent>
>     <groupId>globo</groupId>
>     <artifactId>procdevref</artifactId>
>     <version>0.0.1</version>
>   </parent>
>   <name>Procdev Commons</name>
>   <artifactId>procdevref-commons</artifactId>
>   <packaging>jar</packaging>
>   <version>0.0.1</version>
>   <description>no</description>
> </project>
> When i Run it with "mvn -X clean install" I get:
> + Error stacktraces are turned on.
> Maven version: 2.0.4
> [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settin
> gs\celso.cs\.m2\plugin-registry.xml'
> [DEBUG] Building Maven global-level plugin registry from: 'C:\java\maven-2.0.4\b
> in\..\conf\plugin-registry.xml'
> [INFO] Scanning for projects...
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
> Project ID: globo:procdevref-web
> POM Location: C:\Projetos\ProcdevReferencia\web\pom.xml
> Validation Messages:
>     [0]  'dependencies.dependency.version' is missing for globo:procdevref-webco
> mmons
> Reason: Failed to validate POM

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