aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/plugins
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2011-12-12 00:25:27 +0000
committerOlivier Lamy <olamy@apache.org>2011-12-12 00:25:27 +0000
commit7354da04d42c7e2afab4ce28a2c45cd9ea28c783 (patch)
tree9fd8a5ad2bdddeddceebd41a3e956610a5dcf9c5 /archiva-modules/plugins
parentbe4c947c171dfc80060aac5e5fd9c518dfbb897c (diff)
downloadarchiva-7354da04d42c7e2afab4ce28a2c45cd9ea28c783.tar.gz
archiva-7354da04d42c7e2afab4ce28a2c45cd9ea28c783.zip
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
Diffstat (limited to 'archiva-modules/plugins')
-rw-r--r--archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryPathTranslator.java12
-rw-r--r--archiva-modules/plugins/stage-repository-merge/pom.xml3
-rw-r--r--archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java6
3 files changed, 17 insertions, 4 deletions
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<ArtifactMappingProvider>(
// 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 )
{
diff --git a/archiva-modules/plugins/stage-repository-merge/pom.xml b/archiva-modules/plugins/stage-repository-merge/pom.xml
index 491ad48ed..71d05dcad 100644
--- a/archiva-modules/plugins/stage-repository-merge/pom.xml
+++ b/archiva-modules/plugins/stage-repository-merge/pom.xml
@@ -91,7 +91,8 @@
org.apache.archiva.model;version=${project.version},
org.apache.archiva.repository*;version=${project.version},
org.apache.commons.io;version="[1.4,2)",
- org.springframework*;version="[3,4)"
+ org.springframework*;version="[3,4)",
+ org.slf4j;resolution:=optional
</Import-Package>
</instructions>
</configuration>
diff --git a/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java b/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java
index da4d46c15..ab7bd991c 100644
--- a/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java
+++ b/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java
@@ -35,6 +35,8 @@ import org.apache.archiva.repository.metadata.RepositoryMetadataException;
import org.apache.archiva.repository.metadata.RepositoryMetadataReader;
import org.apache.archiva.repository.metadata.RepositoryMetadataWriter;
import org.apache.commons.io.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import javax.inject.Inject;
@@ -59,6 +61,8 @@ import java.util.TimeZone;
public class Maven2RepositoryMerger
implements RepositoryMerger
{
+
+ private Logger log = LoggerFactory.getLogger( getClass() );
/**
*
*/
@@ -135,6 +139,8 @@ public class Maven2RepositoryMerger
String sourceRepoPath = sourceRepoConfig.getLocation();
+
+
String artifactPath = pathTranslator.toPath( artifactMetadata.getNamespace(), artifactMetadata.getProject(),
artifactMetadata.getProjectVersion(), artifactMetadata.getId() );