diff --git a/sandbox/repoclean/pom.xml b/sandbox/repoclean/pom.xml index eaecaafde8..54b7db7224 100644 --- a/sandbox/repoclean/pom.xml +++ b/sandbox/repoclean/pom.xml @@ -10,7 +10,7 @@ org.codehaus.plexus plexus-container-default - 1.0-alpha-7-SNAPSHOT + 1.0-alpha-8 plexus @@ -20,27 +20,27 @@ plexus plexus-mail-sender-simple - 1.0-alpha-1 + 1.0-alpha-2 org.apache.maven maven-artifact - 2.0-beta-1 + 2.0 org.apache.maven maven-project - 2.0-beta-1 + 2.0 org.apache.maven maven-artifact-manager - 2.0-beta-1 + 2.0 org.apache.maven maven-model - 2.0-beta-1 + 2.0 all diff --git a/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/LegacyArtifactDiscoverer.java b/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/LegacyArtifactDiscoverer.java index f40c8244bd..b8100ac325 100644 --- a/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/LegacyArtifactDiscoverer.java +++ b/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/LegacyArtifactDiscoverer.java @@ -19,6 +19,7 @@ package org.apache.maven.tools.repoclean.discover; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.tools.repoclean.report.PathLister; +import org.apache.maven.tools.repoclean.report.ReportWriteException; import org.apache.maven.tools.repoclean.report.Reporter; import org.codehaus.plexus.util.StringUtils; @@ -41,7 +42,7 @@ public class LegacyArtifactDiscoverer public List discoverArtifacts( File repositoryBase, Reporter reporter, String blacklistedPatterns, PathLister excludeLister, PathLister kickoutLister, boolean includeSnapshots ) - throws Exception + throws ReportWriteException { List artifacts = new ArrayList(); @@ -65,7 +66,7 @@ public class LegacyArtifactDiscoverer } private Artifact buildArtifact( String path, PathLister kickoutLister ) - throws Exception + throws ReportWriteException { try { @@ -288,8 +289,7 @@ public class LegacyArtifactDiscoverer { getLogger().debug( "Creating artifact with classifier." ); - result = artifactFactory.createArtifactWithClassifier( groupId, artifactId, version, - Artifact.SCOPE_RUNTIME, type, + result = artifactFactory.createArtifactWithClassifier( groupId, artifactId, version, type, classifierBuffer.toString() ); } else diff --git a/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/translate/PomV3ToV4Translator.java b/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/translate/PomV3ToV4Translator.java index e78de24e27..4b6718e0a1 100644 --- a/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/translate/PomV3ToV4Translator.java +++ b/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/translate/PomV3ToV4Translator.java @@ -20,6 +20,7 @@ import org.apache.maven.model.Build; import org.apache.maven.model.CiManagement; import org.apache.maven.model.Contributor; import org.apache.maven.model.Dependency; +import org.apache.maven.model.DeploymentRepository; import org.apache.maven.model.Developer; import org.apache.maven.model.DistributionManagement; import org.apache.maven.model.IssueManagement; @@ -31,7 +32,6 @@ import org.apache.maven.model.Organization; import org.apache.maven.model.Plugin; import org.apache.maven.model.ReportPlugin; import org.apache.maven.model.Reporting; -import org.apache.maven.model.Repository; import org.apache.maven.model.Resource; import org.apache.maven.model.Scm; import org.apache.maven.model.Site; @@ -426,13 +426,13 @@ public class PomV3ToV4Translator String distributionDirectory = v3Model.getDistributionDirectory(); - Repository repository = null; + DeploymentRepository repository = null; if ( StringUtils.isEmpty( distributionSite ) ) { if ( !StringUtils.isEmpty( distributionDirectory ) ) { - repository = new Repository(); + repository = new DeploymentRepository(); repository.setId( "default" ); @@ -451,7 +451,7 @@ public class PomV3ToV4Translator "Missing 'distributionDirectory': must be set is 'distributionSite' is set." ); } - repository = new Repository(); + repository = new DeploymentRepository(); repository.setId( "default" );