archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1367108 - in /archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository: content/RepositoryRequest.java metadata/MetadataTools.java
Date Mon, 30 Jul 2012 14:39:46 GMT
Author: olamy
Date: Mon Jul 30 14:39:46 2012
New Revision: 1367108

URL: http://svn.apache.org/viewvc?rev=1367108&view=rev
Log:
use a static final String

Modified:
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/RepositoryRequest.java
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/RepositoryRequest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/RepositoryRequest.java?rev=1367108&r1=1367107&r2=1367108&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/RepositoryRequest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/RepositoryRequest.java
Mon Jul 30 14:39:46 2012
@@ -19,17 +19,17 @@ package org.apache.archiva.repository.co
  * 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.

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java?rev=1367108&r1=1367107&r2=1367108&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/MetadataTools.java
Mon Jul 30 14:39:46 2012
@@ -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 = '.';



Mime
View raw message