You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Stephen Connolly (JIRA)" <ji...@codehaus.org> on 2011/07/14 09:44:42 UTC

[jira] Closed: (MDEP-270) mvn dependency:sources fails to download sources for dependencies with

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

Stephen Connolly closed MDEP-270.
---------------------------------

    Resolution: Won't Fix

The artifact in question is not following maven conventions.

The maven convention is to have one GAV coordinate for each artifact, so there really should be a <artifactId>json-lib-jdk15</artifactId> not a classifier.

Part of the logic for this is that dependencies for jdk15 may be different than for jdk14 and using classifiers does not allow for different dependencies. 

The other indicator that this artifact is not following the maven conventions is that they have deployed two different sets of sources.

This plugin goal assumes that your artifacts are following the Maven conventions... maven is all about the conventions after all. Pester the project to follow the maven conventions as I do not see the value in adding a hack into the dependency plugin just to support one project that is not following the conventions.

> mvn dependency:sources fails to download sources for dependencies with <classifier>
> -----------------------------------------------------------------------------------
>
>                 Key: MDEP-270
>                 URL: https://jira.codehaus.org/browse/MDEP-270
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>          Components: sources
>    Affects Versions: 2.1
>         Environment: Mac OS 10.6
>            Reporter: Peter Niederwieser
>            Assignee: Brian Fox
>            Priority: Critical
>
> Given the following dependency:
> {noformat}
> <dependency>
>   <groupId>net.sf.json-lib</groupId>
>   <artifactId>json-lib</artifactId>
>   <version>2.3</version>
>   <classifier>jdk15</classifier>
>   <optional>true</optional>
> </dependency>
> {noformat}
> "mvn dependency:sources" fails to download the sources although they are clearly in Maven Central (see http://repo2.maven.org/maven2/net/sf/json-lib/json-lib/2.3/). My guess is that the "jdk15" classifier is overridden with "sources".
> Workaround is to use "mvn dependency:resolve -Dclassifier=jdk15-sources", which seems to work. Of course, you'd have to do this for every dependency that has a classifier. Also, most people won't even get that far. They will simply think that the sources are not available.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira