summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2015-02-12 23:00:22 +1100
committerOlivier Lamy <olamy@apache.org>2015-02-12 23:00:22 +1100
commit642ceb3f9ea2b0509aca757327c5b34f6a8a3aec (patch)
tree80e2951008c64a48b73bcee580c10998ae070027 /archiva-modules/archiva-web
parentedbc2b762e27cee9f22a34eb25803f46dff77ab1 (diff)
downloadarchiva-642ceb3f9ea2b0509aca757327c5b34f6a8a3aec.tar.gz
archiva-642ceb3f9ea2b0509aca757327c5b34f6a8a3aec.zip
[MRM-1359] remove maven1 code
Diffstat (limited to 'archiva-modules/archiva-web')
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaAdministrationService.java8
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java38
-rw-r--r--archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java3
-rw-r--r--archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavResourceFactoryTest.java7
4 files changed, 4 insertions, 52 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaAdministrationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaAdministrationService.java
index 87c464285..612ed0a96 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaAdministrationService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ArchivaAdministrationService.java
@@ -51,14 +51,6 @@ public interface ArchivaAdministrationService
List<LegacyArtifactPath> getLegacyArtifactPaths()
throws ArchivaRestServiceException;
- @Path( "addLegacyArtifactPath" )
- @POST
- @Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
- @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
- @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION )
- void addLegacyArtifactPath( LegacyArtifactPath legacyArtifactPath )
- throws ArchivaRestServiceException;
-
@Path( "deleteLegacyArtifactPath" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java
index 9edafe78e..ff1d3fd18 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java
@@ -25,8 +25,6 @@ import org.apache.archiva.admin.model.beans.LegacyArtifactPath;
import org.apache.archiva.admin.model.beans.NetworkConfiguration;
import org.apache.archiva.admin.model.beans.OrganisationInformation;
import org.apache.archiva.admin.model.beans.UiConfiguration;
-import org.apache.archiva.model.ArtifactReference;
-import org.apache.archiva.repository.ManagedRepositoryContent;
import org.apache.archiva.repository.scanner.RepositoryContentConsumers;
import org.apache.archiva.rest.api.model.AdminRepositoryConsumer;
import org.apache.archiva.rest.api.services.ArchivaAdministrationService;
@@ -38,8 +36,6 @@ import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import javax.inject.Inject;
-import javax.inject.Named;
-import javax.ws.rs.core.Response;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -56,9 +52,6 @@ public class DefaultArchivaAdministrationService
@Inject
private ArchivaAdministration archivaAdministration;
- @Inject
- @Named ( value = "managedRepositoryContent#legacy" )
- private ManagedRepositoryContent repositoryContent;
@Inject
private RepositoryContentConsumers repoConsumerUtil;
@@ -77,37 +70,6 @@ public class DefaultArchivaAdministrationService
}
}
- @Override
- public void addLegacyArtifactPath( LegacyArtifactPath legacyArtifactPath )
- throws ArchivaRestServiceException
- {
-
- // Check the proposed Artifact matches the path
- ArtifactReference artifact = new ArtifactReference();
-
- artifact.setGroupId( legacyArtifactPath.getGroupId() );
- artifact.setArtifactId( legacyArtifactPath.getArtifactId() );
- artifact.setClassifier( legacyArtifactPath.getClassifier() );
- artifact.setVersion( legacyArtifactPath.getVersion() );
- artifact.setType( legacyArtifactPath.getType() );
- String path = repositoryContent.toPath( artifact );
- if ( !StringUtils.equals( path, legacyArtifactPath.getPath() ) )
- {
- throw new ArchivaRestServiceException(
- "artifact path reference '" + legacyArtifactPath.getPath() + "' does not match the initial path: '"
- + path + "'", Response.Status.BAD_REQUEST.getStatusCode(), null );
- }
-
- try
- {
-
- archivaAdministration.addLegacyArtifactPath( legacyArtifactPath, getAuditInformation() );
- }
- catch ( RepositoryAdminException e )
- {
- throw new ArchivaRestServiceException( e.getMessage(), e );
- }
- }
@Override
public Boolean deleteLegacyArtifactPath( String path )
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
index 31e2b881f..93547c0d9 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
+++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
@@ -62,7 +62,6 @@ import org.apache.archiva.repository.ManagedRepositoryContent;
import org.apache.archiva.repository.RepositoryContentFactory;
import org.apache.archiva.repository.RepositoryException;
import org.apache.archiva.repository.RepositoryNotFoundException;
-import org.apache.archiva.repository.content.legacy.LegacyPathParser;
import org.apache.archiva.repository.content.maven2.RepositoryRequest;
import org.apache.archiva.repository.events.AuditListener;
import org.apache.archiva.repository.layout.LayoutException;
@@ -201,7 +200,7 @@ public class ArchivaDavResourceFactory
this.digestSha1 = plexusSisuBridge.lookup( Digester.class, "sha1" );
// TODO remove this hard dependency on maven !!
- repositoryRequest = new RepositoryRequest( new LegacyPathParser( archivaConfiguration ) );
+ repositoryRequest = new RepositoryRequest( );
}
@PostConstruct
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavResourceFactoryTest.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavResourceFactoryTest.java
index edb8ab3d4..7b3870d23 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavResourceFactoryTest.java
+++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavResourceFactoryTest.java
@@ -36,7 +36,6 @@ import org.apache.archiva.proxy.DefaultRepositoryProxyConnectors;
import org.apache.archiva.proxy.model.ProxyFetchResult;
import org.apache.archiva.repository.ManagedRepositoryContent;
import org.apache.archiva.repository.RepositoryContentFactory;
-import org.apache.archiva.repository.content.legacy.LegacyPathParser;
import org.apache.archiva.repository.content.maven2.ManagedDefaultRepositoryContent;
import org.apache.archiva.repository.content.maven2.RepositoryRequest;
import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
@@ -460,7 +459,7 @@ public class ArchivaDavResourceFactoryTest
ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
// use actual object (this performs the isMetadata, isDefault and isSupportFile check!)
- RepositoryRequest repoRequest = new RepositoryRequest( new LegacyPathParser( this.archivaConfiguration ) );
+ RepositoryRequest repoRequest = new RepositoryRequest( );
resourceFactory.setRepositoryRequest( repoRequest );
try
@@ -521,7 +520,7 @@ public class ArchivaDavResourceFactoryTest
ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
// use actual object (this performs the isMetadata, isDefault and isSupportFile check!)
- RepositoryRequest repoRequest = new RepositoryRequest( new LegacyPathParser( this.archivaConfiguration ) );
+ RepositoryRequest repoRequest = new RepositoryRequest( );
resourceFactory.setRepositoryRequest( repoRequest );
try
@@ -572,7 +571,7 @@ public class ArchivaDavResourceFactoryTest
ManagedRepositoryContent legacyRepo = createManagedRepositoryContent( LEGACY_REPO );
// use actual object (this performs the isMetadata, isDefault and isSupportFile check!)
- RepositoryRequest repoRequest = new RepositoryRequest( new LegacyPathParser( this.archivaConfiguration ) );
+ RepositoryRequest repoRequest = new RepositoryRequest( );
resourceFactory.setRepositoryRequest( repoRequest );
try