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

Michael Osipov updated MNG-5415:
--------------------------------
    Labels: close-pending  (was: )

> Duplicate dependency with property causes the build to fail
> -----------------------------------------------------------
>
>                 Key: MNG-5415
>                 URL: https://issues.apache.org/jira/browse/MNG-5415
>             Project: Maven
>          Issue Type: Bug
>          Components: Plugins and Lifecycle
>    Affects Versions: 3.0.3, 3.0.4
>         Environment: $ mvn -version
> Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
> Maven home: /usr/share/maven
> Java version: 1.7.0_09, vendor: Oracle Corporation
> Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "mac os x", version: "10.8.2", arch: "x86_64", family: "mac"
>            Reporter: Tarje Killingberg
>              Labels: close-pending
>         Attachments: my-app.zip
>
>
> The following excerpt from a _pom.xml_ file causes just about any maven 
> command (e.g. {{mvn package}}) to fail with the error 
> _'dependencies.dependency.version' for junit:junit:jar is missing_:
> {code}
> <properties>
>     <my.type>jar</my.type>
>     <my.other.type>jar</my.other.type>
> </properties>
> <dependencyManagement>
>     <dependencies>
>         <dependency>
>             <groupId>junit</groupId>
>             <artifactId>junit</artifactId>
>             <version>4.10</version>
>             <type>${my.type}</type>
>         </dependency>
>         <dependency>
>             <artifactId>junit</artifactId>
>             <groupId>junit</groupId>
>             <version>4.10</version>
>             <type>${my.other.type}</type>
>         </dependency>
>     </dependencies>
> </dependencyManagement>
> <dependencies>
>     <dependency>
>         <artifactId>junit</artifactId>
>         <groupId>junit</groupId>
>         <type>${my.type}</type>
>     </dependency>
>     <dependency>
>         <artifactId>junit</artifactId>
>         <groupId>junit</groupId>
>         <type>${my.other.type}</type>
>         <optional>true</optional>
>     </dependency>
> </dependencies>
> {code}
> If the string _jar_ is used instead of the properties, the build succeeds 
> with warnings.
> A SSCCE is attached. Running the command {{mvn validate}} inside the 
> _my-app_-folder should show the symptom.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to