You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2007/11/16 04:41:26 UTC
[jira] Updated: (MRM-596) regression : cannot get java-sources
anymore from maven1
[ http://jira.codehaus.org/browse/MRM-596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter updated MRM-596:
-----------------------------
Fix Version/s: 1.0
> regression : cannot get java-sources anymore from maven1
> --------------------------------------------------------
>
> Key: MRM-596
> URL: http://jira.codehaus.org/browse/MRM-596
> Project: Archiva
> Issue Type: Bug
> Components: WebDAV interface
> Affects Versions: 1.0-beta-4
> Reporter: nicolas de loof
> Priority: Minor
> Fix For: 1.0
>
>
> requesting "junit/java-sources/junit-3.8.1-sources.jar" fails.
> Path is converted internally to
> groupId = junit
> artifactId = junit
> version = 3.8.1-sources
> type = jar
> I can publish a fix for this, but my workspace contains other modified code and I can hardly create a dedicated patch.
> The idea is to create a ArtifactClassifierMapping similar to existing ArtifactExtensionMapping, and to use it in LegacyPathParser :
> {quote}
> // Sanity Check: does extension match pathType on path?
> String trimPathType = expectedType.substring( 0, expectedType.length() - 1 );
> String expectedExtension = ArtifactExtensionMapping.getExtension( trimPathType );
> {color:red}
> artifact.setType( expectedExtension );
> String classifier = ArtifactClassifierMapping.getClassifier( trimPathType );
> if ( classifier != null )
> {
> String version = artifact.getVersion();
> if ( ! version.endsWith( "-" + classifier ) )
> {
> throw new LayoutException( INVALID_ARTIFACT_PATH + expectedType + " artifacts must use the classifier " + classifier );
> }
> version = version.substring( 0, version.length() - classifier.length() - 1 );
> artifact.setVersion( version );
> artifact.setClassifier( classifier );
> }
> {color}
> {quote}
--
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