diff --git a/archiva-base/archiva-configuration/pom.xml b/archiva-base/archiva-configuration/pom.xml
index 62378e4d5..f9609b078 100644
--- a/archiva-base/archiva-configuration/pom.xml
+++ b/archiva-base/archiva-configuration/pom.xml
@@ -36,6 +36,10 @@
org.apache.maven.archiva
archiva-policies
+
+ org.apache.maven.archiva
+ archiva-model
+
org.codehaus.plexus
plexus-component-api
diff --git a/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo b/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
index 69b967129..0d903b125 100644
--- a/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
+++ b/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
@@ -48,7 +48,7 @@
repositories
1.0.0
-
@@ -105,6 +105,17 @@
The list of network proxies to use for outgoing requests.
+
+ legacyArtifactPaths
+ 1.0.0+
+
+ LegacyArtifactPath
+ *
+
+
+ The list of custom legacy path to artifact.
+
+
repositoryScanning
1.0.0+
@@ -156,10 +167,10 @@
}
return map;
}
-
+
public java.util.Map> getProxyConnectorAsMap()
{
- java.util.Map> proxyConnectorMap =
+ java.util.Map> proxyConnectorMap =
new java.util.HashMap>();
java.util.Iterator it = proxyConnectors.iterator();
@@ -181,7 +192,7 @@
}
return proxyConnectorMap;
- }
+ }
public java.util.Map getRemoteRepositoriesAsMap()
{
@@ -247,7 +258,7 @@
-
diff --git a/archiva-base/archiva-configuration/src/main/resources/org/apache/maven/archiva/configuration/default-archiva.xml b/archiva-base/archiva-configuration/src/main/resources/org/apache/maven/archiva/configuration/default-archiva.xml
index 74e5cad53..87cf71e92 100644
--- a/archiva-base/archiva-configuration/src/main/resources/org/apache/maven/archiva/configuration/default-archiva.xml
+++ b/archiva-base/archiva-configuration/src/main/resources/org/apache/maven/archiva/configuration/default-archiva.xml
@@ -71,6 +71,13 @@
+
+
+ jaxen/jars/jaxen-1.0-FCS-full.jar
+ jaxen:jaxen:1.0-FCS:full:jar
+
+
+
diff --git a/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/LegacyArtifactPathTest.java b/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/LegacyArtifactPathTest.java
new file mode 100644
index 000000000..c8e16ddc9
--- /dev/null
+++ b/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/LegacyArtifactPathTest.java
@@ -0,0 +1,59 @@
+package org.apache.maven.archiva.configuration;
+
+import junit.framework.TestCase;
+
+import org.apache.maven.archiva.model.ArtifactReference;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Test the generated LegacyArtifactPath class from Modello. This is primarily to test the hand coded methods.
+ */
+public class LegacyArtifactPathTest
+ extends TestCase
+{
+
+ private LegacyArtifactPath legacyArtifactPath = new LegacyArtifactPath();
+
+ public void testLegacyArtifactPathWithClassifierResolution()
+ {
+ legacyArtifactPath.setArtifact( "groupId:artifactId:version:classifier:type" );
+
+ ArtifactReference artifact = legacyArtifactPath.getArtifactReference();
+ assertEquals( "groupId", artifact.getGroupId() );
+ assertEquals( "artifactId", artifact.getArtifactId() );
+ assertEquals( "version", artifact.getVersion() );
+ assertEquals( "classifier", artifact.getClassifier() );
+ assertEquals( "type", artifact.getType() );
+ }
+
+
+ public void testLegacyArtifactPathWithoutClassifierResolution()
+ {
+ legacyArtifactPath.setArtifact( "groupId:artifactId:version::type" );
+
+ ArtifactReference artifact = legacyArtifactPath.getArtifactReference();
+ assertEquals( "groupId", artifact.getGroupId() );
+ assertEquals( "artifactId", artifact.getArtifactId() );
+ assertEquals( "version", artifact.getVersion() );
+ assertEquals( null, artifact.getClassifier() );
+ assertEquals( "type", artifact.getType() );
+ }
+}