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
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