* {{{consumers.html} Configuring repository scanning and consumers}}
+ * {{{staging-repositories.html} Staging and merging repositories}}
+
[]
--- /dev/null
+ ------
+ Staging Repositories
+ ------
+
+Staging Repositories
+
+ Starting with Archiva 1.4, staging repositories are supported. A staging repository is a repository you use
+ to stage a release (while it undergoes testing and voting), before the release is officially announced and published
+ to a releases repository where users can obtain it.
+
+ With the support of staging repositories comes the ability to merge repositories from the web UI. By merging, we mean
+ promoting the artifacts in the staging repository to the managed repository. In the current
+ implementation, a user with the System Administrator role can create and attach a staging repository to an existing
+ managed repository. An attached staging repository is a shadow of its managed repository, meaning they have the same
+ configuration.
+
+ We append <<-stage>> to the managed repository's ID to identify its staging repository. For example, repository
+ <<<test>>> would have a staging repository called <<<test-stage>>>.
+
+ If you're creating a new managed repository, just tick the <<<Create stage repository>>> check box. Otherwise, if
+ you already have an existing managed repository and you want to create a staging repository, just edit the managed
+ repository's configuration and tick the <<<Create stage repository>>> checkbox, then save the configuration. A staging
+ repository directory will be created beside (as a sibling of) the managed repository directory, again with -stage
+ appended to the name.
+
+ <<<Note:>>> By un-ticking the <<<Create stage repository>>> checkbox, the user can delete the attached staging
+ repository. If the managed repository is deleted, then its attached staging repository is also deleted.
+
+ The default <<<snapshots>>> and <<<internal>>> repositories do not have staging repositories configured by default,
+ however they can be added by editing the repository configuration.
+
+* Populating the Staging Repository
+
+ The staging repository can be populated in the same way as a normal managed repository. You can configure your Maven
+ build's <<<distributionManagement>>> section to deploy to the repository, or use Archiva's web-based upload feature.
+
+
+* Merging Repositories
+
+ To merge or promote the artifacts in a staging repository to the managed repository, just click the <<<Merge>>> button
+ in the repository configuration page.
+
+[../images/repository-merge.png] Merge Button
+
+ Archiva will check for conflicting artifacts between the two repositories, and list them (if it finds conflicts).
+ The user will be asked to choose between two actions:
+
+ [[1]] <<<Merge All>>> - ignore all conflicting artifacts and perform merging for all.
+
+ [[2]] <<<Merge With Skip>>> - skip all conflicting artifacts and merge only the non-conflicting ones.
+
+ []
+
+[../images/conflicting-artifacts.png] Merge Actions
+
+ In future, we plan to enhance this by allowing a user to select only specific artifacts to merge.
+
+
+
<item name="Network Proxies" href="/adminguide/network-proxies.html" />
<item name="Legacy (Maven 1) Support" href="/adminguide/legacy.html" />
<item name="Consumers" href="/adminguide/consumers.html" />
+ <item name="Staging Repositories" href="/adminguide/staging-repositories.html"/>
</item>
<item name="Configuration Files" href="/adminguide/configuration-files.html" />
<item name="Log Files" href="/adminguide/logging.html" collapse="true">
{
return null; //To change body of implemented methods use File | Settings | File Templates.
}
+
+ public List<ArtifactMetadata> getArtifacts(String repositoryId){
+ return null;
+ }
}
{
this.artifactsByDateRange = artifactsByDateRange;
}
+
+ public List<ArtifactMetadata> getArtifacts( String repositoryId )
+ {
+ return artifactsByDateRange;
+ }
}
}
--- /dev/null
+package org.apache.archiva.web.test;
+
+/*
+ * 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.archiva.web.test.parent.AbstractMergingRepositoriesTest;
+import org.testng.annotations.Test;
+
+@Test(groups = {"merging"}, dependsOnMethods = {"testWithCorrectUsernamePassword"}, sequential = true)
+public class MergingRepositoriesTest
+ extends AbstractMergingRepositoriesTest
+{
+
+ public void testAddStagingRepository()
+ {
+ goToRepositoriesPage();
+ getSelenium().open( "/archiva/admin/addRepository.action" );
+ addStagingRepository( "merging-repo", "merging-repo", getRepositoryDir() + "merging-repo/", "",
+ "Maven 2.x Repository", "0 0 * * * ?", "", "" );
+ assertTextPresent( "merging-repo" );
+ }
+
+ // here we upload an artifact to the staging repository
+ @Test(dependsOnMethods = {"testAddStagingRepository"})
+ public void testAddArtifactToStagingRepository()
+ {
+ addArtifact( getGroupId(), getArtifactId(), getVersion(), getPackaging(), getValidArtifactFilePath(),
+ "merging-repo-stage" );
+ assertTextPresent( "Artifact '" + getGroupId() + ":" + getArtifactId() + ":" + getVersion() +
+ "' was successfully deployed to repository 'merging-repo-stage'" );
+ }
+
+ // here we test the merging (no conflicts artifacts are available)
+ @Test(dependsOnMethods = {"testAddArtifactToStagingRepository"})
+ public void testMerging()
+ {
+ goToRepositoriesPage();
+ clickButtonWithValue( "Merge" );
+ assertTextPresent( "No conflicting artifacts" );
+ clickButtonWithValue( "Merge All" );
+ assertTextPresent( "Repository 'merging-repo-stage' successfully merged to 'merging-repo'." );
+ }
+
+ // check audit updating is done properly or not
+ @Test(dependsOnMethods = {"testMerging"})
+ public void testAuditLogs()
+ {
+ goToAuditLogReports();
+ assertTextPresent( "Merged Artifact" );
+ assertTextPresent( "merging-repo" );
+ }
+
+ // merging is done by skipping conflicts
+ @Test(dependsOnMethods = {"testMerging"})
+ public void testMergingWithSkippingConflicts()
+ {
+ goToRepositoriesPage();
+ clickButtonWithValue( "Merge" );
+ assertTextPresent( "WARNING: The following are the artifacts in conflict." );
+ clickButtonWithValue( "Merge With Skip" );
+ assertTextPresent( "Repository 'merging-repo-stage' successfully merged to 'merging-repo'." );
+ }
+
+ // merging all
+ @Test(dependsOnMethods = {"testMerging"})
+ public void testMergingWithOutSkippingConflicts()
+ {
+ goToRepositoriesPage();
+ clickButtonWithValue( "Merge" );
+ assertTextPresent( "WARNING: The following are the artifacts in conflict." );
+ clickButtonWithValue( "Merge All" );
+ assertTextPresent( "Repository 'merging-repo-stage' successfully merged to 'merging-repo'." );
+ }
+
+ // change the configuaration first and try to upload existing artifact to the repository
+ public void testConfigurationChangesOfStagingRepository()
+ {
+ editManagedRepository();
+ addArtifact( getGroupId(), getArtifactId(), getVersion(), getPackaging(), getValidArtifactFilePath(),
+ "merging-repo-stage" );
+ assertTextPresent(
+ "Overwriting released artifacts in repository '" + "merging-repo-stage" + "' is not allowed." );
+ }
+
+}
\ No newline at end of file
clickButtonWithValue( "Add Repository" );
}
+ // add managed repository and its staging repository
+ public void addStagingRepository( String identifier, String name, String directory, String indexDirectory,
+ String type, String cron, String daysOlder, String retentionCount )
+ {
+ setFieldValue( "repository.id", identifier );
+ setFieldValue( "repository.name", name );
+ setFieldValue( "repository.location", directory );
+ setFieldValue( "repository.indexDir", indexDirectory );
+ selectValue( "repository.layout", type );
+ setFieldValue( "repository.refreshCronExpression", cron );
+ setFieldValue( "repository.daysOlder", daysOlder );
+ setFieldValue( "repository.retentionCount", retentionCount );
+ checkField( "stageNeeded" );
+
+ clickButtonWithValue( "Add Repository" );
+ }
+
protected void logout()
{
clickLinkWithText( "Logout" );
--- /dev/null
+package org.apache.archiva.web.test.parent;
+
+/*
+ * 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 java.io.File;
+
+public class AbstractMergingRepositoriesTest
+ extends AbstractArchivaTest
+{
+
+ public void goToAuditLogReports()
+ {
+ getSelenium().open( "/archiva/report/queryAuditLogReport.action" );
+ }
+
+ public String getRepositoryDir()
+ {
+ File f = new File( "" );
+ String artifactFilePath = f.getAbsolutePath();
+ return artifactFilePath + "/target/";
+ }
+
+ public void editManagedRepository()
+ {
+ goToRepositoriesPage();
+ clickLinkWithXPath( "//div[@id='contentArea']/div/div[5]/div[1]/a[1]/img" );
+ assertPage( "Apache Archiva \\ Admin: Edit Managed Repository" );
+ checkField( "repository.blockRedeployments" );
+ clickButtonWithValue( "Update Repository" );
+ }
+
+ public String getGroupId()
+ {
+ return getProperty( "VALIDARTIFACT_GROUPID" );
+ }
+
+ public String getArtifactId()
+ {
+ return getProperty( "VALIDARTIFACT_ARTIFACTID" );
+ }
+
+ public String getVersion()
+ {
+ return getProperty( "VERSION" );
+ }
+
+ public String getPackaging()
+ {
+ return getProperty( "PACKAGING" );
+ }
+
+ public String getValidArtifactFilePath()
+ {
+ return "src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar";
+ }
+
+}
~ 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">
+<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.archiva</groupId>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-lucene-consumers</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>stage-repository-merge</artifactId>
+ <version>1.4-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-signature-consumers</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>org.apache.archiva</groupId> <!-- FIXME: temporary coupling to plugin, should be runtime -->
+ <groupId>org.apache.archiva</groupId>
+ <!-- FIXME: temporary coupling to plugin, should be runtime -->
<artifactId>maven2-repository</artifactId>
</dependency>
</dependencies>
</excludes>
</configuration>
</plugin>
- -->
+ -->
<!-- hack for jetty:run, archiva web config files are checked in /WEB-INF/ dir -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<phase>compile</phase>
<configuration>
<tasks>
- <mkdir dir="${basedir}/target/archiva/WEB-INF/" />
+ <mkdir dir="${basedir}/target/archiva/WEB-INF/"/>
<copy todir="${basedir}/target/archiva/WEB-INF/">
- <fileset dir="${basedir}/target" includes="classes/" excludes="**/struts.xml" />
+ <fileset dir="${basedir}/target" includes="classes/" excludes="**/struts.xml"/>
</copy>
</tasks>
</configuration>
<configuration>
<tasks>
<copy todir="${basedir}/appserver-base">
- <fileset dir="src/appserver-base" />
+ <fileset dir="src/appserver-base"/>
</copy>
</tasks>
</configuration>
<execution>
<id>unpack-redback-war</id>
<goals>
- <goal>unpack</goal>
+ <goal>unpack</goal>
</goals>
<phase>compile</phase>
<configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.codehaus.redback</groupId>
- <artifactId>redback-struts2-content</artifactId>
- <version>${redback.version}</version>
- <type>war</type>
- <overWrite>false</overWrite>
- <outputDirectory>${project.build.directory}/redback</outputDirectory>
- <excludes>**/struts-security.xml</excludes>
- </artifactItem>
- </artifactItems>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-struts2-content</artifactId>
+ <version>${redback.version}</version>
+ <type>war</type>
+ <overWrite>false</overWrite>
+ <outputDirectory>${project.build.directory}/redback</outputDirectory>
+ <excludes>**/struts-security.xml</excludes>
+ </artifactItem>
+ </artifactItems>
</configuration>
</execution>
</executions>
<!-- Some versions of maven-war-plugin (snapshots) have this incorrectly defaulted to true.
Specifically setting this to false to avoid accidental jar file creation. -->
<archiveClasses>false</archiveClasses>
- <dependentWarExcludes>META-INF/**,WEB-INF/web.xml,WEB-INF/classes/xwork.xml,WEB-INF/lib/**</dependentWarExcludes>
- <warSourceExcludes>WEB-INF/lib/xalan-*.jar,WEB-INF/lib/velocity-dep-*.jar,WEB-INF/lib/xml-apis-*.jar,WEB-INF/lib/wstx-asl-*.jar,WEB-INF/lib/stax-utils-*.jar,WEB-INF/lib/xercesImpl-*.jar</warSourceExcludes>
- </configuration>
+ <dependentWarExcludes>META-INF/**,WEB-INF/web.xml,WEB-INF/classes/xwork.xml,WEB-INF/lib/**
+ </dependentWarExcludes>
+ <warSourceExcludes>
+ WEB-INF/lib/xalan-*.jar,WEB-INF/lib/velocity-dep-*.jar,WEB-INF/lib/xml-apis-*.jar,WEB-INF/lib/wstx-asl-*.jar,WEB-INF/lib/stax-utils-*.jar,WEB-INF/lib/xercesImpl-*.jar
+ </warSourceExcludes>
+ </configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
--- /dev/null
+package org.apache.maven.archiva.web.action;
+
+/*
+ * 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 com.opensymphony.xwork2.Validateable;
+import com.opensymphony.xwork2.Preparable;
+import org.apache.archiva.audit.Auditable;
+import org.apache.archiva.audit.AuditEvent;
+import org.apache.archiva.stagerepository.merge.Maven2RepositoryMerger;
+import org.apache.archiva.metadata.model.ArtifactMetadata;
+import org.apache.archiva.metadata.repository.filter.Filter;
+import org.apache.archiva.metadata.repository.filter.IncludesFilter;
+import org.apache.archiva.metadata.repository.MetadataRepository;
+import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
+import org.apache.maven.archiva.configuration.Configuration;
+import org.apache.maven.archiva.configuration.ArchivaConfiguration;
+import org.apache.maven.archiva.web.action.admin.SchedulerAction;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+
+/**
+ * @plexus.component role="com.opensymphony.xwork2.Action" role-hint="mergeAction" instantiation-strategy="per-lookup"
+ */
+public class
+ MergeAction
+ extends PlexusActionSupport
+ implements Validateable, Preparable, Auditable
+
+{
+ /**
+ * @plexus.requirement role="org.apache.archiva.stagerepository.merge.RepositoryMerger" role-hint="maven2"
+ */
+ private Maven2RepositoryMerger repositoryMerger;
+
+ /**
+ * @plexus.requirement
+ */
+ protected ArchivaConfiguration archivaConfiguration;
+
+ /**
+ * @plexus.requirement role-hint="default"
+ */
+ private MetadataRepository metadataRepository;
+
+ /**
+ * @plexus.requirement role="com.opensymphony.xwork2.Action" role-hint="schedulerAction"
+ */
+ private SchedulerAction scheduler;
+
+ private ManagedRepositoryConfiguration repository;
+
+ private String repoid;
+
+ private String sourceRepoId;
+
+ private final String action = "merge";
+
+ private final String hasConflicts = "CONFLICTS";
+
+ private List<ArtifactMetadata> conflictSourceArtifacts;
+
+ private List<ArtifactMetadata> conflictSourceArtifactsToBeDisplayed;
+
+ public String getConflicts()
+ {
+ sourceRepoId = repoid + "-stage";
+ Configuration config = archivaConfiguration.getConfiguration();
+ ManagedRepositoryConfiguration targetRepoConfig = config.findManagedRepositoryById( sourceRepoId );
+
+ if ( targetRepoConfig != null )
+ {
+ return hasConflicts;
+
+ }
+ else
+ {
+ return ERROR;
+ }
+ }
+
+ public String doMerge()
+ throws Exception
+ {
+ try
+ {
+ List<ArtifactMetadata> sourceArtifacts = metadataRepository.getArtifacts( sourceRepoId );
+
+ if ( repository.isReleases() && !repository.isSnapshots() )
+ {
+ mergeWithOutSnapshots( sourceArtifacts, sourceRepoId, repoid );
+ }
+ else
+ {
+ repositoryMerger.merge( sourceRepoId, repoid );
+
+ for ( ArtifactMetadata metadata : sourceArtifacts )
+ {
+ triggerAuditEvent( repoid, metadata.getId(), AuditEvent.MERGING_REPOSITORIES );
+ }
+
+ }
+ scheduler.scanRepository();
+ addActionMessage( "Repository '" + sourceRepoId + "' successfully merged to '" + repoid + "'." );
+
+ return SUCCESS;
+ }
+ catch ( Exception ex )
+ {
+ ex.printStackTrace();
+ addActionError( "Error occurred while merging the repositories." );
+ return ERROR;
+ }
+ }
+
+ public String mergeBySkippingConflicts()
+ {
+ try
+ {
+ List<ArtifactMetadata> sourceArtifacts = metadataRepository.getArtifacts( sourceRepoId );
+ sourceArtifacts.removeAll( conflictSourceArtifacts );
+
+ if ( repository.isReleases() && !repository.isSnapshots() )
+ {
+ mergeWithOutSnapshots( sourceArtifacts, sourceRepoId, repoid );
+ }
+ else
+ {
+
+ Filter<ArtifactMetadata> artifactsWithOutConflicts =
+ new IncludesFilter<ArtifactMetadata>( sourceArtifacts );
+ repositoryMerger.merge( sourceRepoId, repoid, artifactsWithOutConflicts );
+ for ( ArtifactMetadata metadata : sourceArtifacts )
+ {
+ triggerAuditEvent( repoid, metadata.getId(), AuditEvent.MERGING_REPOSITORIES );
+ }
+ }
+ scheduler.scanRepository();
+ addActionMessage( "Repository '" + sourceRepoId + "' successfully merged to '" + repoid + "'." );
+
+ return SUCCESS;
+ }
+ catch ( Exception ex )
+ {
+ ex.printStackTrace();
+ addActionError( "Error occurred while merging the repositories." );
+ return ERROR;
+ }
+ }
+
+ public String mergeWithOutConlficts()
+ {
+
+ sourceRepoId = repoid + "-stage";
+
+ try
+ {
+ conflictSourceArtifacts = repositoryMerger.getConflictsartifacts( sourceRepoId, repoid );
+ }
+ catch ( Exception e )
+ {
+ addActionError( "Error occurred while merging the repositories." );
+ return ERROR;
+ }
+
+ addActionMessage( "Repository '" + sourceRepoId + "' successfully merged to '" + repoid + "'." );
+
+ return SUCCESS;
+ }
+
+ public ManagedRepositoryConfiguration getRepository()
+ {
+ return repository;
+ }
+
+ public void setRepository( ManagedRepositoryConfiguration repository )
+ {
+ this.repository = repository;
+ }
+
+ public void prepare()
+ throws Exception
+ {
+ sourceRepoId = repoid + "-stage";
+ conflictSourceArtifacts = repositoryMerger.getConflictsartifacts( sourceRepoId, repoid );
+ this.scheduler.setRepoid( repoid );
+
+ Configuration config = archivaConfiguration.getConfiguration();
+ this.repository = config.findManagedRepositoryById( repoid );
+ setConflictSourceArtifactsToBeDisplayed( conflictSourceArtifacts );
+ }
+
+ public String getSourceRepoId()
+ {
+ return sourceRepoId;
+ }
+
+ public void setSourceRepoId( String sourceRepoId )
+ {
+ this.sourceRepoId = sourceRepoId;
+ }
+
+ public String getRepoid()
+ {
+ return repoid;
+ }
+
+ public void setRepoid( String repoid )
+ {
+ this.repoid = repoid;
+ }
+
+ public List<ArtifactMetadata> getConflictSourceArtifacts()
+ {
+ return conflictSourceArtifacts;
+ }
+
+ public void setConflictSourceArtifacts( List<ArtifactMetadata> conflictSourceArtifacts )
+ {
+ this.conflictSourceArtifacts = conflictSourceArtifacts;
+ }
+
+ public List<ArtifactMetadata> getConflictSourceArtifactsToBeDisplayed()
+ {
+ return conflictSourceArtifactsToBeDisplayed;
+ }
+
+ public void setConflictSourceArtifactsToBeDisplayed( List<ArtifactMetadata> conflictSourceArtifacts )
+ throws Exception
+ {
+ this.conflictSourceArtifactsToBeDisplayed = new ArrayList<ArtifactMetadata>();
+ HashMap<String, ArtifactMetadata> map = new HashMap<String, ArtifactMetadata>();
+ for ( ArtifactMetadata metadata : conflictSourceArtifacts )
+ {
+ String metadataId =
+ metadata.getNamespace() + metadata.getProject() + metadata.getProjectVersion() + metadata.getVersion();
+ map.put( metadataId, metadata );
+ }
+ Iterator iterator = map.keySet().iterator();
+
+ while ( iterator.hasNext() )
+ {
+ conflictSourceArtifactsToBeDisplayed.add( map.get( iterator.next() ) );
+ }
+ }
+
+ private void mergeWithOutSnapshots( List<ArtifactMetadata> sourceArtifacts, String sourceRepoId, String repoid )
+ throws Exception
+ {
+ List<ArtifactMetadata> artifactsWithOutSnapshots = new ArrayList<ArtifactMetadata>();
+ for ( ArtifactMetadata metadata : sourceArtifacts )
+ {
+
+ if ( metadata.getProjectVersion().contains( "SNAPSHOT" ) )
+ {
+ artifactsWithOutSnapshots.add( metadata );
+ }
+ else
+ {
+ triggerAuditEvent( repoid, metadata.getId(), AuditEvent.MERGING_REPOSITORIES );
+ }
+
+ }
+ sourceArtifacts.removeAll( artifactsWithOutSnapshots );
+
+ Filter<ArtifactMetadata> artifactListWithOutSnapShots = new IncludesFilter<ArtifactMetadata>( sourceArtifacts );
+ repositoryMerger.merge( sourceRepoId, repoid, artifactListWithOutSnapShots );
+ }
+}
+
* The model for this action.
*/
private ManagedRepositoryConfiguration repository;
-
+
+ private boolean stageNeeded;
+
private String action = "addRepository";
public void prepare()
return INPUT;
}
-
+
public String confirmAdd()
{
return save();
}
-
+
public String commit()
{
File location = new File( repository.getLocation() );
if( location.exists() )
- {
+ {
return CONFIRM;
}
-
+
return save();
}
-
+
private String save()
{
Configuration configuration = archivaConfiguration.getConfiguration();
-
+
String result;
try
{
addRepository( repository, configuration );
triggerAuditEvent( repository.getId(), null, AuditEvent.ADD_MANAGED_REPO );
addRepositoryRoles( repository );
+
+ if ( stageNeeded )
+ {
+ ManagedRepositoryConfiguration stagingRepository = getStageRepoConfig();
+
+ addRepository( stagingRepository, configuration );
+ triggerAuditEvent( stagingRepository.getId(), null, AuditEvent.ADD_MANAGED_REPO );
+ addRepositoryRoles( stagingRepository );
+
+ }
+
result = saveConfiguration( configuration );
}
catch ( RoleManagerException e )
- {
+ {
addActionError( "Role Manager Exception: " + e.getMessage() );
result = INPUT;
}
catch ( IOException e )
- {
+ {
addActionError( "Role Manager Exception: " + e.getMessage() );
result = INPUT;
}
return result;
}
+ private ManagedRepositoryConfiguration getStageRepoConfig()
+ {
+ ManagedRepositoryConfiguration stagingRepository = new ManagedRepositoryConfiguration();
+ stagingRepository.setId( repository.getId() + "-stage" );
+ stagingRepository.setLayout( repository.getLayout() );
+ stagingRepository.setName( repository.getName() + "-stage" );
+ stagingRepository.setBlockRedeployments( repository.isBlockRedeployments() );
+ stagingRepository.setDaysOlder( repository.getDaysOlder() );
+ stagingRepository.setDeleteReleasedSnapshots( repository.isDeleteReleasedSnapshots() );
+ stagingRepository.setIndexDir( repository.getIndexDir() );
+ String path = repository.getLocation();
+ int lastIndex = path.lastIndexOf( '/' );
+ stagingRepository.setLocation( path.substring( 0, lastIndex ) + "/" + stagingRepository.getId() );
+ stagingRepository.setRefreshCronExpression( repository.getRefreshCronExpression() );
+ stagingRepository.setReleases( repository.isReleases() );
+ stagingRepository.setRetentionCount( repository.getRetentionCount() );
+ stagingRepository.setScanned( repository.isScanned() );
+ stagingRepository.setSnapshots( repository.isSnapshots() );
+ return stagingRepository;
+ }
+
@Override
public void validate()
{
addFieldError( "repository.id", "Unable to add new repository with id [" + repoId
+ "], that id already exists as a repository group." );
}
-
+ else if ( repoId.toLowerCase().contains( "stage" ) )
+ {
+ addFieldError( "repository.id", "Unable to add new repository with id [" + repoId +
+ "], rpository id cannot contains word stage" );
+ }
+
if ( !validator.validate( repository.getRefreshCronExpression() ) )
{
addFieldError( "repository.refreshCronExpression", "Invalid cron expression." );
{
this.repository = repository;
}
+
+
+ public void setStageNeeded( boolean stageNeeded )
+ {
+ this.stageNeeded = stageNeeded;
+ }
public String getAction()
{
{
private ManagedRepositoryConfiguration repository;
+ private ManagedRepositoryConfiguration stagingRepository;
+
private String repoid;
/**
if ( StringUtils.isNotBlank( repoid ) )
{
this.repository = archivaConfiguration.getConfiguration().findManagedRepositoryById( repoid );
+ this.stagingRepository = archivaConfiguration.getConfiguration().findManagedRepositoryById( repoid +"-stage");
}
}
}
private String deleteRepository( boolean deleteContents )
- {
+ {
ManagedRepositoryConfiguration existingRepository = repository;
+ ManagedRepositoryConfiguration attachedStagingRepo = stagingRepository;
if ( existingRepository == null )
{
addActionError( "A repository with that id does not exist" );
cleanupRepositoryData( existingRepository );
removeRepository( repoid, configuration );
triggerAuditEvent( repoid, null, AuditEvent.DELETE_MANAGED_REPO );
+ if(attachedStagingRepo !=null)
+ {
+ cleanupRepositoryData( attachedStagingRepo );
+ removeRepository( repoid +"-stage", configuration );
+ triggerAuditEvent(repoid +"-stage", null, AuditEvent.DELETE_MANAGED_REPO );
+
+ }
result = saveConfiguration( configuration );
if ( result.equals( SUCCESS ) )
{
if ( deleteContents )
{
+ if(attachedStagingRepo !=null)
+ {
+ removeContents( attachedStagingRepo );
+ }
removeContents( existingRepository );
}
}
{
archivaConfiguration.getConfiguration().findRepositoryGroupById( repoGroup ).removeRepository( cleanupRepository.getId() );
}
- }
+ }
}
}
*/
private ManagedRepositoryConfiguration repository;
+ private ManagedRepositoryConfiguration stagingRepository;
+
private String repoid;
private final String action = "editRepository";
+ private boolean stageNeeded;
+
/**
* @plexus.requirement
*/
if ( StringUtils.isNotBlank( repoid ) )
{
repository = archivaConfiguration.getConfiguration().findManagedRepositoryById( repoid );
+ stagingRepository = archivaConfiguration.getConfiguration().findManagedRepositoryById( repoid + "-stage" );
}
else if ( repository != null )
{
{
ManagedRepositoryConfiguration existingConfig =
archivaConfiguration.getConfiguration().findManagedRepositoryById( repository.getId() );
-
boolean resetStats = false;
// check if the location was changed
// We are in edit mode, remove the old repository configuration.
removeRepository( repository.getId(), configuration );
+ if ( stagingRepository != null )
+ {
+ removeRepository( stagingRepository.getId(), configuration );
+ }
// Save the repository configuration.
String result;
addRepository( repository, configuration );
triggerAuditEvent( repository.getId(), null, AuditEvent.MODIFY_MANAGED_REPO );
addRepositoryRoles( repository );
+
+ //update changes of the staging repo
+ if ( stageNeeded )
+ {
+
+ stagingRepository = getStageRepoConfig( configuration );
+ addRepository( stagingRepository, configuration );
+ addRepositoryRoles( stagingRepository );
+
+ }
+ //delete staging repo when we dont need it
+ if ( !stageNeeded )
+ {
+ stagingRepository = getStageRepoConfig(configuration);
+ removeRepository( stagingRepository.getId(), configuration );
+ removeContents( stagingRepository );
+ removeRepositoryRoles( stagingRepository );
+ }
+
result = saveConfiguration( configuration );
if ( resetStats )
{
return result;
}
+ private ManagedRepositoryConfiguration getStageRepoConfig( Configuration configuration )
+ {
+ for ( ManagedRepositoryConfiguration repoConf : configuration.getManagedRepositories() )
+ {
+ if ( repoConf.getId().equals( repository.getId() + "-stage" ) )
+ {
+ stagingRepository = repoConf;
+ removeRepository( repoConf .getId() , configuration);
+ updateStagingRepository( stagingRepository );
+ return stagingRepository;
+ }
+ }
+
+ stagingRepository = new ManagedRepositoryConfiguration();
+ updateStagingRepository( stagingRepository );
+
+ return stagingRepository;
+ }
+
+ private void updateStagingRepository( ManagedRepositoryConfiguration stagingRepository )
+ {
+ stagingRepository.setId( repository.getId() + "-stage" );
+ stagingRepository.setLayout( repository.getLayout() );
+ stagingRepository.setName( repository.getName() + "-stage" );
+ stagingRepository.setBlockRedeployments( repository.isBlockRedeployments() );
+ stagingRepository.setDaysOlder( repository.getDaysOlder() );
+ stagingRepository.setDeleteReleasedSnapshots( repository.isDeleteReleasedSnapshots() );
+ stagingRepository.setIndexDir( repository.getIndexDir() );
+ String path = repository.getLocation();
+ int lastIndex = path.lastIndexOf( '/' );
+ stagingRepository.setLocation( path.substring( 0, lastIndex ) + "/" + stagingRepository.getId() );
+ stagingRepository.setRefreshCronExpression( repository.getRefreshCronExpression() );
+ stagingRepository.setReleases( repository.isReleases() );
+ stagingRepository.setRetentionCount( repository.getRetentionCount() );
+ stagingRepository.setScanned( repository.isScanned() );
+ stagingRepository.setSnapshots( repository.isSnapshots() );
+ }
+
@Override
public void validate()
{
private void resetStatistics()
{
repositoryStatisticsManager.deleteStatistics( repository.getId() );
- }
+ }
public String getRepoid()
{
this.repository = repository;
}
+ public boolean isStageNeeded()
+ {
+ return stageNeeded;
+ }
+
+ public void setStageNeeded( boolean stageNeeded )
+ {
+ this.stageNeeded = stageNeeded;
+ }
+
public String getAction()
{
return action;
{
this.repositoryStatisticsManager = repositoryStatisticsManager;
}
+
+ public ManagedRepositoryConfiguration getStagingRepository()
+ {
+ return stagingRepository;
+ }
+
+ public void setStagingRepository( ManagedRepositoryConfiguration stagingRepository )
+ {
+ this.stagingRepository = stagingRepository;
+ }
}
return bundle;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings( "unchecked" )
public void prepare()
{
Configuration config = archivaConfiguration.getConfiguration();
public List<ManagedRepositoryConfiguration> getManagedRepositories()
{
- return managedRepositories;
+ List<ManagedRepositoryConfiguration> managedRepositoriesList = new ArrayList<ManagedRepositoryConfiguration>();
+ for ( ManagedRepositoryConfiguration repoConfig : managedRepositories )
+ {
+ if ( !repoConfig.getId().contains( "stage" ) )
+ {
+ managedRepositoriesList.add( repoConfig );
+ }
+ }
+ return managedRepositoriesList;
}
public List<RemoteRepositoryConfiguration> getRemoteRepositories()
-->
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
- "http://struts.apache.org/dtds/struts-2.0.dtd">
+ "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<!-- Include plexus-security xwork configurations. -->
include a result for 'error' -->
<result name="error">/WEB-INF/jsp/generalError.jsp</result>
<result name="access_to_no_repos">/WEB-INF/jsp/accessToNoRepos.jsp</result>
-
+
</global-results>
</package>
-
+
<!-- Configuration for the default package. -->
<package name="default" extends="base" namespace="/">
<result>/WEB-INF/jsp/results.jsp</result>
<result name="error">/WEB-INF/jsp/quickSearch.jsp</result>
</action>
-
+
<action name="quickSearch" class="searchAction" method="quickSearch">
<result name="input">/WEB-INF/jsp/quickSearch.jsp</result>
<result>/WEB-INF/jsp/results.jsp</result>
<result name="input">/WEB-INF/jsp/findArtifact.jsp</result>
</action>
- <action name="upload" class="uploadAction" method="input">
+ <action name="upload" class="uploadAction" method="input">
<result name="input">/WEB-INF/jsp/upload.jsp</result>
<result name="error">/WEB-INF/jsp/upload.jsp</result>
<result name="success">/WEB-INF/jsp/upload.jsp</result>
<interceptor-ref name="fileUpload"/>
</action>
- <action name="deleteArtifact" class="deleteArtifactAction" method="input">
+ <action name="deleteArtifact" class="deleteArtifactAction" method="input">
<result name="input">/WEB-INF/jsp/deleteArtifact.jsp</result>
<result name="error">/WEB-INF/jsp/deleteArtifact.jsp</result>
<result name="success">/WEB-INF/jsp/deleteArtifact.jsp</result>
<result name="artifact" type="redirect">
/browse/${databaseResults.get(0).getNamespace()}/${databaseResults.get(0).getProject()}/${databaseResults.get(0).getVersion()}
</result>
- </action>
+ </action>
<action name="browse" class="browseAction" method="browse">
<result>/WEB-INF/jsp/browse.jsp</result>
<result>/WEB-INF/jsp/showArtifact.jsp</result>
</action>
- <action name="addMetadataProperty" class="showArtifactAction" method="addMetadataProperty">
+ <action name="addMetadataProperty" class="showArtifactAction" method="addMetadataProperty">
<result name="input">/WEB-INF/jsp/showArtifact.jsp</result>
<result name="success">/WEB-INF/jsp/showArtifact.jsp</result>
</action>
<action name="index" class="repositoriesAction" method="input">
<result name="input">/WEB-INF/jsp/admin/repositories.jsp</result>
</action>
-
+
<!-- .\ REPOSITORY GROUPS \._______________________________________ -->
-
+
<action name="repositoryGroups" class="repositoryGroupsAction" method="input">
<result name="input">/WEB-INF/jsp/admin/repositoryGroups.jsp</result>
</action>
-
+
<action name="addRepositoryGroup" class="repositoryGroupsAction" method="addRepositoryGroup">
<result name="input">/WEB-INF/jsp/admin/repositoryGroups.jsp</result>
<result name="error">/WEB-INF/jsp/admin/repositoryGroups.jsp</result>
<result name="success" type="redirect-action">repositoryGroups</result>
<interceptor-ref name="configuredPrepareParamsStack"/>
</action>
-
+
<action name="confirmDeleteRepositoryGroup" class="deleteRepositoryGroupAction" method="confirmDelete">
<result name="input">/WEB-INF/jsp/admin/deleteRepositoryGroup.jsp</result>
<interceptor-ref name="configuredPrepareParamsStack"/>
</action>
-
+
<action name="deleteRepositoryGroup" class="deleteRepositoryGroupAction" method="delete">
<result name="input">/WEB-INF/jsp/admin/deleteRepositoryGroup.jsp</result>
<result name="error">/WEB-INF/jsp/admin/deleteRepositoryGroup.jsp</result>
<result name="success" type="redirect-action">repositoryGroups</result>
<interceptor-ref name="configuredPrepareParamsStack"/>
</action>
-
+
<action name="addRepositoryToGroup" class="repositoryGroupsAction" method="addRepositoryToGroup">
<result name="input">/WEB-INF/jsp/admin/repositoryGroups.jsp</result>
<result name="error">/WEB-INF/jsp/admin/repositoryGroups.jsp</result>
<result name="success" type="redirect-action">repositoryGroups</result>
<interceptor-ref name="configuredPrepareParamsStack"/>
</action>
-
+
<action name="removeRepositoryFromGroup" class="repositoryGroupsAction" method="removeRepositoryFromGroup">
<result name="input">/WEB-INF/jsp/admin/repositoryGroups.jsp</result>
<result name="error">/WEB-INF/jsp/admin/repositoryGroups.jsp</result>
<result name="success" type="redirect-action">repositoryGroups</result>
<interceptor-ref name="configuredPrepareParamsStack"/>
</action>
-
+
<action name="sortDownRepositoryFromGroup" class="sortRepositoriesAction" method="sortDown">
<result name="input">/WEB-INF/jsp/admin/repositoryGroups.jsp</result>
<result name="error">/WEB-INF/jsp/admin/repositoryGroups.jsp</result>
<result name="success" type="redirect-action">repositoryGroups</result>
<interceptor-ref name="configuredPrepareParamsStack"/>
</action>
-
+
<action name="sortUpRepositoryFromGroup" class="sortRepositoriesAction" method="sortUp">
<result name="input">/WEB-INF/jsp/admin/repositoryGroups.jsp</result>
<result name="error">/WEB-INF/jsp/admin/repositoryGroups.jsp</result>
<action name="indexRepository" class="schedulerAction" method="scanRepository">
<result type="redirect-action">repositories</result>
</action>
-
+
<action name="addRepository" class="addManagedRepositoryAction" method="input">
<result name="input">/WEB-INF/jsp/admin/addRepository.jsp</result>
<result name="error">/WEB-INF/jsp/admin/addRepository.jsp</result>
<interceptor-ref name="configuredPrepareParamsStack"/>
</action>
- <action name="deleteRemoteRepository" class="deleteRemoteRepositoryAction" method="delete">
+
+ <action name="merge" class="mergeAction" method="getConflicts">
+ <result name="CONFLICTS">/WEB-INF/jsp/admin/mergeExcludeConflicts.jsp</result>
+ <result name="success">/WEB-INF/jsp/admin/mergeResults.jsp</result>
+ <interceptor-ref name="configuredPrepareParamsStack"/>
+ </action>
+
+ <action name="deleteRemoteRepository" class="deleteRemoteRepositoryAction" method="input">
<result name="input">/WEB-INF/jsp/admin/deleteRemoteRepository.jsp</result>
<result name="error">/WEB-INF/jsp/admin/deleteRemoteRepository.jsp</result>
<result name="success" type="redirect-action">repositories</result>
<result name="success" type="redirect-action">proxyConnectors</result>
<interceptor-ref name="configuredPrepareParamsStack"/>
</action>
-
+
<action name="enableProxyConnector" class="enableProxyConnectorAction" method="confirm">
<result name="input">/WEB-INF/jsp/admin/enableProxyConnector.jsp</result>
<result name="success" type="redirect-action">proxyConnectors</result>
<result name="blank">/WEB-INF/jsp/reports/blankReport.jsp</result>
<result>/WEB-INF/jsp/reports/basicReport.jsp</result>
</action>
-
+
<action name="generateStatisticsReport" class="generateReport" method="generateStatistics">
<result name="input">/WEB-INF/jsp/reports/pickReport.jsp</result>
<result name="blank">/WEB-INF/jsp/reports/blankReport.jsp</result>
<result>/WEB-INF/jsp/reports/statisticsReport.jsp</result>
</action>
-
+
<!-- TODO: make report filename dynamic -->
<action name="downloadStatsReport" class="generateReport" method="downloadStatisticsReport">
<result name="input">/WEB-INF/jsp/reports/pickReport.jsp</result>
<param name="contentDisposition">attachment; filename="archiva_statistics_report.csv"</param>
</result>
</action>
-
+
<!-- audit logs -->
<action name="queryAuditLogReport" class="viewAuditLogReport" method="input">
<result name="input">/WEB-INF/jsp/reports/auditLogReport.jsp</result>
</action>
-
+
<action name="viewAuditLogReport" class="viewAuditLogReport">
<result name="input">/WEB-INF/jsp/reports/auditLogReport.jsp</result>
<result>/WEB-INF/jsp/reports/auditLogReport.jsp</result>
</action>
-
+
</package>
</struts>
<s:form method="post" action="addRepository!commit" namespace="/admin" validate="true">
<s:textfield name="repository.id" label="Identifier" size="10" required="true"/>
<%@ include file="/WEB-INF/jsp/admin/include/repositoryForm.jspf" %>
+ <s:checkbox name="stageNeeded" value="stageNeeded" label="Create stage repository"/>
<s:submit value="Add Repository"/>
</s:form>
<s:hidden name="repository.id"/>
<s:label label="ID" name="repository.id" />
<%@ include file="/WEB-INF/jsp/admin/include/repositoryForm.jspf" %>
+
+ <c:set var="stats" value="${stagingRepository == null}"/>
+ <jsp:useBean id="stats" type="java.lang.Boolean" scope="page"/>
+ <c:if
+ test='<%= !stats.booleanValue() %>'>
+ <s:checkbox name="stageNeeded" value="true" label="Create stage repository"/>
+ </c:if>
+ <c:if
+ test='<%= stats.booleanValue() %>'>
+ <s:checkbox id="stageNeeded" name="stageNeeded" value="false" label="Create stage repository"/>
+ </c:if>
<s:submit value="Update Repository"/>
</s:form>
<s:checkbox name="repository.scanned" value="repository.scanned" label="Scannable"/>
<s:checkbox name="repository.deleteReleasedSnapshots" value="repository.deleteReleasedSnapshots"
label="Delete Released Snapshots"/>
-
-
--- /dev/null
+<%--
+ ~ 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.
+ --%>
+
+<%@ page contentType="text/html; charset=UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+
+<html>
+<head>
+ <title>Admin: Merge Staging Repository</title>
+ <s:head/>
+</head>
+
+<body>
+
+<h1>Admin: Merge Staging Repository</h1>
+
+<p>
+ Are you sure you want to merge the repository?
+</p>
+
+<div class="infobox">
+ <table class="infotable">
+
+ <c:choose>
+ <c:when test="${empty (conflictSourceArtifacts)}">
+ <h1>No conflicting artifacts</h1>
+
+ <c:if test="${!repository.snapshots and repository.releases}">
+ <div class="warningbox">
+ <p>
+ <strong>WARNING: Repository "${repoid}" does not allow to merge snapshots</strong>
+ </p>
+ </div>
+ </c:if>
+
+ <s:form method="post" action="merge" namespace="/admin" validate="false" theme="simple">
+ <s:hidden name="repoid"/>
+ <div class="buttons">
+ <s:submit value="Merge All" method="doMerge"/>
+ </div>
+ </s:form>
+ </c:when>
+ <c:otherwise>
+ <div class="warningbox">
+ <c:if test="${!repository.snapshots and repository.releases}">
+ <p>
+ <strong>WARNING: Repository "${repoid}" does not allow to merge snapshots</strong>
+ </p>
+ </c:if>
+ <p>
+ <strong>WARNING: The following are the artifacts in conflict.</strong>
+ </p>
+ </div>
+ <c:forEach items="${conflictSourceArtifactsToBeDisplayed}" var="artifact">
+ <tr>
+ <td>Artifact Id :</td>
+ <%--<td><code>${artifact.id}</code></td>--%>
+ <td align="left"> <code>${artifact.namespace} ${" "} ${artifact.project} ${" "} ${artifact.version}</code></td>
+ </tr>
+ </c:forEach>
+ <tr>
+ <td>
+ <s:form action="merge" method="post" namespace="/admin" validate="false">
+ <s:hidden name="repoid"/>
+ <div class="buttons">
+ <table>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <td>
+ <s:submit value="Merge All" method="doMerge"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>
+ <table>
+ <tr>
+ <td>
+ <s:submit value="Merge With Skip" method="mergeBySkippingConflicts"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </s:form>
+ </td>
+ </tr>
+ </c:otherwise>
+ </c:choose>
+ </table>
+</div>
+</body>
+</html>
--- /dev/null
+<%--
+ ~ 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.
+ --%>
+
+<%-- http://www.opensymphony.com/webwork/wikidocs/File%20Upload%20Interceptor.html --%>
+
+<%@ page contentType="text/html; charset=UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+
+<html>
+<head>
+ <title>Admin: Merge Staging Repository</title>
+ <s:head/>
+</head>
+
+<body>
+<h1>Admin: Merge Staging Repository</h1>
+
+<div id="contentArea">
+
+ <s:actionerror/>
+ <s:actionmessage/>
+</div>
+
+</body>
+</html>
+<%@ page import="java.io.File" %>
<%--
- ~ 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.
- --%>
+~ 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.
+--%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<script type="text/javascript" src="<c:url value='/js/jquery-1.3.2.min.js'/>"></script>
<script type="text/javascript">
$(document).ready(function(){
-
+
$(".pom").hide();
$("a.expand").click(function(event){
event.preventDefault();
<th>Groups</th>
<td>
<c:forEach items="${repositoryToGroupMap[repository.id]}" varStatus="i" var="group">
- ${group}<c:if test="${!i.last}">,</c:if>
+ ${group}<c:if test="${!i.last}">,</c:if>
</c:forEach>
</td>
</tr>
</s:form>
</redback:ifAuthorized>
</td>
- </tr>
+ </tr>
<tr>
<th>Stats</th>
<td>
<archiva:copy-paste-snippet object="${repository}" wrapper="toggle" />
</td>
</tr>
+
+
+ <c:set var="str" value="${repository.id}" />
+ <jsp:useBean id="str" type="java.lang.String" scope="page"/>
+ <c:set var="location" value="${repository.location}"/>
+ <jsp:useBean id="location" type="java.lang.String" scope="page"/>
+
+ <c:if
+ test='<%= !( (str.equalsIgnoreCase("internal") ) || (str.equalsIgnoreCase( "snapshots" )) ) &&
+ new File (new File(location ).getParent() ,str + "-stage" ).exists()%>'>
+ <tr>
+ <th>
+ stage repository location
+ </th>
+ <td>
+ ${repository.location}${'-stage'}
+ </td>
+ </tr>
+ <tr>
+ <th>Merge Actions</th>
+ <td>
+ <redback:ifAuthorized permission="archiva-run-indexer">
+ <s:form action="merge" theme="simple">
+ <s:hidden name="repoid" value="%{#attr.repository.id}"/>
+ <%--<s:hidden name="repository" value="%{repository}"/>--%>
+ <table>
+ <tr>
+ <td><s:submit id="Merge" value="Merge"/></td>
+ </tr>
+
+ </table>
+ </s:form>
+ </redback:ifAuthorized>
+ </td>
+ </tr>
+
+
+ </c:if>
+
+
+
</table>
</div>
--- /dev/null
+<%--
+ ~ 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.
+ --%>
+
+<%-- http://www.opensymphony.com/webwork/wikidocs/File%20Upload%20Interceptor.html --%>
+
+<%@ page contentType="text/html; charset=UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+
+<s:hidden name="repository.id"/>
+ <s:label label="ID" name="repository.id" />
+
+<s:textfield name="repository.name" label="Name" size="50" required="true"/>
+<s:textfield name="repository.location" label="Directory" size="50" required="true"/>
+<s:textfield name="repository.indexDir" label="Index Directory" size="50"/>
+<s:select list="#@java.util.LinkedHashMap@{'default' : 'Maven 2.x Repository', 'legacy' : 'Maven 1.x Repository'}"
+ name="repository.layout" label="Type"/>
+<s:textfield name="repository.refreshCronExpression" label="Cron" size="40" required="true"/>
+<s:textfield name="repository.daysOlder" label="Repository Purge By Days Older Than" size="5"/>
+<s:textfield name="repository.retentionCount" label="Repository Purge By Retention Count" size="5"/>
+<s:checkbox name="repository.releases" value="repository.releases" label="Releases Included"/>
+<s:checkbox name="repository.blockRedeployments" value="repository.blockRedeployments" label="Block Re-deployment of Released Artifacts"/>
+<s:checkbox name="repository.snapshots" value="repository.snapshots" label="Snapshots Included"/>
+<s:checkbox name="repository.scanned" value="repository.scanned" label="Scannable"/>
+<s:checkbox name="repository.deleteReleasedSnapshots" value="repository.deleteReleasedSnapshots"
+ label="Delete Released Snapshots"/>
\ No newline at end of file
{
return artifacts;
}
+
+ public List<ArtifactMetadata> getArtifacts(String repositoryId){
+ return artifacts;
+ }
}
\ No newline at end of file
import java.util.List;
/**
- * DeleteManagedRepositoryActionTest
+ * DeleteManagedRepositoryActionTest
*
* @version $Id$
*/
private MockControl archivaConfigurationControl;
private ArchivaConfiguration archivaConfiguration;
-
+
private static final String REPO_ID = "repo-ident";
private File location;
super.setUp();
action = new DeleteManagedRepositoryAction();
-
+
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
action.setArchivaConfiguration( archivaConfiguration );
-
+
roleManagerControl = MockControl.createControl( RoleManager.class );
roleManager = (RoleManager) roleManagerControl.getMock();
action.setRoleManager( roleManager );
archivaConfiguration.getConfiguration();
archivaConfigurationControl.setReturnValue( configuration );
+
+ Configuration stageRepoConfiguration = new Configuration();
+ stageRepoConfiguration.addManagedRepository( createSatingRepository() );
+ archivaConfigurationControl.setReturnValue( stageRepoConfiguration );
+
archivaConfigurationControl.replay();
action.setRepoid( REPO_ID );
ManagedRepositoryConfiguration repository = action.getRepository();
assertNotNull( repository );
assertRepositoryEquals( repository, createRepository() );
-
+
String status = action.execute();
assertEquals( Action.SUCCESS, status );
-
+
repository = action.getRepository();
assertRepositoryEquals( repository, createRepository() );
assertEquals( Collections.singletonList( originalRepository ), configuration.getManagedRepositories() );
repositoryStatisticsManagerControl.replay();
prepareRoleManagerMock();
-
+
Configuration configuration = prepDeletionTest( createRepository(), 4 );
MockControl control = mockAuditListeners();
repositoryStatisticsManagerControl.replay();
prepareRoleManagerMock();
-
- Configuration configuration = prepDeletionTest( createRepository(), 4 );
-
+
+ Configuration configuration = prepDeletionTest( createRepository(), 4 );
+
MockControl control = mockAuditListeners();
MockControl metadataRepositoryControl = mockMetadataRepository();
String status = action.deleteContents();
-
+
assertEquals( Action.SUCCESS, status );
assertTrue( configuration.getManagedRepositories().isEmpty() );
control.verify();
metadataRepositoryControl.verify();
}
-
+
public void testDeleteRepositoryAndAssociatedProxyConnectors()
throws Exception
{
prepareRoleManagerMock();
assertEquals( 1, configuration.getProxyConnectors().size() );
-
+
MockControl control = mockAuditListeners();
MockControl metadataRepositoryControl = mockMetadataRepository();
String status = action.deleteContents();
-
+
assertEquals( Action.SUCCESS, status );
assertTrue( configuration.getManagedRepositories().isEmpty() );
control.verify();
metadataRepositoryControl.verify();
}
-
+
public void testDeleteRepositoryCancelled()
throws Exception
{
ManagedRepositoryConfiguration originalRepository = createRepository();
Configuration configuration = prepDeletionTest( originalRepository, 3 );
-
+
String status = action.execute();
assertEquals( Action.SUCCESS, status );
repositoryStatisticsManagerControl.verify();
}
-
- public void testDeleteRepositoryAndReposUnderRepoGroup()
- throws Exception
- {
- repositoryStatisticsManager.deleteStatistics( REPO_ID );
- repositoryStatisticsManagerControl.replay();
-
- Configuration configuration = prepDeletionTest( createRepository(), 5 );
- List<String> repoIds = new ArrayList<String>();
- repoIds.add( REPO_ID );
- configuration.addRepositoryGroup( createRepoGroup( repoIds, "repo.group" ) );
-
- prepareRoleManagerMock();
-
- assertEquals( 1, configuration.getRepositoryGroups().size() );
-
- MockControl control = mockAuditListeners();
- MockControl metadataRepositoryControl = mockMetadataRepository();
- String status = action.deleteContents();
- assertEquals( Action.SUCCESS, status );
-
- assertTrue( configuration.getManagedRepositories().isEmpty() );
- assertEquals( 0, configuration.getRepositoryGroups().get( 0 ).getRepositories().size() );
- assertFalse( location.exists() );
- repositoryStatisticsManagerControl.verify();
- control.verify();
- metadataRepositoryControl.verify();
- }
private Configuration prepDeletionTest( ManagedRepositoryConfiguration originalRepository, int expectCountGetConfig )
throws RegistryException, IndeterminateConfigurationException
archivaConfiguration.getConfiguration();
archivaConfigurationControl.setReturnValue( configuration, expectCountGetConfig );
+ Configuration stageRepoConfiguration = new Configuration();
+ stageRepoConfiguration.addManagedRepository( createSatingRepository() );
+ archivaConfigurationControl.setReturnValue( stageRepoConfiguration );
+
+
archivaConfiguration.save( configuration );
archivaConfigurationControl.replay();
return r;
}
+ private ManagedRepositoryConfiguration createSatingRepository()
+ {
+ ManagedRepositoryConfiguration r = new ManagedRepositoryConfiguration();
+ r.setId( REPO_ID +"-stage" );
+ r.setName( "repo name" );
+ r.setLocation( location.getAbsolutePath() );
+ r.setLayout( "default" );
+ r.setRefreshCronExpression( "* 0/5 * * * ?" );
+ r.setDaysOlder( 0 );
+ r.setRetentionCount( 0 );
+ r.setReleases( true );
+ r.setSnapshots( true );
+ r.setScanned( false );
+ r.setDeleteReleasedSnapshots( false );
+ return r;
+ }
+
private RemoteRepositoryConfiguration createRemoteRepository(String id, String url)
{
RemoteRepositoryConfiguration r = new RemoteRepositoryConfiguration();
r.setId( id );
r.setUrl( url );
r.setLayout( "default" );
-
+
return r;
}
-
+
private ProxyConnectorConfiguration createProxyConnector( String managedRepoId, String remoteRepoId )
{
ProxyConnectorConfiguration connector = new ProxyConnectorConfiguration();
RepositoryGroupConfiguration repoGroup = new RepositoryGroupConfiguration();
repoGroup.setId( repoGroupId );
repoGroup.setRepositories( repoIds );
-
+
return repoGroup;
}
-
+
private void prepareRoleManagerMock()
throws RoleManagerException
{
archivaConfiguration.getConfiguration();
archivaConfigurationControl.setReturnValue( configuration );
+ Configuration stageRepoConfiguration = new Configuration();
+ stageRepoConfiguration.addManagedRepository( createStagingRepository() );
+ archivaConfigurationControl.setReturnValue( stageRepoConfiguration );
+
archivaConfigurationControl.replay();
action.setRepoid( REPO_ID );
{
roleManager.templatedRoleExists( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, REPO_ID );
roleManagerControl.setReturnValue( false );
+
+ roleManager.templatedRoleExists( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, REPO_ID +"-stage" );
+ roleManagerControl.setReturnValue( false );
+
roleManager.createTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, REPO_ID );
roleManagerControl.setVoidCallable();
roleManager.templatedRoleExists( ArchivaRoleConstants.TEMPLATE_REPOSITORY_MANAGER, REPO_ID );
roleManagerControl.setReturnValue( false );
+
+ roleManager.templatedRoleExists( ArchivaRoleConstants.TEMPLATE_REPOSITORY_MANAGER, REPO_ID +"-stage");
+ roleManagerControl.setReturnValue( false );
+
roleManager.createTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_MANAGER, REPO_ID );
roleManagerControl.setVoidCallable();
Configuration configuration = createConfigurationForEditing( createRepository() );
archivaConfiguration.getConfiguration();
archivaConfigurationControl.setReturnValue( configuration );
+
+ Configuration stageRepoConfiguration = new Configuration();
+ stageRepoConfiguration.addManagedRepository( createStagingRepository() );
+ archivaConfigurationControl.setReturnValue( stageRepoConfiguration );
archivaConfigurationControl.setReturnValue( configuration );
archivaConfigurationControl.setReturnValue( configuration );
{
roleManager.templatedRoleExists( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, REPO_ID );
roleManagerControl.setReturnValue( false );
+
+ roleManager.templatedRoleExists( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, REPO_ID +"-stage");
+ roleManagerControl.setReturnValue( false );
+
roleManager.createTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, REPO_ID );
roleManagerControl.setVoidCallable();
roleManager.templatedRoleExists( ArchivaRoleConstants.TEMPLATE_REPOSITORY_MANAGER, REPO_ID );
roleManagerControl.setReturnValue( false );
+
+ roleManager.templatedRoleExists( ArchivaRoleConstants.TEMPLATE_REPOSITORY_MANAGER, REPO_ID +"-stage");
+ roleManagerControl.setReturnValue( false );
+
roleManager.createTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_MANAGER, REPO_ID );
roleManagerControl.setVoidCallable();
Configuration configuration = createConfigurationForEditing( createRepository() );
archivaConfiguration.getConfiguration();
archivaConfigurationControl.setReturnValue( configuration );
+ Configuration stageRepoConfiguration = new Configuration();
+ stageRepoConfiguration.addManagedRepository( createStagingRepository() );
+ archivaConfigurationControl.setReturnValue( stageRepoConfiguration );
+
+
archivaConfigurationControl.setReturnValue( configuration );
archivaConfigurationControl.setReturnValue( configuration );
}
private Configuration createConfigurationForEditing( ManagedRepositoryConfiguration repositoryConfiguration )
+ throws Exception
{
Configuration configuration = new Configuration();
configuration.addManagedRepository( repositoryConfiguration );
+// configuration.addManagedRepository( createStagingRepository() );
return configuration;
}
return r;
}
+ private ManagedRepositoryConfiguration createStagingRepository()
+ throws IOException
+ {
+ ManagedRepositoryConfiguration r = new ManagedRepositoryConfiguration();
+ r.setId( REPO_ID + "-stage" );
+ populateStagingRepository( r );
+ return r;
+ }
+
private void populateRepository( ManagedRepositoryConfiguration repository )
throws IOException
{
repository.setScanned( false );
repository.setDeleteReleasedSnapshots( true );
}
+ private void populateStagingRepository( ManagedRepositoryConfiguration repository )
+ throws IOException
+ {
+ repository.setId( REPO_ID + "-stage");
+ repository.setName( "repo name" );
+ repository.setLocation( location.getCanonicalPath() );
+ repository.setLayout( "default" );
+ repository.setRefreshCronExpression( "* 0/5 * * * ?" );
+ repository.setDaysOlder( 31 );
+ repository.setRetentionCount( 20 );
+ repository.setReleases( true );
+ repository.setSnapshots( true );
+ repository.setScanned( false );
+ repository.setDeleteReleasedSnapshots( true );
+ }
}
{
return null; //To change body of implemented methods use File | Settings | File Templates.
}
+ public List<ArtifactMetadata> getArtifacts(String repositoryId){
+ return null;
+ }
}
* @param repositoryId the repository to delete
*/
void deleteRepository( String repositoryId );
+
+ List<ArtifactMetadata> getArtifacts(String repositoryId);
}
Date upper = new Date( artifact.getWhenGathered().getTime() - 10000 );
assertTrue( repository.getArtifactsByDateRange( TEST_REPO_ID, null, upper ).isEmpty() );
+ }
+
+ public void testGetArtifactsByRepoId()
+ {
+ repository.updateNamespace( TEST_REPO_ID, TEST_NAMESPACE );
+ repository.updateProject( TEST_REPO_ID, createProject() );
+ ArtifactMetadata artifact = createArtifact();
+ repository.updateArtifact( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION, artifact );
+ assertFalse( repository.getArtifacts(TEST_REPO_ID).isEmpty());
+
+
}
public void testGetNamespacesWithSparseDepth()
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<metadata>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva</artifactId>
+ <version>1.2.1</version>
+</metadata>
+
+
--- /dev/null
+<?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">
+ <modelVersion>4.0.0</modelVersion>
+ <prerequisites>
+ <maven>2.0.6</maven>
+ </prerequisites>
+
+ <parent>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-parent</artifactId>
+ <version>3</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+ <name>Archiva</name>
+ <artifactId>archiva</artifactId>
+ <packaging>pom</packaging>
+ <version>1.2.1</version>
+ <url>http://archiva.apache.org</url>
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/archiva/tags/archiva-1.2.1</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/archiva/tags/archiva-1.2.1</developerConnection>
+ <url>http://svn.apache.org/viewvc/archiva/tags/archiva-1.2.1</url>
+ </scm>
+
+ <build>
+ <plugins>
+ <!-- We want to package up license resources in the JARs produced -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-remote-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ <configuration>
+ <resourceBundles>
+ <resourceBundle>org.apache:apache-jar-resource-bundle:1.3</resourceBundle>
+ </resourceBundles>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0-alpha-4</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <bannedDependencies>
+ <excludes>
+ <exclude>org.codehaus.plexus:plexus-container-default</exclude>
+ <exclude>org.codehaus.plexus:plexus-log4j-logging</exclude>
+ <exclude>commons-logging:commons-logging</exclude>
+ <exclude>velocity:velocity-dep</exclude>
+ <exclude>classworlds:classworlds</exclude>
+ <exclude>javax.transaction:jta</exclude>
+ <exclude>javax.sql:jdbc-stdext</exclude>
+ <exclude>ant:ant-optional</exclude>
+ <exclude>xom:xom</exclude>
+ <exclude>org.codehaus.plexus:plexus-xwork-integration</exclude>
+ </excludes>
+ </bannedDependencies>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-metadata</artifactId>
+ <version>1.0-beta-3.0.5</version>
+ <executions>
+ <execution>
+ <id>generate</id>
+ <goals>
+ <goal>generate-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-maven-plugin</artifactId>
+ <version>1.0</version>
+ <configuration>
+ <useJava5>true</useJava5>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-plugin-plexus-registry</artifactId>
+ <version>1.0-alpha-21</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-plugin-jpox</artifactId>
+ <version>1.0-alpha-21</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-remote-resources-plugin</artifactId>
+ <version>1.0-beta-2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <version>1.0-alpha-4</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.0-beta-7</version>
+ <configuration>
+ <tagBase>https://svn.apache.org/repos/asf/archiva/tags</tagBase>
+ <useReleaseProfile>false</useReleaseProfile>
+ <goals>deploy</goals>
+ <preparationGoals>clean install</preparationGoals>
+ <arguments>-Prelease</arguments>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.2</version>
+ <configuration>
+ <redirectTestOutputToFile>true</redirectTestOutputToFile>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-idea-plugin</artifactId>
+ <configuration>
+ <jdkLevel>1.5</jdkLevel>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ <modules>
+ <module>archiva-cli</module>
+ <module>archiva-docs</module>
+ <module>archiva-jetty</module>
+ <module>archiva-modules</module>
+ </modules>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <version>1.2_Java1.3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <version>1.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>httpunit</groupId>
+ <artifactId>httpunit</artifactId>
+ <version>1.6.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-webdav</artifactId>
+ <version>1.5.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.sonatype.nexus</groupId>
+ <artifactId>nexus-indexer</artifactId>
+ <version>2.0.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>velocity</groupId>
+ <artifactId>velocity-dep</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-settings</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-applet</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-artifact-converter</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-artifact-reports</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-checksum</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-common</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-configuration</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-consumer-api</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-converter</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-dependency-graph</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-core</artifactId>
+ <version>1.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-core-consumers</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-database</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-database-consumers</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-indexer</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-lucene-consumers</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-model</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-policies</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-proxy</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-report-manager</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-repository-layer</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-scheduled</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-security</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-signature-consumers</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-transaction</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-docs</artifactId>
+ <version>1.2.1</version>
+ <type>zip</type>
+ <classifier>docs</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-webapp</artifactId>
+ <version>1.2.1</version>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-xml-tools</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-webdav</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-rss</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-xmlrpc-api</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-xmlrpc-services</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-xmlrpc-security</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-spring</artifactId>
+ <version>1.2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>stax</groupId>
+ <artifactId>stax</artifactId>
+ <version>1.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>10.1.3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derbytools</artifactId>
+ <version>10.1.3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.7</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jaxen</groupId>
+ <artifactId>jaxen</artifactId>
+ <version>1.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>xom</groupId>
+ <artifactId>xom</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.jdo</groupId>
+ <artifactId>jdo2-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>jpox</groupId>
+ <artifactId>jpox</artifactId>
+ <version>1.1.9</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-core</artifactId>
+ <version>2.4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-queries</artifactId>
+ <version>2.4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ <version>1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlrpc</groupId>
+ <artifactId>xmlrpc-server</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>${maven.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ <version>${maven.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>${maven.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-api</artifactId>
+ <version>1.0-alpha-22</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-digest</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-expression-evaluator</artifactId>
+ <version>1.0-rc1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-i18n</artifactId>
+ <version>1.0-beta-6</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-jdo2</artifactId>
+ <version>1.0-alpha-8</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-quartz</artifactId>
+ <version>1.0-alpha-3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-slf4j-logging</artifactId>
+ <version>1.1-alpha-1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-taskqueue</artifactId>
+ <version>1.0-alpha-8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>1.4.5</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus.cache</groupId>
+ <artifactId>plexus-cache-api</artifactId>
+ <version>1.0-alpha-2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus.cache</groupId>
+ <artifactId>plexus-cache-ehcache</artifactId>
+ <version>1.0-alpha-2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- redback -->
+
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-rbac-memory</artifactId>
+ <version>${redback.version}</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-users-memory</artifactId>
+ <version>${redback.version}</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-keys-memory</artifactId>
+ <version>${redback.version}</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-rbac-model</artifactId>
+ <version>${redback.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-authorization-rbac</artifactId>
+ <version>${redback.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-rbac-role-manager</artifactId>
+ <version>${redback.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-system</artifactId>
+ <version>${redback.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-common-integrations</artifactId>
+ <version>${redback.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-struts2-content</artifactId>
+ <version>${redback.version}</version>
+ <type>war</type>
+ <exclusions>
+ <exclusion>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-struts2-integration</artifactId>
+ <version>${redback.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>velocity</groupId>
+ <artifactId>velocity-dep</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- redback -->
+
+ <dependency>
+ <groupId>org.codehaus.plexus.registry</groupId>
+ <artifactId>plexus-registry-api</artifactId>
+ <version>1.0-alpha-2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus.registry</groupId>
+ <artifactId>plexus-registry-commons</artifactId>
+ <version>1.0-alpha-2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>ant</groupId>
+ <artifactId>ant-optional</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jdom</groupId>
+ <artifactId>jdom</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>opensymphony</groupId>
+ <artifactId>sitemesh</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl104-over-slf4j</artifactId>
+ <version>1.5.0</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.5.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>1.5.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.5.0</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>taglibs</groupId>
+ <artifactId>standard</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-file</artifactId>
+ <version>${wagon.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-http-lightweight</artifactId>
+ <version>${wagon.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>nekohtml</groupId>
+ <artifactId>xercesMinimal</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-provider-api</artifactId>
+ <version>${wagon.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-core</artifactId>
+ <version>2.0.11.2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-spring-plugin</artifactId>
+ <version>2.0.11.2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>xmlunit</groupId>
+ <artifactId>xmlunit</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <version>1.5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
+
+ <!-- xmlrpc -->
+ <dependency>
+ <groupId>com.atlassian.xmlrpc</groupId>
+ <artifactId>atlassian-xmlrpc-binder-annotations</artifactId>
+ <version>${binder.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.atlassian.xmlrpc</groupId>
+ <artifactId>atlassian-xmlrpc-binder-server-spring</artifactId>
+ <version>${binder.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>com.atlassian.xmlrpc</groupId>
+ <artifactId>atlassian-xmlrpc-binder</artifactId>
+ <version>${binder.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.atlassian.xmlrpc</groupId>
+ <artifactId>atlassian-xmlrpc-binder-testing</artifactId>
+ <version>${binder.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- Transitive versions to manage -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>${spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>${spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <!-- use spring test in xmlrpc?
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <version>2.5.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ -->
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ <version>${maven.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>${maven.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>jdom</groupId>
+ <artifactId>jdom</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-model-converter</artifactId>
+ <version>2.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ <version>1.3.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ <properties>
+ <maven.version>2.0.8</maven.version>
+ <wagon.version>1.0-beta-5</wagon.version>
+ <redback.version>1.2.1</redback.version>
+ <jetty.version>6.1.6</jetty.version>
+ <binder.version>0.9</binder.version>
+ <spring.version>2.5.6</spring.version>
+ </properties>
+ <profiles>
+ <profile>
+ <id>release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <inherited>false</inherited>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/src.xml</descriptor>
+ </descriptors>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ <finalName>apache-archiva-${project.version}-src</finalName>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- We want to sign the artifact, the POM, and all attached artifacts -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <configuration>
+ <passphrase>${gpg.passphrase}</passphrase>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- We want to deploy the artifact to a staging location for perusal -->
+ <plugin>
+ <inherited>true</inherited>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <altDeploymentRepository>${deploy.altRepository}</altDeploymentRepository>
+ <updateReleaseInfo>true</updateReleaseInfo>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.0.4</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.4</version>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+ <repositories>
+ <repository>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ <id>sonatype.public</id>
+ <name>Sonatype Public Repo</name>
+ <url>http://repository.sonatype.org/content/repositories/sonatype-apache-releases</url>
+ </repository>
+ <repository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <id>codehaus.org.snapshots</id>
+ <name>Codehaus Snapshots Repository</name>
+ <url>http://snapshots.repository.codehaus.org</url>
+ </repository>
+ </repositories>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<metadata>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva</artifactId>
+ <version>1.2.2</version>
+</metadata>
+
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<metadata>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva</artifactId>
+ <versioning>
+ <latest>1.2.2</latest>
+ <release>1.2.2</release>
+ <versions>
+ <version>1.2.1</version>
+ <version>1.2.2</version>
+ </versions>
+ </versioning>
+</metadata>
public static final String REMOVE_SCANNED = "Removed in Filesystem";
+ public static final String MERGING_REPOSITORIES = "Merged Artifact";
+
// configuration events
public static final String ADD_MANAGED_REPO = "Added Managed Repository";
public void auditEvent( AuditEvent event )
{
// for now we only log upload events, some of the others are quite noisy
- if ( event.getAction().equals( AuditEvent.CREATE_FILE ) || event.getAction().equals( AuditEvent.UPLOAD_FILE ) )
+ if ( event.getAction().equals( AuditEvent.CREATE_FILE ) || event.getAction().equals( AuditEvent.UPLOAD_FILE ) ||
+ event.getAction().equals( AuditEvent.MERGING_REPOSITORIES ) )
{
auditManager.addAuditEvent( event );
}
{
//To change body of implemented methods use File | Settings | File Templates.
}
+ public List<ArtifactMetadata> getArtifacts(String repositoryId){
+ return null;
+ }
}
\ No newline at end of file
assertEquals( Arrays.asList( "4", "5-SNAPSHOT" ), resolver.getProjectVersions( TEST_REPO_ID, "org.apache",
"apache" ) );
- assertEquals( Arrays.asList( "1.2.1" ), resolver.getProjectVersions( TEST_REPO_ID, "org.apache.archiva",
+ assertEquals( Arrays.asList( "1.2.1", "1.2.2" ), resolver.getProjectVersions( TEST_REPO_ID, "org.apache.archiva",
"archiva" ) );
assertEquals( Arrays.asList( "1.2.1" ), resolver.getProjectVersions( TEST_REPO_ID, "org.apache.archiva",
"archiva-base" ) );
{
properties.remove( name );
}
-
+
// clear the facet contents so old properties are no longer written
clearMetadataFacetProperties( versionMetadata, properties );
}
}
}
}
-
+
private void clearMetadataFacetProperties( ProjectVersionMetadata versionMetadata, Properties properties )
{
List<Object> propsToRemove = new ArrayList<Object>();
}
}
}
-
+
for( Object key : propsToRemove )
{
properties.remove( key );
properties.remove( "artifact:sha1:" + id );
properties.remove( "artifact:version:" + id );
properties.remove( "artifact:facetIds:" + id );
-
+
String prefix = "artifact:facet:" + id + ":";
for ( Object key : new ArrayList( properties.keySet() ) )
{
return artifact1.getWhenGathered().compareTo( artifact2.getWhenGathered() );
}
}
+
+ public List<ArtifactMetadata> getArtifacts( String repoId )
+ {
+
+ List<ArtifactMetadata> artifacts = new ArrayList<ArtifactMetadata>();
+ for ( String ns : getRootNamespaces( repoId ) )
+ {
+ getArtifacts( artifacts, repoId, ns );
+ }
+ return artifacts;
+ }
+
+ private void getArtifacts( List<ArtifactMetadata> artifacts, String repoId, String ns )
+ {
+ for ( String namespace : getNamespaces( repoId, ns ) )
+ {
+ getArtifacts( artifacts, repoId, ns + "." + namespace );
+ }
+
+ for ( String project : getProjects( repoId, ns ) )
+ {
+ for ( String version : getProjectVersions( repoId, ns, project ) )
+ {
+ for ( ArtifactMetadata artifact : getArtifacts( repoId, ns, project, version ) )
+ {
+
+ artifacts.add( artifact );
+
+ }
+ }
+ }
+ }
}
FileMetadataRepository repository = new FileMetadataRepository();
repository.setConfiguration( config );
repository.setMetadataFacetFactories( factories );
-
this.repository = repository;
}
<!-- TODO: eventually not a core plugin, needs to be moved to a separate tree, with it's own Selenium tests -->
<module>npanday-support</module>
<module>maven1-repository</module>
+ <module>stage-repository-merge</module>
<module>generic-metadata-support</module>
</modules>
-</project>
\ No newline at end of file
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>plugins</artifactId>
+ <groupId>org.apache.archiva</groupId>
+ <version>1.4-SNAPSHOT</version>
+ </parent>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>stage-repository-merge</artifactId>
+ <name>stage-repository-merge</name>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-spring</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>metadata-repository-api</artifactId>
+ <version>1.4-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-repository-layer</artifactId>
+ <version>1.4-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>maven2-repository</artifactId>
+ <version>1.4-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-model</artifactId>
+ <version>1.4-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>metadata-repository-file</artifactId>
+ <version>1.4-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <version>1.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>test-repository</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jdk14</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>test-repository</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <includeArtifactIds>test-repository</includeArtifactIds>
+ <outputDirectory>target/test-repository</outputDirectory>
+ <excludes>META-INF/**</excludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-metadata</artifactId>
+ <version>1.0-beta-3.0.5</version>
+ <executions>
+ <execution>
+ <id>process-classes</id>
+ <goals>
+ <goal>generate-metadata</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>process-test-classes</id>
+ <goals>
+ <goal>generate-test-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
--- /dev/null
+package org.apache.archiva.stagerepository.merge;
+
+/*
+ * 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.archiva.metadata.model.ArtifactMetadata;
+import org.apache.archiva.metadata.repository.filter.Filter;
+import org.apache.archiva.metadata.repository.filter.IncludesFilter;
+import org.apache.archiva.metadata.repository.MetadataRepository;
+import org.apache.archiva.metadata.repository.storage.RepositoryPathTranslator;
+import org.apache.maven.archiva.repository.RepositoryException;
+import org.apache.maven.archiva.repository.metadata.RepositoryMetadataException;
+import org.apache.maven.archiva.repository.metadata.RepositoryMetadataWriter;
+import org.apache.maven.archiva.repository.metadata.RepositoryMetadataReader;
+import org.apache.maven.archiva.configuration.ArchivaConfiguration;
+import org.apache.maven.archiva.configuration.Configuration;
+import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
+import org.apache.maven.archiva.model.ArchivaRepositoryMetadata;
+import org.apache.maven.archiva.common.utils.VersionComparator;
+import org.apache.maven.archiva.common.utils.VersionUtil;
+
+import java.util.List;
+import java.util.Date;
+import java.util.Calendar;
+import java.util.TimeZone;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.io.IOException;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileInputStream;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+
+/**
+ * @plexus.component role="org.apache.archiva.stagerepository.merge.RepositoryMerger" role-hint="maven2"
+ */
+public class Maven2RepositoryMerger
+ implements RepositoryMerger
+{
+
+ /**
+ * @plexus.requirement role-hint="default"
+ */
+ private MetadataRepository metadataRepository;
+
+ /**
+ * @plexus.requirement role-hint="default"
+ */
+ private ArchivaConfiguration configuration;
+
+ /**
+ * @plexus.requirement role-hint="maven2"
+ */
+ private RepositoryPathTranslator pathTranslator;
+
+ private static final String METADATA_FILENAME = "maven-metadata.xml";
+
+ public void setConfiguration( ArchivaConfiguration configuration )
+ {
+ this.configuration = configuration;
+ }
+
+ public void setMetadataRepository( MetadataRepository metadataRepository )
+ {
+ this.metadataRepository = metadataRepository;
+ }
+
+ public void merge( String sourceRepoId, String targetRepoId )
+ throws Exception
+ {
+
+ List<ArtifactMetadata> artifactsInSourceRepo = metadataRepository.getArtifacts( sourceRepoId );
+ for ( ArtifactMetadata artifactMetadata : artifactsInSourceRepo )
+ {
+ artifactMetadata.setRepositoryId( targetRepoId );
+ createFolderStructure( sourceRepoId, targetRepoId, artifactMetadata );
+ }
+ }
+
+ // TODO when UI needs a subset to merge
+ public void merge( String sourceRepoId, String targetRepoId, Filter<ArtifactMetadata> filter )
+ throws Exception
+ {
+ List<ArtifactMetadata> sourceArtifacts = metadataRepository.getArtifacts( sourceRepoId );
+ for ( ArtifactMetadata metadata : sourceArtifacts )
+ {
+ if ( filter.accept( metadata ) )
+ {
+ createFolderStructure( sourceRepoId, targetRepoId, metadata );
+ }
+ }
+ }
+
+ private void createFolderStructure( String sourceRepoId, String targetRepoId, ArtifactMetadata artifactMetadata )
+ throws IOException, RepositoryException
+ {
+ Configuration config = configuration.getConfiguration();
+
+ ManagedRepositoryConfiguration targetRepoConfig = config.findManagedRepositoryById( targetRepoId );
+
+ ManagedRepositoryConfiguration sourceRepoConfig = config.findManagedRepositoryById( sourceRepoId );
+
+ Date lastUpdatedTimestamp = Calendar.getInstance().getTime();
+
+ TimeZone timezone = TimeZone.getTimeZone( "UTC" );
+
+ DateFormat fmt = new SimpleDateFormat( "yyyyMMdd.HHmmss" );
+
+ fmt.setTimeZone( timezone );
+
+ String timestamp = fmt.format( lastUpdatedTimestamp );
+
+ String targetRepoPath = targetRepoConfig.getLocation();
+
+ String sourceRepoPath = sourceRepoConfig.getLocation();
+
+ String artifactPath = pathTranslator.toPath( artifactMetadata.getNamespace(), artifactMetadata.getProject(),
+ artifactMetadata.getProjectVersion(), artifactMetadata.getId() );
+
+ File sourceArtifactFile = new File( sourceRepoPath, artifactPath );
+
+ File targetArtifactFile = new File( targetRepoPath, artifactPath );
+
+ int lastIndex = artifactPath.lastIndexOf( '/' );
+
+ File targetFile = new File( targetRepoPath, artifactPath.substring( 0, lastIndex ) );
+
+ if ( !targetFile.exists() )
+ {
+ // create the folder structure when it does not exist
+ targetFile.mkdirs();
+ }
+ // artifact copying
+ copyFile( sourceArtifactFile, targetArtifactFile );
+
+ // pom file copying
+ String fileName = artifactMetadata.getProject() + "-" + artifactMetadata.getVersion() + ".pom";
+
+ // pom file copying
+ // TODO need to use path translator to get the pom file path
+// String fileName = artifactMetadata.getProject() + "-" + artifactMetadata.getVersion() + ".pom";
+//
+// File sourcePomFile =
+// pathTranslator.toFile( new File( sourceRepoPath ), artifactMetadata.getId(), artifactMetadata.getProject(),
+// artifactMetadata.getVersion(), fileName );
+//
+// String relativePathToPomFile = sourcePomFile.getAbsolutePath().split( sourceRepoPath )[1];
+// File targetPomFile = new File( targetRepoPath, relativePathToPomFile );
+
+ //pom file copying (file path is taken with out using path translator)
+
+ String index = artifactPath.substring( lastIndex + 1 );
+ int last = index.lastIndexOf( '.' );
+ File sourcePomFile = new File( sourceRepoPath, artifactPath.substring( 0, lastIndex ) + "/" +
+ artifactPath.substring( lastIndex + 1 ).substring( 0, last ) + ".pom" );
+ File targetPomFile = new File( targetRepoPath, artifactPath.substring( 0, lastIndex ) + "/" +
+ artifactPath.substring( lastIndex + 1 ).substring( 0, last ) + ".pom" );
+
+ if ( !targetPomFile.exists() && sourcePomFile.exists() )
+ {
+ copyFile( sourcePomFile, targetPomFile );
+ }
+
+ // explicitly update only if metadata-updater consumer is not enabled!
+ if ( !config.getRepositoryScanning().getKnownContentConsumers().contains( "metadata-updater" ) )
+ {
+
+ // updating version metadata files
+ File versionMetaDataFileInSourceRepo =
+ pathTranslator.toFile( new File( sourceRepoPath ), artifactMetadata.getNamespace(),
+ artifactMetadata.getProject(), artifactMetadata.getVersion(),
+ METADATA_FILENAME );
+ String relativePathToVersionMetadataFile =
+ versionMetaDataFileInSourceRepo.getAbsolutePath().split( sourceRepoPath )[1];
+ File versionMetaDataFileInTargetRepo = new File( targetRepoPath, relativePathToVersionMetadataFile );
+
+ if ( !versionMetaDataFileInTargetRepo.exists() )
+ {
+ copyFile( versionMetaDataFileInSourceRepo, versionMetaDataFileInTargetRepo );
+ }
+ else
+ {
+ updateVersionMetadata( versionMetaDataFileInTargetRepo, artifactMetadata, lastUpdatedTimestamp );
+
+ }
+
+ // updating project meta data file
+ String projectDirectoryInSourceRepo = new File( versionMetaDataFileInSourceRepo.getParent() ).getParent();
+ File projectMetadataFileInSourceRepo = new File( projectDirectoryInSourceRepo, METADATA_FILENAME );
+
+ String relativePathToProjectMetadataFile =
+ projectMetadataFileInSourceRepo.getAbsolutePath().split( sourceRepoPath )[1];
+ File projectMetadataFileInTargetRepo = new File( targetRepoPath, relativePathToProjectMetadataFile );
+
+ if ( !projectMetadataFileInTargetRepo.exists() )
+ {
+
+ copyFile( versionMetaDataFileInSourceRepo, projectMetadataFileInSourceRepo );
+ }
+ else
+ {
+ updateProjectMetadata( projectMetadataFileInTargetRepo, artifactMetadata, lastUpdatedTimestamp,
+ timestamp );
+ }
+ }
+
+ }
+
+ private void copyFile( File sourceFile, File targetFile )
+ throws IOException
+ {
+ FileOutputStream out = new FileOutputStream( targetFile );
+ FileInputStream input = new FileInputStream( sourceFile );
+
+ try
+ {
+ int i;
+ while ( ( i = input.read() ) != -1 )
+ {
+ out.write( i );
+ }
+ out.flush();
+ }
+ finally
+ {
+ out.close();
+ input.close();
+ }
+ }
+
+ private void updateProjectMetadata( File projectMetaDataFileIntargetRepo, ArtifactMetadata artifactMetadata,
+ Date lastUpdatedTimestamp, String timestamp )
+ throws RepositoryMetadataException
+ {
+ ArrayList<String> availableVersions = new ArrayList<String>();
+ String latestVersion = artifactMetadata.getProjectVersion();
+
+ ArchivaRepositoryMetadata projectMetadata = getMetadata( projectMetaDataFileIntargetRepo );
+
+ if ( projectMetaDataFileIntargetRepo.exists() )
+ {
+ availableVersions = (ArrayList<String>) projectMetadata.getAvailableVersions();
+
+ Collections.sort( availableVersions, VersionComparator.getInstance() );
+
+ if ( !availableVersions.contains( artifactMetadata.getVersion() ) )
+ {
+ availableVersions.add( artifactMetadata.getVersion() );
+ }
+
+ latestVersion = availableVersions.get( availableVersions.size() - 1 );
+ }
+ else
+ {
+ availableVersions.add( artifactMetadata.getProjectVersion() );
+ projectMetadata.setGroupId( artifactMetadata.getNamespace() );
+ projectMetadata.setArtifactId( artifactMetadata.getProject() );
+ }
+
+ if ( projectMetadata.getGroupId() == null )
+ {
+ projectMetadata.setGroupId( artifactMetadata.getNamespace() );
+ }
+
+ if ( projectMetadata.getArtifactId() == null )
+ {
+ projectMetadata.setArtifactId( artifactMetadata.getProject() );
+ }
+
+ projectMetadata.setLatestVersion( latestVersion );
+ projectMetadata.setAvailableVersions( availableVersions );
+ projectMetadata.setLastUpdated( timestamp );
+ projectMetadata.setLastUpdatedTimestamp( lastUpdatedTimestamp );
+
+ if ( !VersionUtil.isSnapshot( artifactMetadata.getVersion() ) )
+ {
+ projectMetadata.setReleasedVersion( latestVersion );
+ }
+
+ RepositoryMetadataWriter.write( projectMetadata, projectMetaDataFileIntargetRepo );
+
+ }
+
+ private void updateVersionMetadata( File versionMetaDataFileInTargetRepo, ArtifactMetadata artifactMetadata,
+ Date lastUpdatedTimestamp )
+ throws RepositoryMetadataException
+ {
+ ArchivaRepositoryMetadata versionMetadata = getMetadata( versionMetaDataFileInTargetRepo );
+ if ( !versionMetaDataFileInTargetRepo.exists() )
+ {
+ versionMetadata.setGroupId( artifactMetadata.getNamespace() );
+ versionMetadata.setArtifactId( artifactMetadata.getProject() );
+ versionMetadata.setVersion( artifactMetadata.getProjectVersion() );
+ }
+
+ versionMetadata.setLastUpdatedTimestamp( lastUpdatedTimestamp );
+ RepositoryMetadataWriter.write( versionMetadata, versionMetaDataFileInTargetRepo );
+ }
+
+ private ArchivaRepositoryMetadata getMetadata( File metadataFile )
+ throws RepositoryMetadataException
+ {
+ ArchivaRepositoryMetadata metadata = new ArchivaRepositoryMetadata();
+ if ( metadataFile.exists() )
+ {
+ metadata = RepositoryMetadataReader.read( metadataFile );
+ }
+ return metadata;
+ }
+
+ public List<ArtifactMetadata> getConflictsartifacts( String sourceRepo, String targetRepo )
+ throws Exception
+ {
+ List<ArtifactMetadata> targetArtifacts = metadataRepository.getArtifacts( targetRepo );
+ List<ArtifactMetadata> sourceArtifacts = metadataRepository.getArtifacts( sourceRepo );
+ List<ArtifactMetadata> conflictsArtifacts = new ArrayList<ArtifactMetadata>();
+
+ for ( ArtifactMetadata targerArtifact : targetArtifacts )
+ {
+ for ( ArtifactMetadata sourceArtifact : sourceArtifacts )
+ {
+ if ( isEquals( targerArtifact, sourceArtifact ) )
+ {
+ if ( !conflictsArtifacts.contains( sourceArtifact ) )
+ {
+ conflictsArtifacts.add( sourceArtifact );
+ }
+ }
+ }
+ }
+
+ sourceArtifacts.removeAll( conflictsArtifacts );
+ Filter<ArtifactMetadata> artifactsWithOutConflicts = new IncludesFilter<ArtifactMetadata>( sourceArtifacts );
+// merge( sourceRepo, targetRepo, artifactsWithOutConflicts );
+ return conflictsArtifacts;
+ }
+
+ private boolean isEquals( ArtifactMetadata sourceArtifact, ArtifactMetadata targetArtifact )
+ {
+ boolean isSame = false;
+
+ if ( ( sourceArtifact.getNamespace().equals( targetArtifact.getNamespace() ) ) &&
+ ( sourceArtifact.getProject().equals( targetArtifact.getProject() ) ) &&
+ ( sourceArtifact.getId().equals( targetArtifact.getId() ) ) &&
+ ( sourceArtifact.getProjectVersion().equals( targetArtifact.getProjectVersion() ) ) )
+
+ {
+ isSame = true;
+
+ }
+
+ return isSame;
+ }
+}
--- /dev/null
+package org.apache.archiva.stagerepository.merge;
+
+/*
+ * 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.archiva.metadata.model.ArtifactMetadata;
+import org.apache.archiva.metadata.repository.filter.Filter;
+
+public interface RepositoryMerger
+{
+ void merge( String sourceRepoId, String targetRepoId )
+ throws Exception;
+
+ void merge( String sourceRepoId, String targetRepoId, Filter<ArtifactMetadata> filter ) throws Exception;
+}
--- /dev/null
+package org.apache.archiva.configuration;
+
+/*
+ * 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.configuration.ArchivaConfiguration;
+import org.apache.maven.archiva.configuration.Configuration;
+import org.apache.maven.archiva.configuration.ConfigurationListener;
+import org.apache.maven.archiva.configuration.IndeterminateConfigurationException;
+import org.codehaus.plexus.registry.RegistryException;
+import org.codehaus.plexus.registry.RegistryListener;
+
+public class StubConfiguration
+ implements ArchivaConfiguration
+{
+ private Configuration configuration;
+
+ public Configuration getConfiguration()
+ {
+ return configuration;
+ }
+
+ public void save( Configuration configuration )
+ throws RegistryException, IndeterminateConfigurationException
+ {
+ this.configuration = configuration;
+ }
+
+ public boolean isDefaulted()
+ {
+ return false;
+ }
+
+ public void addListener( ConfigurationListener listener )
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void removeListener( ConfigurationListener listener )
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void addChangeListener( RegistryListener listener )
+ {
+ throw new UnsupportedOperationException();
+ }
+}
--- /dev/null
+package org.apache.archiva.stagerepository.merge;
+
+/*
+ * 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.codehaus.plexus.spring.PlexusInSpringTestCase;
+import org.apache.maven.archiva.configuration.Configuration;
+import org.apache.maven.archiva.configuration.ArchivaConfiguration;
+import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
+import org.apache.maven.archiva.configuration.RepositoryScanningConfiguration;
+import org.apache.maven.archiva.repository.RepositoryContentFactory;
+import org.apache.archiva.metadata.repository.MetadataRepository;
+import org.apache.archiva.metadata.model.ArtifactMetadata;
+import org.mockito.*;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.verify;
+import org.junit.Before;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.io.File;
+
+public class Maven2RepositoryMergerTest
+ extends PlexusInSpringTestCase
+{
+
+ private static final String TEST_REPO_ID = "test";
+
+ private static final String TARGET_REPOSITORY_ID = "target-repo";
+
+ private Configuration config;
+
+ @MockitoAnnotations.Mock
+ private MetadataRepository metadataResolver;
+
+ private RepositoryContentFactory repositoryFactory;
+
+ private ArchivaConfiguration configuration;
+
+ private Maven2RepositoryMerger repositoryMerger;
+
+ private MetadataRepository metadataRepository;
+
+ @Before
+ public void setUp()
+ throws Exception
+ {
+ super.setUp();
+ MockitoAnnotations.initMocks( this );
+ metadataRepository = mock( MetadataRepository.class );
+ repositoryMerger = (Maven2RepositoryMerger) lookup( RepositoryMerger.class, "maven2" );
+ repositoryMerger.setMetadataRepository( metadataRepository );
+ }
+
+ private List<ArtifactMetadata> getArtifacts()
+ {
+ List<ArtifactMetadata> metadata = new ArrayList<ArtifactMetadata>();
+ ArtifactMetadata artifact1 = new ArtifactMetadata();
+ artifact1.setNamespace( "com.example.test" );
+ artifact1.setProject( "test-artifact" );
+ artifact1.setVersion( "1.0-SNAPSHOT" );
+ artifact1.setProjectVersion( "1.0-SNAPSHOT" );
+ artifact1.setId( "test-artifact-1.0-20100308.230825-1.jar" );
+
+ metadata.add( artifact1 );
+ return metadata;
+ }
+
+ public void testMerge()
+ throws Exception
+ {
+ ArchivaConfiguration configuration = (ArchivaConfiguration) lookup( ArchivaConfiguration.class );
+ Configuration c = new Configuration();
+ ManagedRepositoryConfiguration testRepo = new ManagedRepositoryConfiguration();
+ testRepo.setId( TEST_REPO_ID );
+ testRepo.setLocation( getTestPath( "target/test-repository" ) );
+
+ RepositoryScanningConfiguration repoScanConfig = new RepositoryScanningConfiguration();
+ List<String> knownContentConsumers = new ArrayList<String>();
+ knownContentConsumers.add( "metadata-updater12" );
+ repoScanConfig.setKnownContentConsumers( knownContentConsumers );
+ c.setRepositoryScanning( repoScanConfig );
+
+ ManagedRepositoryConfiguration targetRepo = new ManagedRepositoryConfiguration();
+ targetRepo.setId( "target-rep" );
+ targetRepo.setLocation( getTestPath( "target" ) );
+ c.addManagedRepository( testRepo );
+ c.addManagedRepository( targetRepo );
+ configuration.save( c );
+
+ when( metadataRepository.getArtifacts( TEST_REPO_ID ) ).thenReturn( getArtifacts() );
+ repositoryMerger.merge( TEST_REPO_ID, "target-rep" );
+ verify( metadataRepository ).getArtifacts( TEST_REPO_ID );
+ }
+
+ public void testMergeWithOutConflictArtifacts()
+ throws Exception
+ {
+ String sourceRepoId = "source-repo";
+ ArtifactMetadata artifact1 = new ArtifactMetadata();
+ artifact1.setNamespace( "org.testng" );
+ artifact1.setProject( "testng" );
+ artifact1.setVersion( "5.8" );
+ artifact1.setProjectVersion( "5.8" );
+ artifact1.setId( "testng-5.8-jdk15.jar" );
+ artifact1.setRepositoryId( sourceRepoId );
+
+ List<ArtifactMetadata> sourceRepoArtifactsList = getArtifacts();
+ sourceRepoArtifactsList.add( artifact1 );
+ List<ArtifactMetadata> targetRepoArtifactsList = getArtifacts();
+
+ ArchivaConfiguration configuration = (ArchivaConfiguration) lookup( ArchivaConfiguration.class );
+ Configuration c = new Configuration();
+ ManagedRepositoryConfiguration testRepo = new ManagedRepositoryConfiguration();
+ testRepo.setId( TEST_REPO_ID );
+ testRepo.setLocation( getTestPath( "target/test-repository" ) );
+
+ String sourceRepo = "src/test/resources/test-repository-with-conflict-artifacts";
+ ManagedRepositoryConfiguration testRepoWithConflicts = new ManagedRepositoryConfiguration();
+ testRepoWithConflicts.setId( sourceRepoId );
+ testRepoWithConflicts.setLocation( getTestPath( sourceRepo ) );
+
+ RepositoryScanningConfiguration repoScanConfig = new RepositoryScanningConfiguration();
+ List<String> knownContentConsumers = new ArrayList<String>();
+ knownContentConsumers.add( "metadata-updater" );
+ repoScanConfig.setKnownContentConsumers( knownContentConsumers );
+ c.setRepositoryScanning( repoScanConfig );
+
+ c.addManagedRepository( testRepo );
+ c.addManagedRepository( testRepoWithConflicts );
+ configuration.save( c );
+
+ File targetRepoFile = new File( getTestPath(
+ "/target/test-repository/com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100308.230825-1.jar" ) );
+ targetRepoFile.setReadOnly();
+
+ when( metadataRepository.getArtifacts( sourceRepoId ) ).thenReturn( sourceRepoArtifactsList );
+ when( metadataRepository.getArtifacts( TEST_REPO_ID ) ).thenReturn( targetRepoArtifactsList );
+
+ assertEquals( 1, repositoryMerger.getConflictsartifacts( sourceRepoId, TEST_REPO_ID ).size() );
+ verify( metadataRepository ).getArtifacts( TEST_REPO_ID );
+ }
+
+}
\ No newline at end of file
--- /dev/null
+<!--
+ ~ 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>
+ <component>
+ <role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role>
+ <implementation>org.apache.archiva.configuration.StubConfiguration</implementation>
+ </component>
+ </components>
+</component-set>
\ No newline at end of file
--- /dev/null
+<?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">
+ <modelVersion>4.0.0</modelVersion>
+ <prerequisites>
+ <maven>2.0.6</maven>
+ </prerequisites>
+
+ <parent>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-parent</artifactId>
+ <version>3</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+ <name>Archiva</name>
+ <artifactId>archiva</artifactId>
+ <packaging>pom</packaging>
+ <version>1.2.1</version>
+ <url>http://archiva.apache.org</url>
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/archiva/tags/archiva-1.2.1</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/archiva/tags/archiva-1.2.1</developerConnection>
+ <url>http://svn.apache.org/viewvc/archiva/tags/archiva-1.2.1</url>
+ </scm>
+
+ <build>
+ <plugins>
+ <!-- We want to package up license resources in the JARs produced -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-remote-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ <configuration>
+ <resourceBundles>
+ <resourceBundle>org.apache:apache-jar-resource-bundle:1.3</resourceBundle>
+ </resourceBundles>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0-alpha-4</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <bannedDependencies>
+ <excludes>
+ <exclude>org.codehaus.plexus:plexus-container-default</exclude>
+ <exclude>org.codehaus.plexus:plexus-log4j-logging</exclude>
+ <exclude>commons-logging:commons-logging</exclude>
+ <exclude>velocity:velocity-dep</exclude>
+ <exclude>classworlds:classworlds</exclude>
+ <exclude>javax.transaction:jta</exclude>
+ <exclude>javax.sql:jdbc-stdext</exclude>
+ <exclude>ant:ant-optional</exclude>
+ <exclude>xom:xom</exclude>
+ <exclude>org.codehaus.plexus:plexus-xwork-integration</exclude>
+ </excludes>
+ </bannedDependencies>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-metadata</artifactId>
+ <version>1.0-beta-3.0.5</version>
+ <executions>
+ <execution>
+ <id>generate</id>
+ <goals>
+ <goal>generate-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-maven-plugin</artifactId>
+ <version>1.0</version>
+ <configuration>
+ <useJava5>true</useJava5>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-plugin-plexus-registry</artifactId>
+ <version>1.0-alpha-21</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-plugin-jpox</artifactId>
+ <version>1.0-alpha-21</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-remote-resources-plugin</artifactId>
+ <version>1.0-beta-2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <version>1.0-alpha-4</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.0-beta-7</version>
+ <configuration>
+ <tagBase>https://svn.apache.org/repos/asf/archiva/tags</tagBase>
+ <useReleaseProfile>false</useReleaseProfile>
+ <goals>deploy</goals>
+ <preparationGoals>clean install</preparationGoals>
+ <arguments>-Prelease</arguments>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.2</version>
+ <configuration>
+ <redirectTestOutputToFile>true</redirectTestOutputToFile>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-idea-plugin</artifactId>
+ <configuration>
+ <jdkLevel>1.5</jdkLevel>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ <modules>
+ <module>archiva-cli</module>
+ <module>archiva-docs</module>
+ <module>archiva-jetty</module>
+ <module>archiva-modules</module>
+ </modules>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <version>1.2_Java1.3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <version>1.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>httpunit</groupId>
+ <artifactId>httpunit</artifactId>
+ <version>1.6.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-webdav</artifactId>
+ <version>1.5.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.sonatype.nexus</groupId>
+ <artifactId>nexus-indexer</artifactId>
+ <version>2.0.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>velocity</groupId>
+ <artifactId>velocity-dep</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-settings</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-applet</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-artifact-converter</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-artifact-reports</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-checksum</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-common</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-configuration</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-consumer-api</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-converter</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-dependency-graph</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-core</artifactId>
+ <version>1.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-core-consumers</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-database</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-database-consumers</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-indexer</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-lucene-consumers</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-model</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-policies</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-proxy</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-report-manager</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-repository-layer</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-scheduled</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-security</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-signature-consumers</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-transaction</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-docs</artifactId>
+ <version>1.2.1</version>
+ <type>zip</type>
+ <classifier>docs</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-webapp</artifactId>
+ <version>1.2.1</version>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-xml-tools</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-webdav</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-rss</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-xmlrpc-api</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-xmlrpc-services</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-xmlrpc-security</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-spring</artifactId>
+ <version>1.2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>stax</groupId>
+ <artifactId>stax</artifactId>
+ <version>1.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>10.1.3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derbytools</artifactId>
+ <version>10.1.3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.7</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jaxen</groupId>
+ <artifactId>jaxen</artifactId>
+ <version>1.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>xom</groupId>
+ <artifactId>xom</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.jdo</groupId>
+ <artifactId>jdo2-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>jpox</groupId>
+ <artifactId>jpox</artifactId>
+ <version>1.1.9</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-core</artifactId>
+ <version>2.4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-queries</artifactId>
+ <version>2.4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ <version>1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlrpc</groupId>
+ <artifactId>xmlrpc-server</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>${maven.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ <version>${maven.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>${maven.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-api</artifactId>
+ <version>1.0-alpha-22</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-digest</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-expression-evaluator</artifactId>
+ <version>1.0-rc1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-i18n</artifactId>
+ <version>1.0-beta-6</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-jdo2</artifactId>
+ <version>1.0-alpha-8</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-quartz</artifactId>
+ <version>1.0-alpha-3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-slf4j-logging</artifactId>
+ <version>1.1-alpha-1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-taskqueue</artifactId>
+ <version>1.0-alpha-8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>1.4.5</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus.cache</groupId>
+ <artifactId>plexus-cache-api</artifactId>
+ <version>1.0-alpha-2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus.cache</groupId>
+ <artifactId>plexus-cache-ehcache</artifactId>
+ <version>1.0-alpha-2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- redback -->
+
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-rbac-memory</artifactId>
+ <version>${redback.version}</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-users-memory</artifactId>
+ <version>${redback.version}</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-keys-memory</artifactId>
+ <version>${redback.version}</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-rbac-model</artifactId>
+ <version>${redback.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-authorization-rbac</artifactId>
+ <version>${redback.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-rbac-role-manager</artifactId>
+ <version>${redback.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-system</artifactId>
+ <version>${redback.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-common-integrations</artifactId>
+ <version>${redback.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-struts2-content</artifactId>
+ <version>${redback.version}</version>
+ <type>war</type>
+ <exclusions>
+ <exclusion>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.redback</groupId>
+ <artifactId>redback-struts2-integration</artifactId>
+ <version>${redback.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>velocity</groupId>
+ <artifactId>velocity-dep</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- redback -->
+
+ <dependency>
+ <groupId>org.codehaus.plexus.registry</groupId>
+ <artifactId>plexus-registry-api</artifactId>
+ <version>1.0-alpha-2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus.registry</groupId>
+ <artifactId>plexus-registry-commons</artifactId>
+ <version>1.0-alpha-2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>ant</groupId>
+ <artifactId>ant-optional</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jdom</groupId>
+ <artifactId>jdom</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>opensymphony</groupId>
+ <artifactId>sitemesh</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl104-over-slf4j</artifactId>
+ <version>1.5.0</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.5.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>1.5.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.5.0</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>taglibs</groupId>
+ <artifactId>standard</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-file</artifactId>
+ <version>${wagon.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-http-lightweight</artifactId>
+ <version>${wagon.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>nekohtml</groupId>
+ <artifactId>xercesMinimal</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-provider-api</artifactId>
+ <version>${wagon.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-core</artifactId>
+ <version>2.0.11.2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-spring-plugin</artifactId>
+ <version>2.0.11.2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>xmlunit</groupId>
+ <artifactId>xmlunit</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <version>1.5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
+
+ <!-- xmlrpc -->
+ <dependency>
+ <groupId>com.atlassian.xmlrpc</groupId>
+ <artifactId>atlassian-xmlrpc-binder-annotations</artifactId>
+ <version>${binder.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.atlassian.xmlrpc</groupId>
+ <artifactId>atlassian-xmlrpc-binder-server-spring</artifactId>
+ <version>${binder.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>com.atlassian.xmlrpc</groupId>
+ <artifactId>atlassian-xmlrpc-binder</artifactId>
+ <version>${binder.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.atlassian.xmlrpc</groupId>
+ <artifactId>atlassian-xmlrpc-binder-testing</artifactId>
+ <version>${binder.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- Transitive versions to manage -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>${spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>${spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <!-- use spring test in xmlrpc?
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <version>2.5.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ -->
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ <version>${maven.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>${maven.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>jdom</groupId>
+ <artifactId>jdom</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-model-converter</artifactId>
+ <version>2.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ <version>1.3.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ <properties>
+ <maven.version>2.0.8</maven.version>
+ <wagon.version>1.0-beta-5</wagon.version>
+ <redback.version>1.2.1</redback.version>
+ <jetty.version>6.1.6</jetty.version>
+ <binder.version>0.9</binder.version>
+ <spring.version>2.5.6</spring.version>
+ </properties>
+ <profiles>
+ <profile>
+ <id>release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <inherited>false</inherited>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/src.xml</descriptor>
+ </descriptors>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ <finalName>apache-archiva-${project.version}-src</finalName>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- We want to sign the artifact, the POM, and all attached artifacts -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <configuration>
+ <passphrase>${gpg.passphrase}</passphrase>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- We want to deploy the artifact to a staging location for perusal -->
+ <plugin>
+ <inherited>true</inherited>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <altDeploymentRepository>${deploy.altRepository}</altDeploymentRepository>
+ <updateReleaseInfo>true</updateReleaseInfo>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.0.4</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.4</version>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+ <repositories>
+ <repository>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ <id>sonatype.public</id>
+ <name>Sonatype Public Repo</name>
+ <url>http://repository.sonatype.org/content/repositories/sonatype-apache-releases</url>
+ </repository>
+ <repository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <id>codehaus.org.snapshots</id>
+ <name>Codehaus Snapshots Repository</name>
+ <url>http://snapshots.repository.codehaus.org</url>
+ </repository>
+ </repositories>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<metadata>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva</artifactId>
+ <version>1.2.1</version>
+ <versioning>
+ <lastUpdated>20100702152308</lastUpdated>
+ </versioning>
+</metadata>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<metadata>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva</artifactId>
+ <versioning>
+ <latest>1.2.2</latest>
+ <release>1.2.2</release>
+ <versions>
+ <version>1.2.1</version>
+ <version>1.2.2</version>
+ </versions>
+ <lastUpdated>20100704111236</lastUpdated>
+ </versioning>
+</metadata>
--- /dev/null
+invalid path
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>com.example.test</groupId>
+ <artifactId>test-artifact</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <versioning>
+ <snapshot>
+ <timestamp>20100310.014828</timestamp>
+ <buildNumber>2</buildNumber>
+ </snapshot>
+ <lastUpdated>20100310014828</lastUpdated>
+ </versioning>
+</metadata>
--- /dev/null
+aad6835e3e7a4a9de5318ce9183eab54
\ No newline at end of file
--- /dev/null
+73669371dc2fdae2fa9a129932ed0932d62d9e6b
\ No newline at end of file
--- /dev/null
+cc2236dd70af3667080a786c7dcb4a9b
\ No newline at end of file
--- /dev/null
+edf5938e646956f445c6ecb719d44579cdeed974
\ No newline at end of file
--- /dev/null
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.example.test</groupId>
+ <artifactId>test-artifact</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>test-artifact</name>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <distributionManagement>
+ <repository>
+ <id>test-repo</id>
+ <url>file:${basedir}/repository</url>
+ </repository>
+ </distributionManagement>
+</project>
--- /dev/null
+ce7eeb9586dc4992dc961d9f3a28006b
\ No newline at end of file
--- /dev/null
+be040c8462fd31d4e03749e3586afbb21f43594e
\ No newline at end of file
--- /dev/null
+e034e44b0d9f3968ebfbc66c71b41ba0
\ No newline at end of file
--- /dev/null
+ca8d1408b05d125d0307dbd23063e5aa04235d35
\ No newline at end of file
--- /dev/null
+a47f0edab0271fc55a3db38098f5f78a
\ No newline at end of file
--- /dev/null
+af4c914ef8f80be2a8241fb4d40cff11f4348c0f
\ No newline at end of file
--- /dev/null
+37786de9e272ed6db8541855e0e2d5dc
\ No newline at end of file
--- /dev/null
+bb1ca7834422926d0cb79ef303b715bc17f41661
\ No newline at end of file
--- /dev/null
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.example.test</groupId>
+ <artifactId>test-artifact</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>test-artifact</name>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <distributionManagement>
+ <repository>
+ <id>test</id>
+ <url>file:${basedir}/repository</url>
+ </repository>
+ </distributionManagement>
+</project>
--- /dev/null
+0612c49b1ac80983bfda08616330a4b8
\ No newline at end of file
--- /dev/null
+156d6062060743bf28df306e067914d3d692b571
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>com.example.test</groupId>
+ <artifactId>test-artifact</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <versioning>
+ <snapshot>
+ <timestamp>20100310.014828</timestamp>
+ <buildNumber>2</buildNumber>
+ </snapshot>
+ <lastUpdated>20100310014828</lastUpdated>
+ </versioning>
+</metadata>
--- /dev/null
+4c0a7072d66cfe2deebd3eb998332ccb
\ No newline at end of file
--- /dev/null
+64c28127c4923ff352021bdfdad448d2d881ef3b
\ No newline at end of file
--- /dev/null
+e20c52f8ef51c1cbd52348d40d22422da649578b testng-5.8-jdk15.jar
--- /dev/null
+<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">
+ <!--
+ This POM cannot be used to build TestNG; it should only be used as part of a Maven
+ repository upload bundle.
+
+ See the guide to creating a bundle here:
+ http://maven.apache.org/guides/mini/guide-central-repository-upload.html
+ -->
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <name>TestNG</name>
+ <version>5.8</version>
+ <description>TestNG is a testing framework inspired from JUnit and NUnit but introducing some new functionalities that make it more powerful and easier to use.</description>
+ <url>http://testng.org</url>
+
+ <licenses>
+ <license>
+ <name>Apache License, Version 2.0</name>
+ <url>http://apache.org/licenses/LICENSE-2.0</url>
+ </license>
+ </licenses>
+
+ <scm>
+ <connection>scm:svn:http://testng.googlecode.com/svn/trunk/</connection>
+ <developerConnection>scm:svn:http://testng.googlecode.com/svn/trunk/</developerConnection>
+ <url>http://testng.googlecode.com/svn/trunk</url>
+ </scm>
+
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.6.5</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>qdox</groupId>
+ <artifactId>qdox</artifactId>
+ <version>1.6.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.beanshell</groupId>
+ <artifactId>bsh</artifactId>
+ <version>2.0b4</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+</project>
--- /dev/null
+71df4387b8c96e5d2226cfa1e36acaebb96ba0f2 /home/maven/repository-staging/to-ibiblio/maven2/org/testng/testng/5.8/testng-5.8.pom