[MRM-622]

- fixed up DaysOldRepositoryPurge
- added test case for the fix
- updated existing test cases
- replaced actual jar and pom files used in the test cases with dummies 


git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@614840 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maria Odea B. Ching 2008-01-24 11:07:09 +00:00
parent 963aa1c3bc
commit cdeba3edab
148 changed files with 264 additions and 1846 deletions

View File

@ -1,23 +1,23 @@
package org.apache.maven.archiva.consumers.core.repository; package org.apache.maven.archiva.consumers.core.repository;
/* /*
* Licensed to the Apache Software Foundation (ASF) under one * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information * distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file * regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the * to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance * "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at * with the License. You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an * software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
import org.apache.commons.lang.time.DateUtils; import org.apache.commons.lang.time.DateUtils;
import org.apache.maven.archiva.common.utils.VersionComparator; import org.apache.maven.archiva.common.utils.VersionComparator;
@ -44,7 +44,7 @@ import java.util.regex.Matcher;
/** /**
* Purge from repository all snapshots older than the specified days in the repository configuration. * Purge from repository all snapshots older than the specified days in the repository configuration.
* *
* @author <a href="mailto:oching@apache.org">Maria Odea Ching</a> * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
*/ */
public class DaysOldRepositoryPurge public class DaysOldRepositoryPurge
@ -53,11 +53,11 @@ public class DaysOldRepositoryPurge
private SimpleDateFormat timestampParser; private SimpleDateFormat timestampParser;
private int daysOlder; private int daysOlder;
private int retentionCount; private int retentionCount;
public DaysOldRepositoryPurge( ManagedRepositoryContent repository, ArtifactDAO artifactDao, public DaysOldRepositoryPurge( ManagedRepositoryContent repository, ArtifactDAO artifactDao, int daysOlder,
int daysOlder, int retentionCount, Map<String, RepositoryContentIndex> indices ) int retentionCount, Map<String, RepositoryContentIndex> indices )
{ {
super( repository, artifactDao, indices ); super( repository, artifactDao, indices );
this.daysOlder = daysOlder; this.daysOlder = daysOlder;
@ -92,47 +92,49 @@ public class DaysOldRepositoryPurge
List<String> versions = new ArrayList<String>( repository.getVersions( reference ) ); List<String> versions = new ArrayList<String>( repository.getVersions( reference ) );
Collections.sort( versions, VersionComparator.getInstance() ); Collections.sort( versions, VersionComparator.getInstance() );
if ( retentionCount > versions.size() )
// Is this a generic snapshot "1.0-SNAPSHOT" ?
if ( VersionUtil.isGenericSnapshot( artifact.getVersion() ) )
{ {
if ( artifactFile.lastModified() < olderThanThisDate.getTimeInMillis() ) // Done. nothing to do here. skip it.
{ return;
if ( retentionCount > versions.size() )
{
// Done. nothing to do here. skip it.
return;
}
purgeArtifact( versions, artifactFile );
}
} }
// Is this a timestamp snapshot "1.0-20070822.123456-42" ?
else if ( VersionUtil.isUniqueSnapshot( artifact.getVersion() ) ) int countToPurge = versions.size() - retentionCount;
for ( String version : versions )
{ {
Calendar timestampCal = uniqueSnapshotToCalendar( artifact.getVersion() ); if ( countToPurge-- <= 0 )
{
if ( timestampCal.getTimeInMillis() < olderThanThisDate.getTimeInMillis() ) break;
{
if ( retentionCount > versions.size() )
{
// Done. nothing to do here. skip it.
return;
}
purgeArtifact( versions, artifactFile );
} }
else if ( artifactFile.lastModified() < olderThanThisDate.getTimeInMillis() )
{
if ( retentionCount > versions.size() ) ArtifactReference newArtifactReference =
repository.toArtifactReference( artifactFile.getAbsolutePath() );
newArtifactReference.setVersion( version );
File newArtifactFile = repository.toFile( newArtifactReference );
// Is this a generic snapshot "1.0-SNAPSHOT" ?
if ( VersionUtil.isGenericSnapshot( newArtifactReference.getVersion() ) )
{
if ( newArtifactFile.lastModified() < olderThanThisDate.getTimeInMillis() )
{ {
// Done. nothing to do here. skip it. doPurgeAllRelated( newArtifactReference );
return; }
}
// Is this a timestamp snapshot "1.0-20070822.123456-42" ?
else if ( VersionUtil.isUniqueSnapshot( newArtifactReference.getVersion() ) )
{
Calendar timestampCal = uniqueSnapshotToCalendar( newArtifactReference.getVersion() );
if ( timestampCal.getTimeInMillis() < olderThanThisDate.getTimeInMillis() )
{
doPurgeAllRelated( newArtifactReference );
}
else if ( newArtifactFile.lastModified() < olderThanThisDate.getTimeInMillis() )
{
doPurgeAllRelated( newArtifactReference );
} }
purgeArtifact( versions, artifactFile );
} }
} }
} }
@ -179,10 +181,9 @@ public class DaysOldRepositoryPurge
return null; return null;
} }
private void doPurgeAllRelated( File artifactFile ) throws LayoutException private void doPurgeAllRelated( ArtifactReference reference )
throws LayoutException
{ {
ArtifactReference reference = repository.toArtifactReference( artifactFile.getAbsolutePath() );
try try
{ {
Set<ArtifactReference> related = repository.getRelatedArtifacts( reference ); Set<ArtifactReference> related = repository.getRelatedArtifacts( reference );
@ -194,19 +195,4 @@ public class DaysOldRepositoryPurge
// TODO: Log this? // TODO: Log this?
} }
} }
private void purgeArtifact( List<String> versions, File artifactFile )
throws LayoutException
{
int countToPurge = versions.size() - retentionCount;
while( versions.iterator().hasNext() )
{
if ( countToPurge-- <= 0 )
{
break;
}
doPurgeAllRelated( artifactFile );
}
}
} }

View File

@ -66,6 +66,8 @@ public abstract class AbstractRepositoryPurgeTest
public static final String PATH_TO_RELEASED_SNAPSHOT = "org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.jar"; public static final String PATH_TO_RELEASED_SNAPSHOT = "org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.jar";
public static final String PATH_TO_HIGHER_SNAPSHOT_EXISTS = "org/apache/maven/plugins/maven-source-plugin/2.0.3-SNAPSHOT/maven-source-plugin-2.0.3-SNAPSHOT.jar"; public static final String PATH_TO_HIGHER_SNAPSHOT_EXISTS = "org/apache/maven/plugins/maven-source-plugin/2.0.3-SNAPSHOT/maven-source-plugin-2.0.3-SNAPSHOT.jar";
public static final String PATH_TO_TEST_ORDER_OF_DELETION = "org/apache/maven/plugins/maven-assembly-plugin/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.jar";
private ManagedRepositoryConfiguration config; private ManagedRepositoryConfiguration config;

View File

@ -20,11 +20,14 @@ package org.apache.maven.archiva.consumers.core.repository;
*/ */
import java.io.File; import java.io.File;
import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.commons.lang.time.DateUtils;
import org.apache.maven.archiva.consumers.core.repository.stubs.LuceneRepositoryContentIndexStub; import org.apache.maven.archiva.consumers.core.repository.stubs.LuceneRepositoryContentIndexStub;
import org.apache.maven.archiva.indexer.RepositoryContentIndex; import org.apache.maven.archiva.indexer.RepositoryContentIndex;
@ -36,52 +39,67 @@ public class DaysOldRepositoryPurgeTest
{ {
private Map<String, RepositoryContentIndex> map; private Map<String, RepositoryContentIndex> map;
private static final String[] extensions =
new String[] { "-5.jar", "-5.pom", "-6.jar", "-6.pom", "-7.jar", "-7.pom" };
private String year;
private String mon;
private String day;
private String hr;
private String min;
private String sec;
protected void setUp() protected void setUp()
throws Exception throws Exception
{ {
super.setUp(); super.setUp();
} }
private void setLastModified( String dirPath ) private void setLastModified( String dirPath, long lastModified )
{ {
File dir = new File( dirPath ); File dir = new File( dirPath );
File[] contents = dir.listFiles(); File[] contents = dir.listFiles();
for ( int i = 0; i < contents.length; i++ ) for ( int i = 0; i < contents.length; i++ )
{ {
contents[i].setLastModified( 1179382029 ); contents[i].setLastModified( lastModified );
} }
} }
public void testByLastModified() public void testByLastModified()
throws Exception throws Exception
{ {
map = new HashMap<String, RepositoryContentIndex>(); map = new HashMap<String, RepositoryContentIndex>();
map.put( "filecontent", new LuceneRepositoryContentIndexStub( 2 ) ); map.put( "filecontent", new LuceneRepositoryContentIndexStub( 2 ) );
map.put( "hashcodes", new LuceneRepositoryContentIndexStub( 2 ) ); map.put( "hashcodes", new LuceneRepositoryContentIndexStub( 2 ) );
map.put( "bytecode", new LuceneRepositoryContentIndexStub( 2 ) ); map.put( "bytecode", new LuceneRepositoryContentIndexStub( 2 ) );
repoPurge = repoPurge =
new DaysOldRepositoryPurge( getRepository(), dao, getRepoConfiguration().getDaysOlder(), new DaysOldRepositoryPurge( getRepository(), dao, getRepoConfiguration().getDaysOlder(),
getRepoConfiguration().getRetentionCount(), map ); getRepoConfiguration().getRetentionCount(), map );
populateDbForTestByLastModified();
String repoRoot = prepareTestRepo(); String repoRoot = prepareTestRepo();
String projectRoot = repoRoot + "/org/apache/maven/plugins/maven-install-plugin"; String projectRoot = repoRoot + "/org/apache/maven/plugins/maven-install-plugin";
setLastModified( projectRoot + "/2.2-SNAPSHOT/" ); setLastModified( projectRoot + "/2.2-SNAPSHOT/", 1179382029 );
populateDbForTestByLastModified();
repoPurge.process( PATH_TO_BY_DAYS_OLD_ARTIFACT ); repoPurge.process( PATH_TO_BY_DAYS_OLD_ARTIFACT );
assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.jar" ); assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar" );
assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.jar.md5" ); assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.md5" );
assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.jar.sha1" ); assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.sha1" );
assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.pom" ); assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom" );
assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.pom.md5" ); assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom.md5" );
assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.pom.sha1" ); assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom.sha1" );
// shouldn't be deleted because even if older than 30 days (because retention count = 2) // shouldn't be deleted because even if older than 30 days (because retention count = 2)
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.jar" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.jar" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.jar.md5" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.jar.md5" );
@ -89,35 +107,124 @@ public class DaysOldRepositoryPurgeTest
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.pom" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.pom" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.pom.md5" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.pom.md5" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.pom.sha1" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.pom.sha1" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.jar" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.md5" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.jar.md5" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.sha1" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.jar.sha1" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.pom" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom.md5" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.pom.md5" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom.sha1" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.pom.sha1" );
}
public void testOrderOfDeletion()
throws Exception
{
map = new HashMap<String, RepositoryContentIndex>();
map.put( "filecontent", new LuceneRepositoryContentIndexStub( 2 ) );
map.put( "hashcodes", new LuceneRepositoryContentIndexStub( 2 ) );
map.put( "bytecode", new LuceneRepositoryContentIndexStub( 2 ) );
repoPurge =
new DaysOldRepositoryPurge( getRepository(), dao, getRepoConfiguration().getDaysOlder(),
getRepoConfiguration().getRetentionCount(), map );
String repoRoot = prepareTestRepo();
String projectRoot = repoRoot + "/org/apache/maven/plugins/maven-assembly-plugin";
setLastModified( projectRoot + "/1.1.2-SNAPSHOT/", 1179382029 );
populateDbForTestOrderOfDeletion();
repoPurge.process( PATH_TO_TEST_ORDER_OF_DELETION );
assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.jar" );
assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.jar.sha1" );
assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.jar.md5" );
assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.pom" );
assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.pom.sha1" );
assertDeleted( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070427.065136-1.pom.md5" );
// the following should not have been deleted
assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.jar" );
assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.jar.sha1" );
assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.jar.md5" );
assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.pom" );
assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.pom.sha1" );
assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070506.163513-2.pom.md5" );
assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.jar" );
assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.jar.sha1" );
assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.jar.md5" );
assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.pom" );
assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.pom.sha1" );
assertExists( projectRoot + "/1.1.2-SNAPSHOT/maven-assembly-plugin-1.1.2-20070615.105019-3.pom.md5" );
} }
public void testMetadataDrivenSnapshots() public void testMetadataDrivenSnapshots()
throws Exception throws Exception
{ {
map = new HashMap<String, RepositoryContentIndex>(); map = new HashMap<String, RepositoryContentIndex>();
map.put( "filecontent", new LuceneRepositoryContentIndexStub(2) ); map.put( "filecontent", new LuceneRepositoryContentIndexStub( 2 ) );
map.put( "hashcodes", new LuceneRepositoryContentIndexStub(2) ); map.put( "hashcodes", new LuceneRepositoryContentIndexStub( 2 ) );
map.put( "bytecode", new LuceneRepositoryContentIndexStub(2) ); map.put( "bytecode", new LuceneRepositoryContentIndexStub( 2 ) );
repoPurge = repoPurge =
new DaysOldRepositoryPurge( getRepository(), dao, getRepoConfiguration().getDaysOlder(), new DaysOldRepositoryPurge( getRepository(), dao, getRepoConfiguration().getDaysOlder(),
getRepoConfiguration().getRetentionCount(), map ); getRepoConfiguration().getRetentionCount(), map );
populateDbForTestMetadataDrivenSnapshots();
String repoRoot = prepareTestRepo(); String repoRoot = prepareTestRepo();
String versionRoot = repoRoot + "/org/codehaus/plexus/plexus-utils/1.4.3-SNAPSHOT";
Calendar currentDate = Calendar.getInstance( DateUtils.UTC_TIME_ZONE );
setLastModified( versionRoot, currentDate.getTimeInMillis() );
year = String.valueOf( currentDate.get( Calendar.YEAR ) );
mon = String.valueOf( currentDate.get( Calendar.MONTH ) + 1 );
day = String.valueOf( currentDate.get( Calendar.DATE ) );
hr = String.valueOf( currentDate.get( Calendar.HOUR ) );
min = String.valueOf( currentDate.get( Calendar.MINUTE ) );
sec = String.valueOf( currentDate.get( Calendar.SECOND ) );
if ( mon.length() == 1 )
{
mon = "0" + mon;
}
if ( day.length() == 1 )
{
day = "0" + day;
}
if ( hr.length() == 1 )
{
hr = "0" + hr;
}
if ( min.length() == 1 )
{
min = "0" + min;
}
if ( sec.length() == 1 )
{
sec = "0" + sec;
}
createFiles( versionRoot );
List<String> versions = new ArrayList<String>();
versions.add( "1.4.3-20070113.163208-4" );
versions.add( "1.4.3-" + year + mon + day + "." + hr + min + sec + "-5" );
versions.add( "1.4.3-" + year + mon + day + "." + hr + min + sec + "-6" );
versions.add( "1.4.3-" + year + mon + day + "." + hr + min + sec + "-7" );
versions.add( "1.4.3-SNAPSHOT" );
populateDb( "org.codehaus.plexus", "plexus-utils", versions );
repoPurge.process( PATH_TO_BY_DAYS_OLD_METADATA_DRIVEN_ARTIFACT ); repoPurge.process( PATH_TO_BY_DAYS_OLD_METADATA_DRIVEN_ARTIFACT );
String versionRoot = repoRoot + "/org/codehaus/plexus/plexus-utils/1.4.3-SNAPSHOT";
// this should be deleted since the filename version (timestamp) is older than // this should be deleted since the filename version (timestamp) is older than
// 100 days even if the last modified date was <100 days ago // 100 days even if the last modified date was <100 days ago
assertDeleted( versionRoot + "/plexus-utils-1.4.3-20070113.163208-4.jar" ); assertDeleted( versionRoot + "/plexus-utils-1.4.3-20070113.163208-4.jar" );
@ -125,25 +232,26 @@ public class DaysOldRepositoryPurgeTest
assertDeleted( versionRoot + "/plexus-utils-1.4.3-20070113.163208-4.pom" ); assertDeleted( versionRoot + "/plexus-utils-1.4.3-20070113.163208-4.pom" );
assertDeleted( versionRoot + "/plexus-utils-1.4.3-20070113.163208-4.pom.sha1" ); assertDeleted( versionRoot + "/plexus-utils-1.4.3-20070113.163208-4.pom.sha1" );
// musn't be deleted since the filename version (timestamp) is not older than 100 days // this should not be deleted because last modified date is <100 days ago
assertExists( versionRoot + "/plexus-utils-1.4.3-20070618.102615-5.jar" );
assertExists( versionRoot + "/plexus-utils-1.4.3-20070618.102615-5.jar.sha1" );
assertExists( versionRoot + "/plexus-utils-1.4.3-20070618.102615-5.pom" );
assertExists( versionRoot + "/plexus-utils-1.4.3-20070618.102615-5.pom.sha1" );
assertExists( versionRoot + "/plexus-utils-1.4.3-20070630.113158-6.jar" );
assertExists( versionRoot + "/plexus-utils-1.4.3-20070630.113158-6.jar.sha1" );
assertExists( versionRoot + "/plexus-utils-1.4.3-20070630.113158-6.pom" );
assertExists( versionRoot + "/plexus-utils-1.4.3-20070630.113158-6.pom.sha1" );
assertExists( versionRoot + "/plexus-utils-1.4.3-20070707.122114-7.jar" );
assertExists( versionRoot + "/plexus-utils-1.4.3-20070707.122114-7.jar.sha1" );
assertExists( versionRoot + "/plexus-utils-1.4.3-20070707.122114-7.pom" );
assertExists( versionRoot + "/plexus-utils-1.4.3-20070707.122114-7.pom.sha1" );
// mustn't be deleted since the last modified date is <100 days (this is not a timestamped version)
assertExists( versionRoot + "/plexus-utils-1.4.3-SNAPSHOT.jar" ); assertExists( versionRoot + "/plexus-utils-1.4.3-SNAPSHOT.jar" );
assertExists( versionRoot + "/plexus-utils-1.4.3-SNAPSHOT.pom" ); assertExists( versionRoot + "/plexus-utils-1.4.3-SNAPSHOT.pom" );
for ( int i = 0; i < extensions.length; i++ )
{
assertExists( versionRoot + "/plexus-utils-1.4.3-" + year + mon + day + "." + hr + min + sec +
extensions[i] );
}
}
private void createFiles( String versionRoot )
throws IOException
{
for ( int i = 0; i < extensions.length; i++ )
{
File file =
new File( versionRoot, "/plexus-utils-1.4.3-" + year + mon + day + "." + hr + min + sec + extensions[i] );
file.createNewFile();
}
} }
protected void tearDown() protected void tearDown()
@ -164,16 +272,14 @@ public class DaysOldRepositoryPurgeTest
populateDb( "org.apache.maven.plugins", "maven-install-plugin", versions ); populateDb( "org.apache.maven.plugins", "maven-install-plugin", versions );
} }
private void populateDbForTestMetadataDrivenSnapshots() private void populateDbForTestOrderOfDeletion()
throws Exception throws Exception
{ {
List<String> versions = new ArrayList<String>(); List<String> versions = new ArrayList<String>();
versions.add( "1.4.3-20070113.163208-4" ); versions.add( "1.1.2-20070427.065136-1" );
versions.add( "1.4.3-20070618.102615-5" ); versions.add( "1.1.2-20070506.163513-2" );
versions.add( "1.4.3-20070630.113158-6" ); versions.add( "1.1.2-20070615.105019-3" );
versions.add( "1.4.3-20070707.122114-7" );
versions.add( "1.4.3-SNAPSHOT" );
populateDb( "org.codehaus.plexus", "plexus-utils", versions ); populateDb( "org.apache.maven.plugins", "maven-assembly-plugin", versions );
} }
} }

