You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Sean Patrick Floyd (JIRA)" <ji...@codehaus.org> on 2011/01/19 12:38:57 UTC
[jira] Created: (MDEP-298) mvn dependency:sources lists parameters
'classifier' and 'type', but manually overrides them
mvn dependency:sources lists parameters 'classifier' and 'type', but manually overrides them
--------------------------------------------------------------------------------------------
Key: MDEP-298
URL: http://jira.codehaus.org/browse/MDEP-298
Project: Maven 2.x Dependency Plugin
Issue Type: Bug
Affects Versions: 2.1
Reporter: Sean Patrick Floyd
Assignee: Brian Fox
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 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] (MDEP-298) mvn dependency:sources lists parameters
'classifier' and 'type', but manually overrides them
Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MDEP-298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Gier closed MDEP-298.
--------------------------
Resolution: Fixed
Fixed by MDEP-205 in [r1400457|http://svn.apache.org/viewvc?view=revision&revision=1400457].
> 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
[jira] (MDEP-298) mvn dependency:sources lists parameters
'classifier' and 'type', but manually overrides them
Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
[ 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
[jira] (MDEP-298) mvn dependency:sources lists parameters
'classifier' and 'type', but manually overrides them
Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MDEP-298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Gier updated MDEP-298:
---------------------------
Component/s: sources
> 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: Brian Fox
>
> 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