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

Paul Gier updated MDEP-298:
---------------------------

    Fix Version/s: 2.6
         Assignee: Paul Gier  (was: Brian Fox)
    
> mvn dependency:sources lists parameters 'classifier' and 'type', but manually 
> overrides them
> --------------------------------------------------------------------------------------------
>
>                 Key: MDEP-298
>                 URL: https://jira.codehaus.org/browse/MDEP-298
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>          Components: sources
>    Affects Versions: 2.1
>            Reporter: Sean Patrick Floyd
>            Assignee: Paul Gier
>             Fix For: 2.6
>
>
> The documentation of dependency:sources lists the parameters
> - type 
> http://maven.apache.org/plugins/maven-dependency-plugin/sources-mojo.html#type
> - classifier 
> http://maven.apache.org/plugins/maven-dependency-plugin/sources-mojo.html#classifier
> This suggests that the mojo could be used to resolve other artifact types as 
> well, a functionality that was requested today in this StackOverflow 
> question: http://stackoverflow.com/q/4734407/342852
> e.g.
> {code}
> mvn dependency:sources -Dclassifier=javadoc -Dtype=jar
> {code}
> But in the 
> org.apache.maven.plugin.dependency.resolvers.ResolveDependencySourcesMojo 
> source code, both parameters are manually overwritten with the constant 
> values 'java-source' and 'sources', respectively.
> {code}
> this.classifier = SOURCE_CLASSIFIER;
> this.type = SOURCE_TYPE;
> {code}
> This is clearly in violation of the documented behavior. I suggest these 
> assignments to be replaced with the following code:
> {code}
> if(StringUtils.isEmpty(this.classifier)){
>     this.classifier=SOURCE_CLASSIFIER;
> }
> if(StringUtils.isEmpty(this.type)){
>     this.type=SOURCE_TYPE;
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to