- Added tests for RepositoryConsumer and CleanupReleasedSnapshotsRepositoryPurge - Added test data for the new tests - Refactored AbstractRepositoryPurgeTest, DaysOldRepositoryPurgeTest and RetentionCountRepositoryPurgeTest git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@569789 13f79535-47bb-0310-9956-ffa450edef68tags/archiva-1.0-beta-2
@@ -0,0 +1,203 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ 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. | |||
--> | |||
<configuration> | |||
<version>1</version> | |||
<repositories> | |||
<repository> | |||
<id>internal</id> | |||
<name>Archiva Managed Internal Repository</name> | |||
<url>file://${appserver.base}/repositories/internal</url> | |||
<layout>default</layout> | |||
<releases>true</releases> | |||
<snapshots>false</snapshots> | |||
<indexed>true</indexed> | |||
<refreshCronExpression>0 0 * * ?</refreshCronExpression> | |||
</repository> | |||
<repository> | |||
<id>snapshots</id> | |||
<name>Archiva Managed Snapshot Repository</name> | |||
<url>file://${appserver.base}/repositories/internal</url> | |||
<layout>default</layout> | |||
<releases>false</releases> | |||
<snapshots>true</snapshots> | |||
<indexed>true</indexed> | |||
<refreshCronExpression>0 0,30 * * ?</refreshCronExpression> | |||
</repository> | |||
<repository> | |||
<id>central</id> | |||
<name>Central Repository</name> | |||
<url>http://repo1.maven.org/maven2</url> | |||
<layout>default</layout> | |||
<releases>true</releases> | |||
<snapshots>false</snapshots> | |||
<indexed>false</indexed> | |||
</repository> | |||
<repository> | |||
<id>maven2-repository.dev.java.net</id> | |||
<name>Java.net Repository for Maven 2</name> | |||
<url>https://maven2-repository.dev.java.net/nonav/repository</url> | |||
<layout>default</layout> | |||
<releases>true</releases> | |||
<snapshots>false</snapshots> | |||
<indexed>false</indexed> | |||
</repository> | |||
<repository> | |||
<id>test-repo</id> | |||
<name>Test Repository</name> | |||
<url>file://${appserver.base}/repositories/test-repo</url> | |||
<layout>default</layout> | |||
<releases>true</releases> | |||
<snapshots>true</snapshots> | |||
<indexed>true</indexed> | |||
<refreshCronExpression>0 0 * * ?</refreshCronExpression> | |||
<daysOlder>100</daysOlder> | |||
<deleteReleasedSnapshots>true</deleteReleasedSnapshots> | |||
</repository> | |||
</repositories> | |||
<proxyConnectors> | |||
<proxyConnector> | |||
<sourceRepoId>internal</sourceRepoId> | |||
<targetRepoId>central</targetRepoId> | |||
<proxyId/> | |||
<snapshotsPolicy>disabled</snapshotsPolicy> | |||
<releasePolicy>never</releasePolicy> | |||
<failurePolicy>not-found</failurePolicy> | |||
</proxyConnector> | |||
<proxyConnector> | |||
<sourceRepoId>internal</sourceRepoId> | |||
<targetRepoId>maven2-repository.dev.java.net</targetRepoId> | |||
<proxyId/> | |||
<snapshotsPolicy>disabled</snapshotsPolicy> | |||
<releasePolicy>never</releasePolicy> | |||
<failurePolicy>not-found</failurePolicy> | |||
<whiteListPatterns> | |||
<whiteListPattern>javax/**</whiteListPattern> | |||
</whiteListPatterns> | |||
</proxyConnector> | |||
</proxyConnectors> | |||
<networkProxies> | |||
<networkProxy> | |||
<id>example</id> | |||
<protocol>http</protocol> | |||
<host>proxy.mycompany.com</host> | |||
<port>8080</port> | |||
<username>myself</username> | |||
<password>mypass</password> | |||
</networkProxy> | |||
</networkProxies> | |||
<repositoryScanning> | |||
<fileTypes> | |||
<fileType> | |||
<id>artifacts</id> | |||
<patterns> | |||
<pattern>**/*.pom</pattern> | |||
<pattern>**/*.jar</pattern> | |||
<pattern>**/*.ear</pattern> | |||
<pattern>**/*.war</pattern> | |||
<pattern>**/*.car</pattern> | |||
<pattern>**/*.sar</pattern> | |||
<pattern>**/*.mar</pattern> | |||
<pattern>**/*.rar</pattern> | |||
<pattern>**/*.dtd</pattern> | |||
<pattern>**/*.tld</pattern> | |||
<pattern>**/*.tar.gz</pattern> | |||
<pattern>**/*.tar.bz2</pattern> | |||
<pattern>**/*.zip</pattern> | |||
</patterns> | |||
</fileType> | |||
<fileType> | |||
<id>indexable-content</id> | |||
<patterns> | |||
<pattern>**/*.txt</pattern> | |||
<pattern>**/*.TXT</pattern> | |||
<pattern>**/*.block</pattern> | |||
<pattern>**/*.config</pattern> | |||
<pattern>**/*.pom</pattern> | |||
<pattern>**/*.xml</pattern> | |||
<pattern>**/*.xsd</pattern> | |||
<pattern>**/*.dtd</pattern> | |||
<pattern>**/*.tld</pattern> | |||
</patterns> | |||
</fileType> | |||
<fileType> | |||
<id>auto-remove</id> | |||
<patterns> | |||
<pattern>**/*.bak</pattern> | |||
<pattern>**/*~</pattern> | |||
<pattern>**/*-</pattern> | |||
</patterns> | |||
</fileType> | |||
<fileType> | |||
<id>ignored</id> | |||
<patterns> | |||
<pattern>**/.htaccess</pattern> | |||
<pattern>**/KEYS</pattern> | |||
<pattern>**/*.rb</pattern> | |||
<pattern>**/*.sh</pattern> | |||
<pattern>**/.svn/**</pattern> | |||
<pattern>**/.DAV/**</pattern> | |||
</patterns> | |||
</fileType> | |||
</fileTypes> | |||
<knownContentConsumers> | |||
<knownContentConsumer>update-db-artifact</knownContentConsumer> | |||
<knownContentConsumer>create-missing-checksums</knownContentConsumer> | |||
<knownContentConsumer>update-db-repository-metadata</knownContentConsumer> | |||
<knownContentConsumer>validate-checksum</knownContentConsumer> | |||
<knownContentConsumer>validate-signature</knownContentConsumer> | |||
<knownContentConsumer>index-content</knownContentConsumer> | |||
<knownContentConsumer>auto-remove</knownContentConsumer> | |||
<knownContentConsumer>auto-rename</knownContentConsumer> | |||
<knownContentConsumer>repository-purge</knownContentConsumer> | |||
</knownContentConsumers> | |||
<invalidContentConsumers> | |||
<invalidContentConsumer>update-db-bad-content</invalidContentConsumer> | |||
</invalidContentConsumers> | |||
</repositoryScanning> | |||
<databaseScanning> | |||
<cronExpression>0 0 * * ?</cronExpression> | |||
<unprocessedConsumers> | |||
<unprocessedConsumer>index-artifact</unprocessedConsumer> | |||
<unprocessedConsumer>update-db-project</unprocessedConsumer> | |||
<unprocessedConsumer>validate-repository-metadata</unprocessedConsumer> | |||
<unprocessedConsumer>index-archive-toc</unprocessedConsumer> | |||
<unprocessedConsumer>update-db-bytecode-stats</unprocessedConsumer> | |||
<unprocessedConsumer>index-public-methods</unprocessedConsumer> | |||
</unprocessedConsumers> | |||
<cleanupConsumers> | |||
<cleanupConsumer>not-present-remove-db-artifact</cleanupConsumer> | |||
<cleanupConsumer>not-present-remove-db-project</cleanupConsumer> | |||
<cleanupConsumer>not-present-remove-indexed</cleanupConsumer> | |||
</cleanupConsumers> | |||
</databaseScanning> | |||
<webapp> | |||
<ui> | |||
<showFindArtifacts>true</showFindArtifacts> | |||
<appletFindEnabled>true</appletFindEnabled> | |||
</ui> | |||
</webapp> | |||
</configuration> |
@@ -68,6 +68,7 @@ | |||
<snapshots>true</snapshots> | |||
<indexed>true</indexed> | |||
<refreshCronExpression>0 0 * * ?</refreshCronExpression> | |||
<daysOlder>0</daysOlder> | |||
<retentionCount>2</retentionCount> | |||
</repository> | |||
</repositories> |
@@ -22,23 +22,23 @@ package org.apache.maven.archiva.consumers.core.repository; | |||
import org.codehaus.plexus.PlexusTestCase; | |||
import org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory; | |||
import org.codehaus.plexus.jdo.JdoFactory; | |||
import org.apache.maven.archiva.configuration.Configuration; | |||
import org.apache.maven.archiva.configuration.RepositoryConfiguration; | |||
import org.apache.maven.archiva.model.ArchivaRepository; | |||
import org.apache.maven.archiva.model.ArchivaArtifact; | |||
import org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayout; | |||
import org.apache.maven.archiva.repository.layout.LayoutException; | |||
import org.apache.maven.archiva.repository.layout.DefaultBidirectionalRepositoryLayout; | |||
import org.apache.maven.archiva.database.ArchivaDAO; | |||
import org.apache.maven.archiva.database.ArtifactDAO; | |||
import org.apache.maven.archiva.database.ArchivaDatabaseException; | |||
import org.jpox.SchemaTool; | |||
import javax.jdo.PersistenceManagerFactory; | |||
import javax.jdo.PersistenceManager; | |||
import java.util.List; | |||
import java.util.ArrayList; | |||
import java.util.Properties; | |||
import java.util.Iterator; | |||
import java.util.Map; | |||
import java.util.List; | |||
import java.util.Date; | |||
import java.net.URL; | |||
import java.io.File; | |||
@@ -52,12 +52,27 @@ public class AbstractRepositoryPurgeTest | |||
public static final String TEST_REPO_NAME = "Test Repository"; | |||
public static final String TEST_REPO_URL = "file://" + getBasedir() + "/target/test-classes/test-repo/"; | |||
public static final String TEST_REPO_URL = "file://" + getBasedir() + "/target/test/test-repo/"; | |||
public static final int TEST_RETENTION_COUNT = 2; | |||
public static final int TEST_DAYS_OLDER = 30; | |||
public static final String PATH_TO_BY_DAYS_OLD_ARTIFACT = | |||
"org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar"; | |||
public static final String PATH_TO_BY_RETENTION_COUNT_ARTIFACT = | |||
"org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.jar"; | |||
public static final String PATH_TO_BY_RETENTION_COUNT_POM = | |||
"org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2.pom"; | |||
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"; | |||
private RepositoryConfiguration config; | |||
private ArchivaRepository repo; | |||
@@ -174,4 +189,30 @@ public class AbstractRepositoryPurgeTest | |||
return layout; | |||
} | |||
protected void populateDb( String groupId, String artifactId, List versions ) | |||
throws ArchivaDatabaseException | |||
{ | |||
for( Iterator iter = versions.iterator(); iter.hasNext(); ) | |||
{ | |||
String version = (String) iter.next(); | |||
ArchivaArtifact artifact = | |||
dao.createArtifact( groupId, artifactId, version, "", "jar" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
ArchivaArtifact savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
//POM | |||
artifact = | |||
dao.createArtifact( groupId, artifactId, version, "", "pom" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
} | |||
} | |||
} |
@@ -0,0 +1,249 @@ | |||
package org.apache.maven.archiva.consumers.core.repository; | |||
/* | |||
* 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. | |||
*/ | |||
import org.apache.maven.archiva.database.ArchivaDatabaseException; | |||
import org.apache.commons.io.FileUtils; | |||
import org.jdom.Document; | |||
import org.jdom.Element; | |||
import org.jdom.xpath.XPath; | |||
import org.jdom.input.SAXBuilder; | |||
import org.codehaus.plexus.util.IOUtil; | |||
import java.util.List; | |||
import java.util.Iterator; | |||
import java.util.ArrayList; | |||
import java.io.File; | |||
import java.io.FileReader; | |||
/** | |||
* @author <a href="mailto:oching@apache.org">Maria Odea Ching</a> | |||
*/ | |||
public class CleanupReleasedSnapshotsRepositoryPurgeTest | |||
extends AbstractRepositoryPurgeTest | |||
{ | |||
protected void setUp() | |||
throws Exception | |||
{ | |||
super.setUp(); | |||
repoPurge = new CleanupReleasedSnapshotsRepositoryPurge( getRepository(), getLayout(), dao ); | |||
} | |||
public void testReleasedSnapshots() | |||
throws Exception | |||
{ | |||
populateReleasedSnapshotsTest(); | |||
File testDir = new File( "target/test" ); | |||
FileUtils.copyDirectoryToDirectory( new File( "target/test-classes/test-repo" ), testDir ); | |||
repoPurge.process( PATH_TO_RELEASED_SNAPSHOT ); | |||
// check if the snapshot was removed | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.jar" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.jar.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.jar.sha1" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.pom" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.pom.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.pom.sha1" ).exists() ); | |||
// check if the released version was not removed | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3/maven-plugin-plugin-2.3-sources.jar" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3/maven-plugin-plugin-2.3-sources.jar.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3/maven-plugin-plugin-2.3-sources.jar.sha1" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3/maven-plugin-plugin-2.3.jar" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3/maven-plugin-plugin-2.3.jar.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3/maven-plugin-plugin-2.3.jar.sha1" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3/maven-plugin-plugin-2.3.pom" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3/maven-plugin-plugin-2.3.pom.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3/maven-plugin-plugin-2.3.pom.sha1" ).exists() ); | |||
// check if metadata file was updated | |||
File artifactMetadataFile = | |||
new File( "target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/maven-metadata-local.xml" ); | |||
FileReader fileReader = new FileReader( artifactMetadataFile ); | |||
Document document; | |||
try | |||
{ | |||
SAXBuilder builder = new SAXBuilder(); | |||
document = builder.build( fileReader ); | |||
} | |||
finally | |||
{ | |||
IOUtil.close( fileReader ); | |||
} | |||
// parse the metadata file | |||
XPath xPath = XPath.newInstance( "//metadata/versioning" ); | |||
Element rootElement = document.getRootElement(); | |||
Element versioning = (Element) xPath.selectSingleNode( rootElement ); | |||
Element el = (Element) xPath.newInstance( "./latest" ).selectSingleNode( versioning ); | |||
assertEquals( "2.3", el.getValue() ); | |||
el = (Element) xPath.newInstance( "./lastUpdated" ).selectSingleNode( versioning ); | |||
assertFalse( el.getValue().equals( "20070315032817" ) ); | |||
List nodes = xPath.newInstance( "./versions" ).selectNodes( | |||
rootElement ); | |||
boolean found = false; | |||
for ( Iterator iter = nodes.iterator(); iter.hasNext(); ) | |||
{ | |||
el = ( Element ) iter.next(); | |||
if( el.getValue().equals( "2.3-SNAPSHOT" ) ) | |||
{ | |||
found = true; | |||
} | |||
} | |||
assertFalse( found ); | |||
FileUtils.deleteDirectory( testDir ); | |||
} | |||
public void testHigherSnapshotExists() | |||
throws Exception | |||
{ | |||
populateHigherSnapshotExistsTest(); | |||
File testDir = new File( "target/test" ); | |||
FileUtils.copyDirectoryToDirectory( new File( "target/test-classes/test-repo" ), testDir ); | |||
repoPurge.process( PATH_TO_HIGHER_SNAPSHOT_EXISTS ); | |||
// check if the snapshot was removed | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-source-plugin/2.0.3-SNAPSHOT" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-source-plugin/2.0.3-SNAPSHOT/maven-source-plugin-2.0.3-SNAPSHOT.jar" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-source-plugin/2.0.3-SNAPSHOT/maven-source-plugin-2.0.3-SNAPSHOT.jar.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-source-plugin/2.0.3-SNAPSHOT/maven-source-plugin-2.0.3-SNAPSHOT.jar.sha1" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-source-plugin/2.0.3-SNAPSHOT/maven-source-plugin-2.0.3-SNAPSHOT.pom" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-source-plugin/2.0.3-SNAPSHOT/maven-source-plugin-2.0.3-SNAPSHOT.pom.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-source-plugin/2.0.3-SNAPSHOT/maven-source-plugin-2.0.3-SNAPSHOT.pom.sha1" ).exists() ); | |||
// check if the released version was not removed | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-source-plugin/2.0.4-SNAPSHOT" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-source-plugin/2.0.4-SNAPSHOT/maven-source-plugin-2.0.4-SNAPSHOT.jar" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-source-plugin/2.0.4-SNAPSHOT/maven-source-plugin-2.0.4-SNAPSHOT.jar.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-source-plugin/2.0.4-SNAPSHOT/maven-source-plugin-2.0.4-SNAPSHOT.jar.sha1" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-source-plugin/2.0.4-SNAPSHOT/maven-source-plugin-2.0.4-SNAPSHOT.pom" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-source-plugin/2.0.4-SNAPSHOT/maven-source-plugin-2.0.4-SNAPSHOT.pom.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-source-plugin/2.0.4-SNAPSHOT/maven-source-plugin-2.0.4-SNAPSHOT.pom.sha1" ).exists() ); | |||
// check if metadata file was updated | |||
File artifactMetadataFile = | |||
new File( "target/test/test-repo/org/apache/maven/plugins/maven-source-plugin/maven-metadata-local.xml" ); | |||
FileReader fileReader = new FileReader( artifactMetadataFile ); | |||
Document document; | |||
try | |||
{ | |||
SAXBuilder builder = new SAXBuilder(); | |||
document = builder.build( fileReader ); | |||
} | |||
finally | |||
{ | |||
IOUtil.close( fileReader ); | |||
} | |||
// parse the metadata file | |||
XPath xPath = XPath.newInstance( "//metadata/versioning" ); | |||
Element rootElement = document.getRootElement(); | |||
Element versioning = (Element) xPath.selectSingleNode( rootElement ); | |||
Element el = (Element) xPath.newInstance( "./latest" ).selectSingleNode( versioning ); | |||
assertEquals( "2.0.4-SNAPSHOT", el.getValue() ); | |||
el = (Element) xPath.newInstance( "./lastUpdated" ).selectSingleNode( versioning ); | |||
assertFalse( el.getValue().equals( "20070427033345" ) ); | |||
List nodes = xPath.newInstance( "./versions" ).selectNodes( | |||
rootElement ); | |||
boolean found = false; | |||
for ( Iterator iter = nodes.iterator(); iter.hasNext(); ) | |||
{ | |||
el = ( Element ) iter.next(); | |||
if( el.getValue().equals( "2.0.3-SNAPSHOT" ) ) | |||
{ | |||
found = true; | |||
} | |||
} | |||
assertFalse( found ); | |||
FileUtils.deleteDirectory( testDir ); | |||
} | |||
private void populateReleasedSnapshotsTest() | |||
throws ArchivaDatabaseException | |||
{ | |||
List versions = new ArrayList(); | |||
versions.add( "2.3-SNAPSHOT" ); | |||
populateDb( "org.apache.maven.plugins", "maven-plugin-plugin", versions ); | |||
} | |||
private void populateHigherSnapshotExistsTest() | |||
throws Exception | |||
{ | |||
List versions = new ArrayList(); | |||
versions.add( "2.0.3-SNAPSHOT" ); | |||
populateDb( "org.apache.maven.plugins", "maven-source-plugin", versions ); | |||
} | |||
} |
@@ -1,35 +1,37 @@ | |||
package org.apache.maven.archiva.consumers.core.repository; | |||
import org.codehaus.plexus.PlexusTestCase; | |||
import org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory; | |||
import org.codehaus.plexus.jdo.JdoFactory; | |||
import org.apache.maven.archiva.configuration.Configuration; | |||
import org.apache.maven.archiva.configuration.RepositoryConfiguration; | |||
import org.apache.maven.archiva.model.ArchivaRepository; | |||
import org.apache.maven.archiva.model.ArchivaArtifactModel; | |||
import org.apache.maven.archiva.model.ArchivaArtifact; | |||
import org.apache.maven.archiva.database.ArtifactDAO; | |||
import org.apache.maven.archiva.database.ArchivaDAO; | |||
import org.apache.maven.archiva.database.jdo.JdoAccess; | |||
/* | |||
* 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. | |||
*/ | |||
import org.apache.commons.io.FileUtils; | |||
import javax.jdo.JDOFatalUserException; | |||
import javax.jdo.JDOHelper; | |||
import javax.jdo.spi.JDOImplHelper; | |||
import java.util.List; | |||
import java.util.ArrayList; | |||
import java.util.Date; | |||
import java.io.File; | |||
/** | |||
* @author <a href="mailto:oching@apache.org">Maria Odea Ching</a> | |||
*/ | |||
public class DaysOldRepositoryPurgeTest | |||
extends AbstractRepositoryPurgeTest | |||
{ | |||
public static final String PATH_TO_BY_DAYS_OLD_ARTIFACT = | |||
"org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar"; | |||
protected void setUp() | |||
throws Exception | |||
{ | |||
@@ -41,7 +43,7 @@ public class DaysOldRepositoryPurgeTest | |||
private void setLastModified() | |||
{ | |||
File dir = | |||
new File( "target/test-classes/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/" ); | |||
new File( "target/test/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/" ); | |||
File[] contents = dir.listFiles(); | |||
for ( int i = 0; i < contents.length; i++ ) | |||
{ | |||
@@ -53,25 +55,28 @@ public class DaysOldRepositoryPurgeTest | |||
throws Exception | |||
{ | |||
populateDb(); | |||
File testDir = new File( "target/test" ); | |||
FileUtils.copyDirectoryToDirectory( new File( "target/test-classes/test-repo" ), testDir ); | |||
setLastModified(); | |||
repoPurge.process( PATH_TO_BY_DAYS_OLD_ARTIFACT ); | |||
assertTrue( true ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar" ).exists() ); | |||
"target/test/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.md5" ).exists() ); | |||
"target/test/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.sha1" ).exists() ); | |||
"target/test/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.sha1" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom" ).exists() ); | |||
"target/test/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom.md5" ).exists() ); | |||
"target/test/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom.sha1" ).exists() ); | |||
"target/test/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom.sha1" ).exists() ); | |||
FileUtils.deleteDirectory( testDir ); | |||
} | |||
protected void tearDown() | |||
@@ -84,25 +89,9 @@ public class DaysOldRepositoryPurgeTest | |||
private void populateDb() | |||
throws Exception | |||
{ | |||
// Create it | |||
ArchivaArtifact artifact = | |||
dao.createArtifact( "org.apache.maven.plugins", "maven-install-plugin", "2.2-SNAPSHOT", "", "jar" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
// Save it. | |||
ArchivaArtifact savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
List versions = new ArrayList(); | |||
versions.add( "2.2-SNAPSHOT" ); | |||
//POM | |||
artifact = | |||
dao.createArtifact( "org.apache.maven.plugins", "maven-install-plugin", "2.2-SNAPSHOT", "", "pom" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
populateDb( "org.apache.maven.plugins", "maven-install-plugin", versions ); | |||
} | |||
} |
@@ -0,0 +1,347 @@ | |||
package org.apache.maven.archiva.consumers.core.repository; | |||
/* | |||
* 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. | |||
*/ | |||
import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer; | |||
import org.apache.maven.archiva.database.ArchivaDatabaseException; | |||
import org.apache.commons.io.FileUtils; | |||
import org.jdom.Document; | |||
import org.jdom.Element; | |||
import org.jdom.xpath.XPath; | |||
import org.jdom.input.SAXBuilder; | |||
import org.codehaus.plexus.util.IOUtil; | |||
import java.io.File; | |||
import java.io.FileReader; | |||
import java.util.List; | |||
import java.util.ArrayList; | |||
import java.util.Iterator; | |||
/** | |||
* @author <a href="mailto:oching@apache.org">Maria Odea Ching</a> | |||
*/ | |||
public class RepositoryPurgeConsumerTest | |||
extends AbstractRepositoryPurgeTest | |||
{ | |||
protected void setUp() | |||
throws Exception | |||
{ | |||
super.setUp(); | |||
} | |||
private void setLastModified() | |||
{ | |||
File dir = | |||
new File( "target/test/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/" ); | |||
File[] contents = dir.listFiles(); | |||
for ( int i = 0; i < contents.length; i++ ) | |||
{ | |||
contents[i].setLastModified( 1179382029 ); | |||
} | |||
} | |||
public void testConsumerByRetentionCount() | |||
throws Exception | |||
{ | |||
KnownRepositoryContentConsumer repoPurgeConsumer = ( KnownRepositoryContentConsumer ) | |||
lookup( KnownRepositoryContentConsumer.class, "repo-purge-consumer-by-retention-count" ); | |||
populateDbForRetentionCountTest(); | |||
repoPurgeConsumer.beginScan( getRepository() ); | |||
File testDir = new File( "target/test" ); | |||
FileUtils.copyDirectoryToDirectory( new File( "target/test-classes/test-repo" ), testDir ); | |||
repoPurgeConsumer.processFile( PATH_TO_BY_RETENTION_COUNT_ARTIFACT ); | |||
// assert if removed from repo | |||
assertFalse( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.jar" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.jar.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.jar.sha1" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.pom" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.pom.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.pom.sha1" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.jar" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.jar.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.jar.sha1" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.pom" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.pom.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.pom.sha1" ).exists() ); | |||
// assert if not removed from repo | |||
assertTrue( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.jar" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.jar.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.jar.sha1" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.pom" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.pom.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.pom.sha1" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.jar" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.jar.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.jar.sha1" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.pom" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.pom.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.pom.sha1" ).exists() ); | |||
FileUtils.deleteDirectory( testDir ); | |||
} | |||
public void testConsumerByDaysOld() | |||
throws Exception | |||
{ | |||
populateDbForDaysOldTest(); | |||
KnownRepositoryContentConsumer repoPurgeConsumer = ( KnownRepositoryContentConsumer ) | |||
lookup( KnownRepositoryContentConsumer.class, "repo-purge-consumer-by-days-old" ); | |||
repoPurgeConsumer.beginScan( getRepository() ); | |||
File testDir = new File( "target/test" ); | |||
FileUtils.copyDirectoryToDirectory( new File( "target/test-classes/test-repo" ), testDir ); | |||
setLastModified(); | |||
repoPurgeConsumer.processFile( PATH_TO_BY_DAYS_OLD_ARTIFACT ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.jar.sha1" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-install-plugin/2.2-SNAPSHOT/maven-install-plugin-2.2-SNAPSHOT.pom.sha1" ).exists() ); | |||
FileUtils.deleteDirectory( testDir ); | |||
} | |||
public void testReleasedSnapshotsWereNotCleaned() | |||
throws Exception | |||
{ | |||
KnownRepositoryContentConsumer repoPurgeConsumer = ( KnownRepositoryContentConsumer ) | |||
lookup( KnownRepositoryContentConsumer.class, "repo-purge-consumer-by-retention-count" ); | |||
populateDbForReleasedSnapshotsTest(); | |||
repoPurgeConsumer.beginScan( getRepository() ); | |||
File testDir = new File( "target/test" ); | |||
FileUtils.copyDirectoryToDirectory( new File( "target/test-classes/test-repo" ), testDir ); | |||
repoPurgeConsumer.processFile( PATH_TO_RELEASED_SNAPSHOT ); | |||
// check if the snapshot wasn't removed | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.jar" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.jar.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.jar.sha1" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.pom" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.pom.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.pom.sha1" ).exists() ); | |||
// check if metadata file wasn't updated | |||
File artifactMetadataFile = | |||
new File( "target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/maven-metadata-local.xml" ); | |||
FileReader fileReader = new FileReader( artifactMetadataFile ); | |||
Document document; | |||
try | |||
{ | |||
SAXBuilder builder = new SAXBuilder(); | |||
document = builder.build( fileReader ); | |||
} | |||
finally | |||
{ | |||
IOUtil.close( fileReader ); | |||
} | |||
// parse the metadata file | |||
XPath xPath = XPath.newInstance( "//metadata/versioning" ); | |||
Element rootElement = document.getRootElement(); | |||
Element versioning = (Element) xPath.selectSingleNode( rootElement ); | |||
Element el = (Element) xPath.newInstance( "./latest" ).selectSingleNode( versioning ); | |||
assertEquals( "2.3-SNAPSHOT", el.getValue() ); | |||
el = (Element) xPath.newInstance( "./lastUpdated" ).selectSingleNode( versioning ); | |||
assertTrue( el.getValue().equals( "20070315032817" ) ); | |||
List nodes = xPath.newInstance( "./versions" ).selectNodes( | |||
versioning ); | |||
boolean found = false; | |||
for ( Iterator iter = nodes.iterator(); iter.hasNext(); ) | |||
{ | |||
el = ( Element ) iter.next(); | |||
if( el.getValue().trim().equals( "2.3-SNAPSHOT" ) ) | |||
{ | |||
found = true; | |||
} | |||
} | |||
assertTrue( found ); | |||
FileUtils.deleteDirectory( testDir ); | |||
} | |||
public void testReleasedSnapshotsWereCleaned() | |||
throws Exception | |||
{ | |||
KnownRepositoryContentConsumer repoPurgeConsumer = ( KnownRepositoryContentConsumer ) | |||
lookup( KnownRepositoryContentConsumer.class, "repo-purge-consumer-by-days-old" ); | |||
populateDbForReleasedSnapshotsTest(); | |||
repoPurgeConsumer.beginScan( getRepository() ); | |||
File testDir = new File( "target/test" ); | |||
FileUtils.copyDirectoryToDirectory( new File( "target/test-classes/test-repo" ), testDir ); | |||
repoPurgeConsumer.processFile( PATH_TO_RELEASED_SNAPSHOT ); | |||
// check if the snapshot was removed | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.jar" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.jar.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.jar.sha1" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.pom" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.pom.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/2.3-SNAPSHOT/maven-plugin-plugin-2.3-SNAPSHOT.pom.sha1" ).exists() ); | |||
// check if metadata file was updated | |||
File artifactMetadataFile = | |||
new File( "target/test/test-repo/org/apache/maven/plugins/maven-plugin-plugin/maven-metadata-local.xml" ); | |||
FileReader fileReader = new FileReader( artifactMetadataFile ); | |||
Document document; | |||
try | |||
{ | |||
SAXBuilder builder = new SAXBuilder(); | |||
document = builder.build( fileReader ); | |||
} | |||
finally | |||
{ | |||
IOUtil.close( fileReader ); | |||
} | |||
// parse the metadata file | |||
XPath xPath = XPath.newInstance( "//metadata/versioning" ); | |||
Element rootElement = document.getRootElement(); | |||
Element versioning = (Element) xPath.selectSingleNode( rootElement ); | |||
Element el = (Element) xPath.newInstance( "./latest" ).selectSingleNode( versioning ); | |||
assertEquals( "2.3", el.getValue() ); | |||
el = (Element) xPath.newInstance( "./lastUpdated" ).selectSingleNode( versioning ); | |||
assertFalse( el.getValue().equals( "20070315032817" ) ); | |||
List nodes = xPath.newInstance( "./versions" ).selectNodes( | |||
rootElement ); | |||
boolean found = false; | |||
for ( Iterator iter = nodes.iterator(); iter.hasNext(); ) | |||
{ | |||
el = ( Element ) iter.next(); | |||
if( el.getValue().equals( "2.3-SNAPSHOT" ) ) | |||
{ | |||
found = true; | |||
} | |||
} | |||
assertFalse( found ); | |||
FileUtils.deleteDirectory( testDir ); | |||
} | |||
public void populateDbForRetentionCountTest() | |||
throws ArchivaDatabaseException | |||
{ | |||
List versions = new ArrayList(); | |||
versions.add( "1.0RC1-20070504.153317-1" ); | |||
versions.add( "1.0RC1-20070504.160758-2" ); | |||
versions.add( "1.0RC1-20070505.090015-3" ); | |||
versions.add( "1.0RC1-20070506.090132-4" ); | |||
populateDb( "org.jruby.plugins", "jruby-rake-plugin", versions); | |||
} | |||
private void populateDbForDaysOldTest() | |||
throws ArchivaDatabaseException | |||
{ | |||
List versions = new ArrayList(); | |||
versions.add( "2.2-SNAPSHOT" ); | |||
populateDb( "org.apache.maven.plugins", "maven-install-plugin", versions ); | |||
} | |||
public void populateDbForReleasedSnapshotsTest() | |||
throws ArchivaDatabaseException | |||
{ | |||
List versions = new ArrayList(); | |||
versions.add( "2.3-SNAPSHOT" ); | |||
populateDb( "org.apache.maven.plugins", "maven-plugin-plugin", versions ); | |||
} | |||
} |
@@ -19,10 +19,11 @@ package org.apache.maven.archiva.consumers.core.repository; | |||
* under the License. | |||
*/ | |||
import org.apache.maven.archiva.model.ArchivaArtifact; | |||
import org.apache.commons.io.FileUtils; | |||
import java.io.File; | |||
import java.util.Date; | |||
import java.util.List; | |||
import java.util.ArrayList; | |||
/** | |||
* Test RetentionsCountRepositoryPurgeTest | |||
@@ -33,12 +34,6 @@ public class RetentionCountRepositoryPurgeTest | |||
extends AbstractRepositoryPurgeTest | |||
{ | |||
public static final String PATH_TO_BY_RETENTION_COUNT_ARTIFACT = | |||
"org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.jar"; | |||
public static final String PATH_TO_BY_RETENTION_COUNT_POM = | |||
"org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2.pom"; | |||
protected void setUp() | |||
throws Exception | |||
{ | |||
@@ -57,61 +52,67 @@ public class RetentionCountRepositoryPurgeTest | |||
{ | |||
populateIfJarWasFoundDb(); | |||
File testDir = new File( "target/test" ); | |||
testDir.mkdir(); | |||
FileUtils.copyDirectoryToDirectory( new File( "target/test-classes/test-repo" ), testDir ); | |||
repoPurge.process( PATH_TO_BY_RETENTION_COUNT_ARTIFACT ); | |||
// assert if removed from repo | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.jar" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.jar" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.jar.md5" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.jar.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.jar.sha1" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.jar.sha1" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.pom" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.pom" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.pom.md5" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.pom.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.pom.sha1" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.153317-1.pom.sha1" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.jar" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.jar" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.jar.md5" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.jar.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.jar.sha1" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.jar.sha1" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.pom" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.pom" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.pom.md5" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.pom.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.pom.sha1" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070504.160758-2.pom.sha1" ).exists() ); | |||
// assert if not removed from repo | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.jar" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.jar" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.jar.md5" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.jar.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.jar.sha1" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.jar.sha1" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.pom" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.pom" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.pom.md5" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.pom.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.pom.sha1" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070505.090015-3.pom.sha1" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.jar" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.jar" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.jar.md5" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.jar.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.jar.sha1" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.jar.sha1" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.pom" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.pom" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.pom.md5" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.pom.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.pom.sha1" ).exists() ); | |||
"target/test/test-repo/org/jruby/plugins/jruby-rake-plugin/1.0RC1-SNAPSHOT/jruby-rake-plugin-1.0RC1-20070506.090132-4.pom.sha1" ).exists() ); | |||
FileUtils.deleteDirectory( testDir ); | |||
} | |||
/** | |||
@@ -124,192 +125,88 @@ public class RetentionCountRepositoryPurgeTest | |||
{ | |||
populateIfPomWasFoundDb(); | |||
File testDir = new File( "target/test" ); | |||
testDir.mkdir(); | |||
FileUtils.copyDirectoryToDirectory( new File( "target/test-classes/test-repo" ), testDir ); | |||
repoPurge.process( PATH_TO_BY_RETENTION_COUNT_POM ); | |||
// assert if removed from repo | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070427.065136-1.jar" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070427.065136-1.jar" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070427.065136-1.jar.md5" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070427.065136-1.jar.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070427.065136-1.jar.sha1" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070427.065136-1.jar.sha1" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070427.065136-1.pom" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070427.065136-1.pom" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070427.065136-1.pom.md5" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070427.065136-1.pom.md5" ).exists() ); | |||
assertFalse( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070427.065136-1.pom.sha1" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070427.065136-1.pom.sha1" ).exists() ); | |||
// assert if not removed from repo | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3.pom" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3.pom" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3.pom.md5" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3.pom.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3.pom.sha1" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3.pom.sha1" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3.jar" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3.jar" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3.jar.md5" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3.jar.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3.jar.sha1" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3.jar.sha1" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3-sources.jar" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3-sources.jar" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3-sources.jar.md5" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3-sources.jar.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3-sources.jar.sha1" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070615.105019-3-sources.jar.sha1" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2.pom" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2.pom" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2.pom.md5" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2.pom.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2.pom.sha1" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2.pom.sha1" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2.jar" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2.jar" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2.jar.md5" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2.jar.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2.jar.sha1" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2.jar.sha1" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2-sources.jar" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2-sources.jar" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2-sources.jar.md5" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2-sources.jar.md5" ).exists() ); | |||
assertTrue( new File( | |||
"target/test-classes/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2-sources.jar.sha1" ).exists() ); | |||
"target/test/test-repo/org/codehaus/castor/castor-anttasks/1.1.2-SNAPSHOT/castor-anttasks-1.1.2-20070506.163513-2-sources.jar.sha1" ).exists() ); | |||
FileUtils.deleteDirectory( testDir ); | |||
} | |||
public void populateIfJarWasFoundDb() | |||
throws Exception | |||
{ | |||
// Create it | |||
ArchivaArtifact artifact = | |||
dao.createArtifact( "org.jruby.plugins", "jruby-rake-plugin", "1.0RC1-20070504.153317-1", "", "jar" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
// Save it. | |||
ArchivaArtifact savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
//POM | |||
artifact = | |||
dao.createArtifact( "org.jruby.plugins", "jruby-rake-plugin", "1.0RC1-20070504.153317-1", "", "pom" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
//JAR | |||
artifact = | |||
dao.createArtifact( "org.jruby.plugins", "jruby-rake-plugin", "1.0RC1-20070504.160758-2", "", "jar" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
List versions = new ArrayList(); | |||
versions.add( "1.0RC1-20070504.153317-1" ); | |||
versions.add( "1.0RC1-20070504.160758-2" ); | |||
versions.add( "1.0RC1-20070505.090015-3" ); | |||
versions.add( "1.0RC1-20070506.090132-4" ); | |||
//POM | |||
artifact = | |||
dao.createArtifact( "org.jruby.plugins", "jruby-rake-plugin", "1.0RC1-20070504.160758-2", "", "pom" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
//JAR | |||
artifact = | |||
dao.createArtifact( "org.jruby.plugins", "jruby-rake-plugin", "1.0RC1-20070505.090015-3", "", "jar" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
//POM | |||
artifact = | |||
dao.createArtifact( "org.jruby.plugins", "jruby-rake-plugin", "1.0RC1-20070505.090015-3", "", "pom" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
//JAR | |||
artifact = | |||
dao.createArtifact( "org.jruby.plugins", "jruby-rake-plugin", "1.0RC1-20070506.090132-4", "", "jar" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
//POM | |||
artifact = | |||
dao.createArtifact( "org.jruby.plugins", "jruby-rake-plugin", "1.0RC1-20070506.090132-4", "", "pom" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
populateDb( "org.jruby.plugins", "jruby-rake-plugin", versions ); | |||
} | |||
public void populateIfPomWasFoundDb() | |||
throws Exception | |||
{ | |||
// Create it | |||
ArchivaArtifact artifact = | |||
dao.createArtifact( "org.codehaus.castor", "castor-anttasks", "1.1.2-20070427.065136-1", "", "jar" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
ArchivaArtifact savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
//POM | |||
artifact = dao.createArtifact( "org.codehaus.castor", "castor-anttasks", "1.1.2-20070427.065136-1", "", "pom" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
//JAR | |||
artifact = dao.createArtifact( "org.codehaus.castor", "castor-anttasks", "1.1.2-20070615.105019-3", "", "jar" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
//POM | |||
artifact = dao.createArtifact( "org.codehaus.castor", "castor-anttasks", "1.1.2-20070615.105019-3", "", "pom" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
//JAR | |||
artifact = dao.createArtifact( "org.codehaus.castor", "castor-anttasks", "1.1.2-20070506.163513-2", "", "jar" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
List versions = new ArrayList(); | |||
versions.add( "1.1.2-20070427.065136-1" ); | |||
versions.add( "1.1.2-20070615.105019-3" ); | |||
versions.add( "1.1.2-20070506.163513-2" ); | |||
//POM | |||
artifact = dao.createArtifact( "org.codehaus.castor", "castor-anttasks", "1.1.2-20070506.163513-2", "", "pom" ); | |||
assertNotNull( artifact ); | |||
artifact.getModel().setLastModified( new Date() ); | |||
artifact.getModel().setOrigin( "test" ); | |||
savedArtifact = dao.saveArtifact( artifact ); | |||
assertNotNull( savedArtifact ); | |||
populateDb( "org.codehaus.castor", "castor-anttasks", versions ); | |||
} | |||
} |
@@ -0,0 +1,58 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ 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. | |||
--> | |||
<component-set> | |||
<components> | |||
<!-- JdoAccess --> | |||
<component> | |||
<role>org.apache.maven.archiva.database.jdo.JdoAccess</role> | |||
<role-hint>archiva</role-hint> | |||
<implementation>org.apache.maven.archiva.database.jdo.JdoAccess</implementation> | |||
<requirements> | |||
<requirement> | |||
<role>org.codehaus.plexus.jdo.JdoFactory</role> | |||
<role-hint>archiva</role-hint> | |||
</requirement> | |||
</requirements> | |||
</component> | |||
<!-- JDO Factory --> | |||
<component> | |||
<role>org.codehaus.plexus.jdo.JdoFactory</role> | |||
<role-hint>archiva</role-hint> | |||
<implementation>org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory</implementation> | |||
<configuration> | |||
<persistenceManagerFactoryClass>org.jpox.PersistenceManagerFactoryImpl</persistenceManagerFactoryClass> | |||
<driverName>org.hsqldb.jdbcDriver</driverName> | |||
<userName>sa</userName> | |||
<password></password> | |||
<url>jdbc:hsqldb:mem:testdb</url> | |||
<otherProperties> | |||
<property> | |||
<name>javax.jdo.PersistenceManagerFactoryClass</name> | |||
<value>org.jpox.PersistenceManagerFactoryImpl</value> | |||
</property> | |||
</otherProperties> | |||
</configuration> | |||
</component> | |||
</components> | |||
</component-set> |
@@ -0,0 +1,290 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ 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. | |||
--> | |||
<component-set> | |||
<components> | |||
<!-- for testing repo purge using retention count --> | |||
<component> | |||
<role>org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer</role> | |||
<role-hint>repo-purge-consumer-by-retention-count</role-hint> | |||
<implementation>org.apache.maven.archiva.consumers.core.repository.RepositoryPurgeConsumer</implementation> | |||
<requirements> | |||
<requirement> | |||
<role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role> | |||
<role-hint>retention-count</role-hint> | |||
</requirement> | |||
<requirement> | |||
<role>org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayoutFactory</role> | |||
</requirement> | |||
<requirement> | |||
<role>org.apache.maven.archiva.database.ArchivaDAO</role> | |||
<role-hint>jdo</role-hint> | |||
</requirement> | |||
<requirement> | |||
<role>org.apache.maven.archiva.configuration.FileTypes</role> | |||
</requirement> | |||
</requirements> | |||
<configuration> | |||
<id>repository-purge</id> | |||
<description>Purge repository of old snapshots</description> | |||
</configuration> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role> | |||
<role-hint>retention-count</role-hint> | |||
<implementation>org.apache.maven.archiva.configuration.DefaultArchivaConfiguration</implementation> | |||
<requirements> | |||
<requirement> | |||
<role>org.codehaus.plexus.registry.Registry</role> | |||
<role-hint>retention-count</role-hint> | |||
</requirement> | |||
</requirements> | |||
</component> | |||
<component> | |||
<role>org.codehaus.plexus.registry.Registry</role> | |||
<role-hint>retention-count</role-hint> | |||
<implementation>org.codehaus.plexus.registry.commons.CommonsConfigurationRegistry</implementation> | |||
<configuration> | |||
<properties> | |||
<xml fileName="${basedir}/src/test/conf/repository-manager.xml" | |||
config-name="org.apache.maven.archiva" config-at="org.apache.maven.archiva"/> | |||
</properties> | |||
</configuration> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayoutFactory</role> | |||
<implementation>org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayoutFactory</implementation> | |||
<requirements> | |||
<requirement> | |||
<role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role> | |||
<role-hint>retention-count</role-hint> | |||
</requirement> | |||
<requirement> | |||
<role>org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayout</role> | |||
<field-name>layouts</field-name> | |||
</requirement> | |||
</requirements> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayout</role> | |||
<role-hint>default</role-hint> | |||
<implementation>org.apache.maven.archiva.repository.layout.DefaultBidirectionalRepositoryLayout</implementation> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.configuration.FileTypes</role> | |||
<implementation>org.apache.maven.archiva.configuration.FileTypes</implementation> | |||
<requirements> | |||
<requirement> | |||
<role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role> | |||
<role-hint>retention-count</role-hint> | |||
</requirement> | |||
</requirements> | |||
</component> | |||
<!-- for testing repo purge by # of days old and delete cleanupSnapshots --> | |||
<component> | |||
<role>org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer</role> | |||
<role-hint>repo-purge-consumer-by-days-old</role-hint> | |||
<implementation>org.apache.maven.archiva.consumers.core.repository.RepositoryPurgeConsumer</implementation> | |||
<requirements> | |||
<requirement> | |||
<role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role> | |||
<role-hint>days-old</role-hint> | |||
</requirement> | |||
<requirement> | |||
<role>org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayoutFactory</role> | |||
</requirement> | |||
<requirement> | |||
<role>org.apache.maven.archiva.database.ArchivaDAO</role> | |||
<role-hint>jdo</role-hint> | |||
</requirement> | |||
<requirement> | |||
<role>org.apache.maven.archiva.configuration.FileTypes</role> | |||
</requirement> | |||
</requirements> | |||
<configuration> | |||
<id>repository-purge</id> | |||
<description>Purge repository of old snapshots</description> | |||
</configuration> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role> | |||
<role-hint>days-old</role-hint> | |||
<implementation>org.apache.maven.archiva.configuration.DefaultArchivaConfiguration</implementation> | |||
<requirements> | |||
<requirement> | |||
<role>org.codehaus.plexus.registry.Registry</role> | |||
<role-hint>days-old</role-hint> | |||
</requirement> | |||
</requirements> | |||
</component> | |||
<component> | |||
<role>org.codehaus.plexus.registry.Registry</role> | |||
<role-hint>days-old</role-hint> | |||
<implementation>org.codehaus.plexus.registry.commons.CommonsConfigurationRegistry</implementation> | |||
<configuration> | |||
<properties> | |||
<xml fileName="${basedir}/src/test/conf/repository-manager-daysOld.xml" | |||
config-name="org.apache.maven.archiva" config-at="org.apache.maven.archiva"/> | |||
</properties> | |||
</configuration> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayoutFactory</role> | |||
<implementation>org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayoutFactory</implementation> | |||
<requirements> | |||
<requirement> | |||
<role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role> | |||
<role-hint>days-old</role-hint> | |||
</requirement> | |||
<requirement> | |||
<role>org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayout</role> | |||
<field-name>layouts</field-name> | |||
</requirement> | |||
</requirements> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayout</role> | |||
<role-hint>default</role-hint> | |||
<implementation>org.apache.maven.archiva.repository.layout.DefaultBidirectionalRepositoryLayout</implementation> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.configuration.FileTypes</role> | |||
<implementation>org.apache.maven.archiva.configuration.FileTypes</implementation> | |||
<requirements> | |||
<requirement> | |||
<role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role> | |||
<role-hint>days-old</role-hint> | |||
</requirement> | |||
</requirements> | |||
</component> | |||
<!-- DAOs --> | |||
<component> | |||
<role>org.apache.maven.archiva.database.ArchivaDAO</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.database.jdo.JdoArchivaDAO</implementation> | |||
<requirements> | |||
<requirement> | |||
<role>org.apache.maven.archiva.database.jdo.JdoAccess</role> | |||
<role-hint>archiva</role-hint> | |||
</requirement> | |||
<requirement> | |||
<role>org.apache.maven.archiva.database.ArtifactDAO</role> | |||
<role-hint>jdo</role-hint> | |||
</requirement> | |||
<requirement> | |||
<role>org.apache.maven.archiva.database.ProjectModelDAO</role> | |||
<role-hint>jdo</role-hint> | |||
</requirement> | |||
<requirement> | |||
<role>org.apache.maven.archiva.database.RepositoryDAO</role> | |||
<role-hint>jdo</role-hint> | |||
</requirement> | |||
<requirement> | |||
<role>org.apache.maven.archiva.database.RepositoryProblemDAO</role> | |||
<role-hint>jdo</role-hint> | |||
</requirement> | |||
</requirements> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.database.ArtifactDAO</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.database.jdo.JdoArtifactDAO</implementation> | |||
<requirements> | |||
<requirement> | |||
<role>org.apache.maven.archiva.database.jdo.JdoAccess</role> | |||
<role-hint>archiva</role-hint> | |||
</requirement> | |||
</requirements> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.database.ProjectModelDAO</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.database.jdo.JdoProjectModelDAO</implementation> | |||
<requirements> | |||
<requirement> | |||
<role>org.apache.maven.archiva.database.jdo.JdoAccess</role> | |||
<role-hint>archiva</role-hint> | |||
</requirement> | |||
</requirements> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.database.RepositoryDAO</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.database.jdo.JdoRepositoryDAO</implementation> | |||
<requirements> | |||
<requirement> | |||
<role>org.apache.maven.archiva.database.jdo.JdoAccess</role> | |||
<role-hint>archiva</role-hint> | |||
</requirement> | |||
</requirements> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.database.RepositoryProblemDAO</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.database.jdo.JdoRepositoryProblemDAO</implementation> | |||
<requirements> | |||
<requirement> | |||
<role>org.apache.maven.archiva.database.jdo.JdoAccess</role> | |||
<role-hint>archiva</role-hint> | |||
</requirement> | |||
</requirements> | |||
</component> | |||
<!-- JdoAccess --> | |||
<component> | |||
<role>org.apache.maven.archiva.database.jdo.JdoAccess</role> | |||
<role-hint>archiva</role-hint> | |||
<implementation>org.apache.maven.archiva.database.jdo.JdoAccess</implementation> | |||
<requirements> | |||
<requirement> | |||
<role>org.codehaus.plexus.jdo.JdoFactory</role> | |||
<role-hint>archiva</role-hint> | |||
</requirement> | |||
</requirements> | |||
</component> | |||
<!-- JDO Factory --> | |||
<component> | |||
<role>org.codehaus.plexus.jdo.JdoFactory</role> | |||
<role-hint>archiva</role-hint> | |||
<implementation>org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory</implementation> | |||
<configuration> | |||
<persistenceManagerFactoryClass>org.jpox.PersistenceManagerFactoryImpl</persistenceManagerFactoryClass> | |||
<driverName>org.hsqldb.jdbcDriver</driverName> | |||
<userName>sa</userName> | |||
<password></password> | |||
<url>jdbc:hsqldb:mem:testdb</url> | |||
<otherProperties> | |||
<property> | |||
<name>javax.jdo.PersistenceManagerFactoryClass</name> | |||
<value>org.jpox.PersistenceManagerFactoryImpl</value> | |||
</property> | |||
</otherProperties> | |||
</configuration> | |||
</component> | |||
</components> | |||
</component-set> |
@@ -0,0 +1 @@ | |||
9e0648be2296d12b8bb523e68d05cf42 maven-plugin-plugin-2.2.jar |
@@ -0,0 +1 @@ | |||
541c13c9587571df049c23f836e281240bcd83c0 |
@@ -0,0 +1,128 @@ | |||
<?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> |
@@ -0,0 +1 @@ | |||
9ecd734d6f134fcca385f60a491202df maven-plugin-plugin-2.2.pom |
@@ -0,0 +1 @@ | |||
00640eafefa3c3866e12dacfd12b73f00da66193 |
@@ -0,0 +1,11 @@ | |||
<?xml version="1.0" encoding="UTF-8"?><metadata> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-plugin-plugin</artifactId> | |||
<version>2.3-SNAPSHOT</version> | |||
<versioning> | |||
<snapshot> | |||
<localCopy>true</localCopy> | |||
</snapshot> | |||
<lastUpdated>20070315032817</lastUpdated> | |||
</versioning> | |||
</metadata> |
@@ -0,0 +1 @@ | |||
6f9989b96a593509d03dcd3afbc0d842 maven-plugin-plugin-2.3-SNAPSHOT.jar |
@@ -0,0 +1 @@ | |||
1e45a02cf1c1952f56e36b8a857eea3f5ac7acd2 maven-plugin-plugin-2.3-SNAPSHOT.jar |
@@ -0,0 +1,123 @@ | |||
<?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> |
@@ -0,0 +1 @@ | |||
a678808722c980a6d3e4e888fdada892 maven-plugin-plugin-2.3-SNAPSHOT.pom |
@@ -0,0 +1 @@ | |||
6eb8dcc14cd43cef58bbe6476ea38dd3fa574b96 maven-plugin-plugin-2.3-SNAPSHOT.pom |
@@ -0,0 +1 @@ | |||
83468d09e78c24ca31ae4140dbeaa221 maven-plugin-plugin-2.3-sources.jar |
@@ -0,0 +1 @@ | |||
7792c67953b0bbbe4587bbf98d1fbfa74ddb3465 |
@@ -0,0 +1 @@ | |||
b9e23af960564275a5c2be817dcb0201 maven-plugin-plugin-2.3.jar |
@@ -0,0 +1 @@ | |||
984bfa6399e504f3085c01881f8bf955187d26a2 |
@@ -0,0 +1,153 @@ | |||
<?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> | |||
@@ -0,0 +1 @@ | |||
02126b4695466d4b20e6a9c7f1896187 maven-plugin-plugin-2.3.pom |
@@ -0,0 +1 @@ | |||
db261a60723ffc76ce240ad81ce2a3d79aa57810 |
@@ -0,0 +1,13 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<metadata> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-plugin-plugin</artifactId> | |||
<version>2.3-SNAPSHOT</version> | |||
<versioning> | |||
<latest>2.3-SNAPSHOT</latest> | |||
<versions> | |||
<version>2.3-SNAPSHOT</version> | |||
</versions> | |||
<lastUpdated>20070315032817</lastUpdated> | |||
</versioning> | |||
</metadata> |
@@ -0,0 +1 @@ | |||
29907955e4aef588f3e9477aa1f71e4e maven-source-plugin-2.0.2-sources.jar |
@@ -0,0 +1 @@ | |||
18c816fb4176a129956d6c42ba6bb959ccee5613 |
@@ -0,0 +1 @@ | |||
431dee6147d892294d73cbbf29489c80 maven-source-plugin-2.0.2.jar |
@@ -0,0 +1 @@ | |||
18c2aeb3f4a900fb2c457531d5b8e6b019cdf4a8 |
@@ -0,0 +1,52 @@ | |||
<?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> |
@@ -0,0 +1 @@ | |||
7ef3a2b3e91412d5395e68b08dfaf854 maven-source-plugin-2.0.2.pom |
@@ -0,0 +1 @@ | |||
ac861e0c832b6775c8cc43369d7b4a648ddf64af |
@@ -0,0 +1,11 @@ | |||
<?xml version="1.0" encoding="UTF-8"?><metadata> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-source-plugin</artifactId> | |||
<version>2.0.3-SNAPSHOT</version> | |||
<versioning> | |||
<snapshot> | |||
<localCopy>true</localCopy> | |||
</snapshot> | |||
<lastUpdated>20070403120932</lastUpdated> | |||
</versioning> | |||
</metadata> |
@@ -0,0 +1 @@ | |||
aa8658e5d84a07979f7cef1f808c24ee maven-source-plugin-2.0.3-SNAPSHOT.jar |
@@ -0,0 +1 @@ | |||
15e81b93607fa54f15cb87e727aaa7303e7338e2 maven-source-plugin-2.0.3-SNAPSHOT.jar |
@@ -0,0 +1,59 @@ | |||
<?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> |
@@ -0,0 +1 @@ | |||
53e82123995adba7f35561fb511e6e0c maven-source-plugin-2.0.3-SNAPSHOT.pom |
@@ -0,0 +1 @@ | |||
b5ab0c9e3eccf6042b3d00a974acabb9cdeb3ca9 maven-source-plugin-2.0.3-SNAPSHOT.pom |
@@ -0,0 +1,11 @@ | |||
<?xml version="1.0" encoding="UTF-8"?><metadata> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-source-plugin</artifactId> | |||
<version>2.0.4-SNAPSHOT</version> | |||
<versioning> | |||
<snapshot> | |||
<localCopy>true</localCopy> | |||
</snapshot> | |||
<lastUpdated>20070427033345</lastUpdated> | |||
</versioning> | |||
</metadata> |
@@ -0,0 +1 @@ | |||
232eae2f45bc5b25049c31a58ae67e53 maven-source-plugin-2.0.4-SNAPSHOT.jar |
@@ -0,0 +1 @@ | |||
dae4564b91119a4450cd30364e0b5b9c3fdf8189 maven-source-plugin-2.0.4-SNAPSHOT.jar |
@@ -0,0 +1,69 @@ | |||
<?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> |
@@ -0,0 +1 @@ | |||
6d3d45f2bf173ee1472671a805f056a9 maven-source-plugin-2.0.4-SNAPSHOT.pom |
@@ -0,0 +1 @@ | |||
6fb9f0ed8316c560a5a7ef97312838a5e9b103fa maven-source-plugin-2.0.4-SNAPSHOT.pom |
@@ -0,0 +1,13 @@ | |||
<?xml version="1.0" encoding="UTF-8"?><metadata> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-source-plugin</artifactId> | |||
<version>2.0.3-SNAPSHOT</version> | |||
<versioning> | |||
<latest>2.0.4-SNAPSHOT</latest> | |||
<versions> | |||
<version>2.0.3-SNAPSHOT</version> | |||
<version>2.0.4-SNAPSHOT</version> | |||
</versions> | |||
<lastUpdated>20070427033345</lastUpdated> | |||
</versioning> | |||
</metadata> |