View File

@ -26,7 +26,6 @@ import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer; import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
import org.apache.maven.archiva.consumers.core.repository.stubs.LuceneRepositoryContentIndexFactoryStub; import org.apache.maven.archiva.consumers.core.repository.stubs.LuceneRepositoryContentIndexFactoryStub;
import org.apache.maven.archiva.database.ArchivaDatabaseException; import org.apache.maven.archiva.database.ArchivaDatabaseException;
import org.apache.maven.archiva.indexer.RepositoryContentIndexFactory;
import org.custommonkey.xmlunit.XMLAssert; import org.custommonkey.xmlunit.XMLAssert;
import java.io.File; import java.io.File;
@ -52,14 +51,15 @@ public class RepositoryPurgeConsumerTest
public void testConsumerByRetentionCount() public void testConsumerByRetentionCount()
throws Exception throws Exception
{ {
KnownRepositoryContentConsumer repoPurgeConsumer = (KnownRepositoryContentConsumer) lookup( KnownRepositoryContentConsumer repoPurgeConsumer =
KnownRepositoryContentConsumer.class, "repo-purge-consumer-by-retention-count" ); (KnownRepositoryContentConsumer) lookup( KnownRepositoryContentConsumer.class,
"repo-purge-consumer-by-retention-count" );
LuceneRepositoryContentIndexFactoryStub indexFactory = new LuceneRepositoryContentIndexFactoryStub(); LuceneRepositoryContentIndexFactoryStub indexFactory = new LuceneRepositoryContentIndexFactoryStub();
indexFactory.setExpectedRecordsSize( 2 ); indexFactory.setExpectedRecordsSize( 2 );
( (RepositoryPurgeConsumer) repoPurgeConsumer ).setRepositoryContentIndexFactory( indexFactory ); ( (RepositoryPurgeConsumer) repoPurgeConsumer ).setRepositoryContentIndexFactory( indexFactory );
populateDbForRetentionCountTest(); populateDbForRetentionCountTest();
ManagedRepositoryConfiguration repoConfiguration = getRepoConfiguration(); ManagedRepositoryConfiguration repoConfiguration = getRepoConfiguration();
@ -121,14 +121,15 @@ public class RepositoryPurgeConsumerTest
{ {
populateDbForDaysOldTest(); populateDbForDaysOldTest();
KnownRepositoryContentConsumer repoPurgeConsumer = (KnownRepositoryContentConsumer) lookup( KnownRepositoryContentConsumer repoPurgeConsumer =
KnownRepositoryContentConsumer.class, "repo-purge-consumer-by-days-old" ); (KnownRepositoryContentConsumer) lookup( KnownRepositoryContentConsumer.class,
"repo-purge-consumer-by-days-old" );
LuceneRepositoryContentIndexFactoryStub indexFactory = new LuceneRepositoryContentIndexFactoryStub(); LuceneRepositoryContentIndexFactoryStub indexFactory = new LuceneRepositoryContentIndexFactoryStub();
indexFactory.setExpectedRecordsSize( 2 ); indexFactory.setExpectedRecordsSize( 2 );
( (RepositoryPurgeConsumer) repoPurgeConsumer ).setRepositoryContentIndexFactory( indexFactory ); ( (RepositoryPurgeConsumer) repoPurgeConsumer ).setRepositoryContentIndexFactory( indexFactory );
ManagedRepositoryConfiguration repoConfiguration = getRepoConfiguration(); ManagedRepositoryConfiguration repoConfiguration = getRepoConfiguration();
repoConfiguration.setDaysOlder( TEST_DAYS_OLDER ); repoConfiguration.setDaysOlder( TEST_DAYS_OLDER );
addRepoToConfiguration( "days-old", repoConfiguration ); addRepoToConfiguration( "days-old", repoConfiguration );
@ -142,13 +143,13 @@ public class RepositoryPurgeConsumerTest
repoPurgeConsumer.processFile( PATH_TO_BY_DAYS_OLD_ARTIFACT ); repoPurgeConsumer.processFile( PATH_TO_BY_DAYS_OLD_ARTIFACT );
assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.jar" ); assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar" );
assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.jar.md5" ); assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.md5" );
assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.jar.sha1" ); assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.sha1" );
assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.pom" ); assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom" );
assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.pom.md5" ); assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom.md5" );
assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.pom.sha1" ); assertDeleted( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom.sha1" );
// shouldn't be deleted because even if older than 30 days (because retention count = 2) // shouldn't be deleted because even if older than 30 days (because retention count = 2)
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.jar" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.jar" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.jar.md5" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.jar.md5" );
@ -156,26 +157,26 @@ public class RepositoryPurgeConsumerTest
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.pom" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.pom" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.pom.md5" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.pom.md5" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.pom.sha1" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20070513.034619-5.pom.sha1" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.jar" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.md5" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.jar.md5" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.sha1" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.jar.sha1" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.pom" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom.md5" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.pom.md5" );
assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom.sha1" ); assertExists( projectRoot + "/2.2-SNAPSHOT/maven-install-plugin-2.2-20061118.060401-2.pom.sha1" );
} }
/** /**
* Test the snapshot clean consumer on a repository set to NOT clean/delete snapshots * Test the snapshot clean consumer on a repository set to NOT clean/delete snapshots based on released versions.
* based on released versions. *
*
* @throws Exception * @throws Exception
*/ */
public void testReleasedSnapshotsWereNotCleaned() public void testReleasedSnapshotsWereNotCleaned()
throws Exception throws Exception
{ {
KnownRepositoryContentConsumer repoPurgeConsumer = (KnownRepositoryContentConsumer) lookup( KnownRepositoryContentConsumer repoPurgeConsumer =
KnownRepositoryContentConsumer.class, "repo-purge-consumer-by-retention-count" ); (KnownRepositoryContentConsumer) lookup( KnownRepositoryContentConsumer.class,
"repo-purge-consumer-by-retention-count" );
populateDbForReleasedSnapshotsTest(); populateDbForReleasedSnapshotsTest();
@ -216,8 +217,9 @@ public class RepositoryPurgeConsumerTest
public void testReleasedSnapshotsWereCleaned() public void testReleasedSnapshotsWereCleaned()
throws Exception throws Exception
{ {
KnownRepositoryContentConsumer repoPurgeConsumer = (KnownRepositoryContentConsumer) lookup( KnownRepositoryContentConsumer repoPurgeConsumer =
KnownRepositoryContentConsumer.class, "repo-purge-consumer-by-days-old" ); (KnownRepositoryContentConsumer) lookup( KnownRepositoryContentConsumer.class,
"repo-purge-consumer-by-days-old" );
populateDbForReleasedSnapshotsTest(); populateDbForReleasedSnapshotsTest();

View File

@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?><project>
<parent>
<artifactId>maven-plugins</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-install-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>Maven Install Plugin</name>
<version>2.2-20061118.060401-2</version>
<prerequisites />
<issueManagement>
<system>jira</system>
<url>http://jira.codehaus.org/browse/MINSTALL</url>
</issueManagement>
<inceptionYear>2004</inceptionYear>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>1.0-beta-1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.archiva</groupId>
<artifactId>archiva-utils</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<distributionManagement>
<status>deployed</status>
</distributionManagement>
</project>

View File

@ -1,71 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
~ Copyright 2006 The Apache Software Foundation.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd' xmlns='http://maven.apache.org/POM/4.0.0'>
<parent>
<artifactId>maven-plugins</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>8</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-install-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>Maven Install Plugin</name>
<version>2.2-SNAPSHOT</version>
<inceptionYear>2004</inceptionYear>
<prerequisites>
<maven>2.0</maven>
</prerequisites>
<issueManagement>
<system>jira</system>
<url>http://jira.codehaus.org/browse/MINSTALL</url>
</issueManagement>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
<version>2.0.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>1.0-beta-1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-digest</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</project>

View File

@ -1,71 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
~ Copyright 2006 The Apache Software Foundation.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd' xmlns='http://maven.apache.org/POM/4.0.0'>
<parent>
<artifactId>maven-plugins</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>8</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-install-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>Maven Install Plugin</name>
<version>2.2-SNAPSHOT</version>
<inceptionYear>2004</inceptionYear>
<prerequisites>
<maven>2.0</maven>
</prerequisites>
<issueManagement>
<system>jira</system>
<url>http://jira.codehaus.org/browse/MINSTALL</url>
</issueManagement>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
<version>2.0.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>1.0-beta-1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-digest</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</project>

View File

@ -1,128 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?><project>
<parent>
<artifactId>maven-plugins</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-plugin-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>Maven PLUGIN Plugin</name>
<version>2.2</version>
<description>The Plugin Plugin is used to create a Maven plugin descriptor for any Mojo's found in the source tree,
to include in the JAR. It is also used to generate Xdoc files for the Mojos as well as for updating the
plugin registry and the artifact metadata.</description>
<prerequisites>
<maven>2.0.4</maven>
</prerequisites>
<issueManagement>
<system>JIRA</system>
<url>http://jira.codehaus.org/browse/MPLUGIN</url>
</issueManagement>
<inceptionYear>2001</inceptionYear>
<mailingLists>
<mailingList>
<name>Maven User List</name>
<subscribe>users-subscribe@maven.apache.org</subscribe>
<unsubscribe>users-unsubscribe@maven.apache.org</unsubscribe>
<post>users@maven.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/maven-users</archive>
<otherArchives>
<otherArchive>http://www.mail-archive.com/users@maven.apache.org/</otherArchive>
<otherArchive>http://www.nabble.com/Maven---Users-f178.html</otherArchive>
</otherArchives>
</mailingList>
<mailingList>
<name>Maven Developer List</name>
<subscribe>dev-subscribe@maven.apache.org</subscribe>
<unsubscribe>dev-unsubscribe@maven.apache.org</unsubscribe>
<post>dev@maven.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>
</mailingList>
<mailingList>
<name>Maven Commits List</name>
<subscribe>commits-subscribe@maven.apache.org</subscribe>
<unsubscribe>commits-unsubscribe@maven.apache.org</unsubscribe>
<post>commits@maven.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>
</mailingList>
<mailingList>
<name>Maven Announcements List</name>
<subscribe>announce-subscribe@maven.apache.org</subscribe>
<unsubscribe>announce-unsubscribe@maven.apache.org</unsubscribe>
<post>announce@maven.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/maven-announce/</archive>
</mailingList>
<mailingList>
<name>Maven Issues List</name>
<subscribe>issues-subscribe@maven.apache.org</subscribe>
<unsubscribe>issues-unsubscribe@maven.apache.org</unsubscribe>
<post>issues@maven.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/maven-issues/</archive>
</mailingList>
<mailingList>
<name>Maven Notifications List</name>
<subscribe>notifications-subscribe@maven.apache.org</subscribe>
<unsubscribe>notifications-unsubscribe@maven.apache.org</unsubscribe>
<post>notifications@maven.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/maven-notifications/</archive>
</mailingList>
</mailingLists>
<scm>
<connection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-plugin-plugin-2.2</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-plugin-plugin-2.2</developerConnection>
<url>https://svn.apache.org/repos/asf/maven/plugins/tags/maven-plugin-plugin-2.2</url>
</scm>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-repository-metadata</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-registry</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
<version>2.0.5</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-tools-java</artifactId>
<version>2.0.5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-tools-beanshell</artifactId>
<version>2.0.5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
<distributionManagement>
<status>deployed</status>
</distributionManagement>
</project>

View File

@ -1,123 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?><project>
<parent>
<artifactId>maven-plugins</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>8</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-plugin-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>Maven PLUGIN Plugin</name>
<version>2.3-SNAPSHOT</version>
<description>The Plugin Plugin is used to create a Maven plugin descriptor for any Mojo's found in the source tree,
to include in the JAR. It is also used to generate Xdoc files for the Mojos as well as for updating the
plugin registry and the artifact metadata.</description>
<prerequisites>
<maven>2.0.5</maven>
</prerequisites>
<issueManagement>
<system>JIRA</system>
<url>http://jira.codehaus.org/browse/MPLUGIN</url>
</issueManagement>
<inceptionYear>2001</inceptionYear>
<mailingLists>
<mailingList>
<name>Maven User List</name>
<subscribe>users-subscribe@maven.apache.org</subscribe>
<unsubscribe>users-unsubscribe@maven.apache.org</unsubscribe>
<post>users@maven.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/maven-users</archive>
<otherArchives>
<otherArchive>http://www.mail-archive.com/users@maven.apache.org/</otherArchive>
<otherArchive>http://www.nabble.com/Maven---Users-f178.html</otherArchive>
</otherArchives>
</mailingList>
<mailingList>
<name>Maven Developer List</name>
<subscribe>dev-subscribe@maven.apache.org</subscribe>
<unsubscribe>dev-unsubscribe@maven.apache.org</unsubscribe>
<post>dev@maven.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>
</mailingList>
<mailingList>
<name>Maven Commits List</name>
<subscribe>commits-subscribe@maven.apache.org</subscribe>
<unsubscribe>commits-unsubscribe@maven.apache.org</unsubscribe>
<post>commits@maven.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>
</mailingList>
<mailingList>
<name>Maven Announcements List</name>
<subscribe>announce-subscribe@maven.apache.org</subscribe>
<unsubscribe>announce-unsubscribe@maven.apache.org</unsubscribe>
<post>announce@maven.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/maven-announce/</archive>
</mailingList>
<mailingList>
<name>Maven Issues List</name>
<subscribe>issues-subscribe@maven.apache.org</subscribe>
<unsubscribe>issues-unsubscribe@maven.apache.org</unsubscribe>
<post>issues@maven.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/maven-issues/</archive>
</mailingList>
<mailingList>
<name>Maven Notifications List</name>
<subscribe>notifications-subscribe@maven.apache.org</subscribe>
<unsubscribe>notifications-unsubscribe@maven.apache.org</unsubscribe>
<post>notifications@maven.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/maven-notifications/</archive>
</mailingList>
</mailingLists>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-repository-metadata</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-registry</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
<version>2.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-tools-java</artifactId>
<version>2.1-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-tools-beanshell</artifactId>
<version>2.1-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
<distributionManagement>
<status>deployed</status>
</distributionManagement>
</project>

View File

@ -1,153 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugins</artifactId>
<version>8</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-plugin-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>Maven PLUGIN Plugin</name>
<version>2.3</version>
<description>
The Plugin Plugin is used to create a Maven plugin descriptor for any Mojo's found in the source tree,
to include in the JAR. It is also used to generate Xdoc files for the Mojos as well as for updating the
plugin registry and the artifact metadata.
</description>
<inceptionYear>2001</inceptionYear>
<prerequisites>
<maven>2.0.5</maven>
</prerequisites>
<issueManagement>
<system>JIRA</system>
<url>http://jira.codehaus.org/browse/MPLUGIN</url>
</issueManagement>
<mailingLists>
<!-- duplication from maven-plugins pom - temporary until they inherit properly
-->
<mailingList>
<name>Maven User List</name>
<subscribe>users-subscribe@maven.apache.org</subscribe>
<unsubscribe>users-unsubscribe@maven.apache.org</unsubscribe>
<post>users@maven.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/maven-users</archive>
<otherArchives>
<otherArchive>http://www.mail-archive.com/users@maven.apache.org/</otherArchive>
<otherArchive>http://www.nabble.com/Maven---Users-f178.html</otherArchive>
</otherArchives>
</mailingList>
<mailingList>
<name>Maven Developer List</name>
<subscribe>dev-subscribe@maven.apache.org</subscribe>
<unsubscribe>dev-unsubscribe@maven.apache.org</unsubscribe>
<post>dev@maven.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>
</mailingList>
<mailingList>
<name>Maven Commits List</name>
<subscribe>commits-subscribe@maven.apache.org</subscribe>
<unsubscribe>commits-unsubscribe@maven.apache.org</unsubscribe>
<post>commits@maven.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>
</mailingList>
<!-- duplication from maven-parent pom - temporary until they inherit properly
-->
<mailingList>
<name>Maven Announcements List</name>
<post>announce@maven.apache.org</post>
<subscribe>announce-subscribe@maven.apache.org</subscribe>
<unsubscribe>announce-unsubscribe@maven.apache.org</unsubscribe>
<archive>http://mail-archives.apache.org/mod_mbox/maven-announce/</archive>
</mailingList>
<mailingList>
<name>Maven Issues List</name>
<post>issues@maven.apache.org</post>
<subscribe>issues-subscribe@maven.apache.org</subscribe>
<unsubscribe>issues-unsubscribe@maven.apache.org</unsubscribe>
<archive>http://mail-archives.apache.org/mod_mbox/maven-issues/</archive>
</mailingList>
<mailingList>
<name>Maven Notifications List</name>
<post>notifications@maven.apache.org</post>
<subscribe>notifications-subscribe@maven.apache.org</subscribe>
<unsubscribe>notifications-unsubscribe@maven.apache.org</unsubscribe>
<archive>http://mail-archives.apache.org/mod_mbox/maven-notifications/</archive>
</mailingList>
</mailingLists>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-repository-metadata</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-registry</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-tools-java</artifactId>
<version>2.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact-manager</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-tools-beanshell</artifactId>
<version>2.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
<scm>
<connection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-plugin-plugin-2.3</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-plugin-plugin-2.3</developerConnection>
<url>https://svn.apache.org/repos/asf/maven/plugins/tags/maven-plugin-plugin-2.3</url>
</scm>
</project>

View File

@ -1,52 +0,0 @@
<?xml version="1.0"?><project>
<parent>
<artifactId>maven-plugins</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-source-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>Maven Source Plug-In</name>
<version>2.0.2</version>
<prerequisites />
<issueManagement>
<system>JIRA</system>
<url>http://jira.codehaus.org/browse/MSOURCES</url>
</issueManagement>
<scm>
<connection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-source-plugin-2.0.2</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-source-plugin-2.0.2</developerConnection>
<url>https://svn.apache.org/repos/asf/maven/plugins/tags/maven-source-plugin-2.0.2</url>
</scm>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>1.0-alpha-7</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-9</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>1.0-beta-1</version>
</dependency>
</dependencies>
<distributionManagement>
<status>deployed</status>
</distributionManagement>
</project>

View File

@ -1,59 +0,0 @@
<?xml version="1.0"?><project>
<parent>
<artifactId>maven-plugins</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>8</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-source-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>Maven Source Plug-In</name>
<version>2.0.3-SNAPSHOT</version>
<prerequisites />
<issueManagement>
<system>JIRA</system>
<url>http://jira.codehaus.org/browse/MSOURCES</url>
</issueManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>projects/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>1.0-alpha-7</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-9</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>1.0-beta-2-SNAPSHOT</version>
</dependency>
</dependencies>
<distributionManagement>
<status>deployed</status>
</distributionManagement>
</project>

View File

@ -1,69 +0,0 @@
<?xml version="1.0"?><project>
<parent>
<artifactId>maven-plugins</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>8</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-source-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>Maven Source Plug-In</name>
<version>2.0.4-SNAPSHOT</version>
<prerequisites />
<issueManagement>
<system>JIRA</system>
<url>http://jira.codehaus.org/browse/MSOURCES</url>
</issueManagement>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>1.0-alpha-7</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-9</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>1.0-beta-1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<status>deployed</status>
</distributionManagement>
</project>

View File

@ -1,93 +0,0 @@
<?xml version="1.0"?><project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.castor</groupId>
<artifactId>castor-anttasks</artifactId>
<name>Castor</name>
<version>1.1.2-20070427.065136-1</version>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav</artifactId>
<version>1.0-beta-1</version>
</extension>
</extensions>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<attach>true</attach>
</configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.codehaus.castor</groupId>
<artifactId>castor-codegen</artifactId>
<version>1.1.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.codehaus.castor</groupId>
<artifactId>castor-ddlgen</artifactId>
<version>1.1.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.13</version>
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>codehaus.org</id>
<name>Castor Central Distribution Repository</name>
<url>dav:https://dav.codehaus.org/repository/castor/</url>
</repository>
<snapshotRepository>
<id>codehaus.org</id>
<name>Castor Central Development Repository</name>
<url>dav:https://dav.codehaus.org/snapshots.repository/castor/</url>
</snapshotRepository>
<site>
<id>codehaus.org</id>
<url>dav:https://dav.codehaus.org/castor/</url>
</site>
<status>deployed</status>
</distributionManagement>
</project>

View File

@ -1,93 +0,0 @@
<?xml version="1.0"?><project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.castor</groupId>
<artifactId>castor-anttasks</artifactId>
<name>Castor</name>
<version>1.1.2-20070506.163513-2</version>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav</artifactId>
<version>1.0-beta-1</version>
</extension>
</extensions>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<attach>true</attach>
</configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.codehaus.castor</groupId>
<artifactId>castor-codegen</artifactId>
<version>1.1.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.codehaus.castor</groupId>
<artifactId>castor-ddlgen</artifactId>
<version>1.1.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.13</version>
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>codehaus.org</id>
<name>Castor Central Distribution Repository</name>
<url>dav:https://dav.codehaus.org/repository/castor/</url>
</repository>
<snapshotRepository>
<id>codehaus.org</id>
<name>Castor Central Development Repository</name>
<url>dav:https://dav.codehaus.org/snapshots.repository/castor/</url>
</snapshotRepository>
<site>
<id>codehaus.org</id>
<url>dav:https://dav.codehaus.org/castor/</url>
</site>
<status>deployed</status>
</distributionManagement>
</project>

Some files were not shown because too many files have changed in this diff Show More