From 7354da04d42c7e2afab4ce28a2c45cd9ea28c783 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 12 Dec 2011 00:25:27 +0000 Subject: try a better fix for unit failure on windauze git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1213120 13f79535-47bb-0310-9956-ffa450edef68 --- .../storage/maven2/Maven2RepositoryPathTranslator.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'archiva-modules/plugins/maven2-repository/src/main') diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryPathTranslator.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryPathTranslator.java index 4dbab61fe..734f4133f 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryPathTranslator.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryPathTranslator.java @@ -22,6 +22,8 @@ package org.apache.archiva.metadata.repository.storage.maven2; import org.apache.archiva.metadata.model.ArtifactMetadata; import org.apache.archiva.metadata.repository.storage.RepositoryPathTranslator; import org.apache.archiva.common.utils.VersionUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import javax.annotation.PostConstruct; @@ -38,11 +40,17 @@ import java.util.regex.Pattern; public class Maven2RepositoryPathTranslator implements RepositoryPathTranslator { - private static final char PATH_SEPARATOR = '/'; + + private Logger log = LoggerFactory.getLogger( getClass() ); + + private static final char PATH_SEPARATOR = File.separatorChar;// '/'; private static final char GROUP_SEPARATOR = '.'; private static final Pattern TIMESTAMP_PATTERN = Pattern.compile( "([0-9]{8}.[0-9]{6})-([0-9]+).*" ); + + + private static final Pattern MAVEN_PLUGIN_PATTERN = Pattern.compile( "^(maven-.*-plugin)|(.*-maven-plugin)$" ); /** * @@ -59,7 +67,6 @@ public class Maven2RepositoryPathTranslator @PostConstruct public void initialize() { - //artifactMappingProviders = new ArrayList( // applicationContext.getBeansOfType( ArtifactMappingProvider.class ).values() ); @@ -323,7 +330,6 @@ public class Maven2RepositoryPathTranslator return metadata; } - private static final Pattern MAVEN_PLUGIN_PATTERN = Pattern.compile( "^(maven-.*-plugin)|(.*-maven-plugin)$" ); public boolean isArtifactIdValidMavenPlugin( String artifactId ) { -- cgit v1.2.3