o Fixed NPE in LegacyArtifactDiscoverer when the resulting Artifact from the buildArtifact() method is null (was an errant debug statement)

o Removed requirement and attempt at copying wagon-http-lightweight when ./install.sh runs.
o Cleaned up the output from ./repoclean.sh to remove a couple debug lines
o Fixed components.xml to comply with the new component refactorings (simplified RepositoryCleaner using two new processing phases: DiscoveryPhase and RewritePhase, with NO common interface)

We should be ready to process mixed bags of m1 and m2 poms in the same source repo now!

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@169330 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2005-05-09 15:36:32 +00:00
parent 637c0f815b
commit 17c195e01d
4 changed files with 44 additions and 19 deletions

View File

@ -65,8 +65,6 @@ ret=$?; if [ $ret != 0 ]; then exit $ret; fi
cp -f $2/org/apache/maven/wagon/wagon-file/1.0-alpha-2/wagon-file-1.0-alpha-2.jar $1/lib
cp -f $2/org/apache/maven/wagon/wagon-http-lightweight/1.0-alpha-2/wagon-http-lightweight-1.0-alpha-2.jar $1/lib
echo "Copying startup script, and changing its permissions to '+x'..."
echo ""

View File

@ -2,19 +2,14 @@
mypath=`which $0`
echo "mypath: $mypath"
mydir=`pwd`
if [ "" != "$mypath" ]; then
echo "Setting mydir based on mypath..."
mydir=`dirname $mypath`
fi
echo "mydir: $mydir"
CP=$mydir/lib/repoclean-1.0-SNAPSHOT.jar
for lib in `ls -1 $mydir/lib | grep -v 'repoclean'`
@ -46,4 +41,4 @@ if [ -z "$JAVA_HOME" ]; then
JAVA_HOME=/usr/local/java
fi
nice -n 19 $JAVA_HOME/bin/java -Xmx128M -Xms64M -Xincgc $JAVA_OPTS -classpath ${CP} org.apache.maven.tools.repoclean.Main $* | tee repoclean-log.txt
nice -n 19 $JAVA_HOME/bin/java -Xmx128M -Xms64M -Xincgc $JAVA_OPTS -classpath ${CP} org.apache.maven.tools.repoclean.Main $*

View File

@ -18,6 +18,7 @@ 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.Reporter;
import org.codehaus.plexus.util.StringUtils;
import java.io.File;
import java.util.ArrayList;
@ -293,18 +294,23 @@ public class LegacyArtifactDiscoverer
}
else
{
result = artifactFactory.createArtifact( groupId, artifactId, version, Artifact.SCOPE_RUNTIME, type );
if ( StringUtils.isNotEmpty( groupId ) && StringUtils.isNotEmpty( artifactId )
&& StringUtils.isNotEmpty( version ) && StringUtils.isNotEmpty( type ) )
{
result = artifactFactory
.createArtifact( groupId, artifactId, version, Artifact.SCOPE_RUNTIME, type );
}
}
getLogger().debug(
"Resulting artifact is: " + result.getId() + " and has classifier of: "
+ result.getClassifier() + "\n\n" );
// getLogger().debug(
// "Resulting artifact is: " + result + " and has classifier of: "
// + result.getClassifier() + "\n\n" );
return result;
}
catch ( RuntimeException e )
{
getLogger().error( "While parsing artifact path: \'" + path + "\'...\n\n", e );
getLogger().error( "While parsing artifact path: \'" + path + "\'...", e );
throw e;
}

View File

@ -3,6 +3,38 @@
<component>
<role>org.apache.maven.tools.repoclean.RepositoryCleaner</role>
<implementation>org.apache.maven.tools.repoclean.RepositoryCleaner</implementation>
<requirements>
<requirement>
<role>org.apache.maven.tools.repoclean.index.ArtifactIndexer</role>
</requirement>
<requirement>
<role>org.codehaus.plexus.mailsender.MailSender</role>
</requirement>
<requirement>
<role>org.apache.maven.tools.repoclean.phase.DiscoveryPhase</role>
</requirement>
<requirement>
<role>org.apache.maven.tools.repoclean.phase.RewritePhase</role>
</requirement>
</requirements>
</component>
<!--
|
|
|
-->
<component>
<role>org.apache.maven.tools.repoclean.phase.DiscoveryPhase</role>
<implementation>org.apache.maven.tools.repoclean.phase.DiscoveryPhase</implementation>
</component>
<!--
|
|
|
-->
<component>
<role>org.apache.maven.tools.repoclean.phase.RewritePhase</role>
<implementation>org.apache.maven.tools.repoclean.phase.RewritePhase</implementation>
<requirements>
<requirement>
<role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role>
@ -12,12 +44,6 @@
<requirement>
<role>org.apache.maven.tools.repoclean.digest.DigestVerifier</role>
</requirement>
<requirement>
<role>org.apache.maven.tools.repoclean.index.ArtifactIndexer</role>
</requirement>
<requirement>
<role>org.codehaus.plexus.mailsender.MailSender</role>
</requirement>
</requirements>
</component>
<!--