aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-repository-layer
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-07-30 14:39:46 +0000
committerOlivier Lamy <olamy@apache.org>2012-07-30 14:39:46 +0000
commit67adb61834f86e77e3344688475173829cadce6a (patch)
treeed3bfd19980660b04e3fcfe893a744441f625ad5 /archiva-modules/archiva-base/archiva-repository-layer
parent3c805f8f2db934930f537496591c147c332c4708 (diff)
downloadarchiva-67adb61834f86e77e3344688475173829cadce6a.tar.gz
archiva-67adb61834f86e77e3344688475173829cadce6a.zip
use a static final String
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1367108 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-repository-layer')
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/RepositoryRequest.java14
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java2
2 files changed, 8 insertions, 8 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/RepositoryRequest.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/RepositoryRequest.java
index dcf825031..73c53cf83 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/RepositoryRequest.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/RepositoryRequest.java
@@ -19,17 +19,17 @@ package org.apache.archiva.repository.content;
* under the License.
*/
-import org.apache.commons.lang.StringUtils;
import org.apache.archiva.model.ArtifactReference;
import org.apache.archiva.repository.ManagedRepositoryContent;
import org.apache.archiva.repository.layout.LayoutException;
import org.apache.archiva.repository.metadata.MetadataTools;
+import org.apache.commons.lang.StringUtils;
/**
* RepositoryRequest is used to determine the type of request that is incoming, and convert it to an appropriate
* ArtifactReference.
- *
- *
+ * <p/>
+ * <p/>
* <p/>
*/
public class RepositoryRequest
@@ -38,7 +38,7 @@ public class RepositoryRequest
private PathParser legacyPathParser;
- public RepositoryRequest (LegacyPathParser legacyPathParser)
+ public RepositoryRequest( LegacyPathParser legacyPathParser )
{
this.legacyPathParser = legacyPathParser;
}
@@ -104,16 +104,14 @@ public class RepositoryRequest
}
/**
- *
* @param requestedPath
* @return true if the requestedPath is likely an archetype catalog request.
*/
public boolean isArchetypeCatalog( String requestedPath )
{
- //TODO: Make it static final String
- return requestedPath.endsWith( "/archetype-catalog.xml");
+ return requestedPath.endsWith( "/" + MetadataTools.MAVEN_ARCHETYPE_CATALOG );
}
-
+
/**
* <p>
* Tests the path to see if it conforms to the expectations of a support file request.
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java
index c9ae1301a..3ad07b8ff 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java
@@ -85,6 +85,8 @@ public class MetadataTools
public static final String MAVEN_METADATA = "maven-metadata.xml";
+ public static final String MAVEN_ARCHETYPE_CATALOG ="archetype-catalog.xml";
+
private static final char PATH_SEPARATOR = '/';
private static final char GROUP_SEPARATOR = '.';