diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml index b56d3adf6..39781728d 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml @@ -87,17 +87,7 @@ org.apache.cxf - cxf-bundle-jaxrs - - - org.eclipse.jetty - jetty-server - - - commons-logging - commons-logging - - + cxf-rt-frontend-jaxrs diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml index c63241d2a..1fafc81be 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml @@ -198,22 +198,22 @@ org.apache.cxf - cxf-bundle-jaxrs - - - org.eclipse.jetty - jetty-server - - - org.codehaus.jettison - jettison - - - org.apache.geronimo.specs - geronimo-servlet_2.5_spec - - + cxf-rt-frontend-jaxrs + + + org.apache.cxf + cxf-rt-rs-extension-providers + + + + org.apache.cxf + cxf-rt-rs-client + test + + + + org.apache.archiva.redback redback-rest-services @@ -279,6 +279,12 @@ test + + org.slf4j + jul-to-slf4j + test + + org.hsqldb hsqldb diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/CopyArtifactTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/CopyArtifactTest.java index 526d40662..abfdf827c 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/CopyArtifactTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/CopyArtifactTest.java @@ -18,12 +18,9 @@ package org.apache.archiva.rest.services; * under the License. */ -import org.apache.archiva.admin.model.beans.ManagedRepository; import org.apache.archiva.rest.api.model.ArtifactTransferRequest; import org.apache.archiva.rest.api.services.RepositoriesService; -import org.apache.commons.io.FileUtils; import org.apache.commons.lang.StringUtils; -import org.apache.cxf.jaxrs.client.ServerWebApplicationException; import org.junit.Ignore; import org.junit.Test; @@ -79,7 +76,7 @@ public class CopyArtifactTest } } - @Test( expected = ServerWebApplicationException.class ) + @Test( expected = Exception.class ) public void copyNonExistingArtifact() throws Throwable { @@ -95,9 +92,9 @@ public class CopyArtifactTest artifactTransferRequest.setTargetRepositoryId( TARGET_REPO_ID ); RepositoriesService repositoriesService = getRepositoriesService( authorizationHeader ); - Boolean res = repositoriesService.copyArtifact( artifactTransferRequest ); + repositoriesService.copyArtifact( artifactTransferRequest ); } - catch ( ServerWebApplicationException e ) + catch ( Exception e ) { assertTrue( StringUtils.contains( e.getMessage(), "cannot find artifact" ) ); throw e; diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/PingServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/PingServiceTest.java index 2786a25d0..7fb242e95 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/PingServiceTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/PingServiceTest.java @@ -20,11 +20,12 @@ package org.apache.archiva.rest.services; */ import org.apache.archiva.rest.api.services.PingService; -import org.apache.cxf.jaxrs.client.ServerWebApplicationException; import org.apache.cxf.jaxrs.client.WebClient; import org.junit.Ignore; import org.junit.Test; +import javax.ws.rs.ForbiddenException; + /** * @author Olivier Lamy * @since 1.4-M1 @@ -45,7 +46,7 @@ public class PingServiceTest assertEquals( "Yeah Baby It rocks!", res ); } - @Test( expected = ServerWebApplicationException.class ) + @Test( expected = ForbiddenException.class ) public void pingWithAuthzFailed() throws Exception { @@ -55,9 +56,9 @@ public class PingServiceTest String res = getPingService().pingWithAuthz(); fail( "not in exception" ); } - catch ( ServerWebApplicationException e ) + catch ( ForbiddenException e ) { - assertEquals( 403, e.getStatus() ); + assertEquals( 403, e.getResponse().getStatus() ); throw e; } } diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RemoteRepositoriesServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RemoteRepositoriesServiceTest.java index 4d7d78c21..db857719f 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RemoteRepositoriesServiceTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RemoteRepositoriesServiceTest.java @@ -21,10 +21,10 @@ package org.apache.archiva.rest.services; import org.apache.archiva.admin.model.beans.RemoteRepository; import org.apache.archiva.rest.api.services.RemoteRepositoriesService; -import org.apache.cxf.jaxrs.client.ServerWebApplicationException; import org.apache.cxf.jaxrs.client.WebClient; import org.junit.Test; +import javax.ws.rs.ForbiddenException; import java.util.List; /** @@ -35,7 +35,7 @@ public class RemoteRepositoriesServiceTest { - @Test (expected = ServerWebApplicationException.class) + @Test( expected = ForbiddenException.class ) public void listRemoteRepositoriesKarmaFailed() throws Exception { @@ -44,9 +44,9 @@ public class RemoteRepositoriesServiceTest { assertFalse( service.getRemoteRepositories().isEmpty() ); } - catch ( ServerWebApplicationException e ) + catch ( ForbiddenException e ) { - assertEquals( 403, e.getStatus() ); + assertEquals( 403, e.getResponse().getStatus() ); throw e; } } diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoriesServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoriesServiceTest.java index 12070c3ac..51c1bff85 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoriesServiceTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoriesServiceTest.java @@ -29,13 +29,14 @@ import org.apache.archiva.rest.api.services.BrowseService; import org.apache.archiva.rest.api.services.ManagedRepositoriesService; import org.apache.archiva.rest.api.services.RepositoriesService; import org.apache.commons.io.FileUtils; -import org.apache.cxf.jaxrs.client.ServerWebApplicationException; -import static org.assertj.core.api.Assertions.assertThat; import org.junit.Test; +import javax.ws.rs.ForbiddenException; import java.io.File; import java.util.List; +import static org.assertj.core.api.Assertions.assertThat; + /** * @author Olivier Lamy */ @@ -43,7 +44,7 @@ public class RepositoriesServiceTest extends AbstractArchivaRestTest { - @Test ( expected = ServerWebApplicationException.class ) + @Test( expected = ForbiddenException.class ) public void scanRepoKarmaFailed() throws Exception { @@ -52,9 +53,9 @@ public class RepositoriesServiceTest { service.scanRepository( "id", true ); } - catch ( ServerWebApplicationException e ) + catch ( ForbiddenException e ) { - assertEquals( 403, e.getStatus() ); + assertEquals( 403, e.getResponse().getStatus() ); throw e; } } @@ -79,7 +80,7 @@ public class RepositoriesServiceTest assertTrue( service.scanRepository( repoId, true ) ); } - @Test ( expected = ServerWebApplicationException.class ) + @Test( expected = ForbiddenException.class ) public void deleteArtifactKarmaFailed() throws Exception { @@ -96,15 +97,15 @@ public class RepositoriesServiceTest repositoriesService.deleteArtifact( artifact ); } - catch ( ServerWebApplicationException e ) + catch ( ForbiddenException e ) { - assertEquals( 403, e.getStatus() ); + assertEquals( 403, e.getResponse().getStatus() ); throw e; } } - @Test ( expected = ServerWebApplicationException.class ) + @Test( expected = ForbiddenException.class ) public void deleteWithRepoNull() throws Exception { @@ -121,9 +122,9 @@ public class RepositoriesServiceTest repositoriesService.deleteArtifact( artifact ); } - catch ( ServerWebApplicationException e ) + catch ( ForbiddenException e ) { - assertEquals( "not http 400 status", 400, e.getStatus() ); + assertEquals( "not http 400 status", 400, e.getResponse().getStatus() ); throw e; } } diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java index 53cfeb5cc..16c84f23b 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java @@ -104,6 +104,13 @@ public class SecuritySystemStub return result; } + @Override + public AuthorizationResult authorize( User user, String permission, String resource ) + throws AuthorizationException + { + return null; + } + public String getAuthenticatorId() { return null; diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml index c12918ef9..27b503023 100644 --- a/archiva-modules/archiva-web/archiva-webapp/pom.xml +++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml @@ -767,61 +767,12 @@ org.apache.cxf - cxf-bundle-jaxrs - - - org.eclipse.jetty - jetty-server - - - org.eclipse.jetty - jetty-continuation - - - org.eclipse.jetty - jetty-http - - - org.eclipse.jetty - jetty-io - - - org.eclipse.jetty - jetty-util - - - org.eclipse.jetty - jetty-security - - - org.apache.geronimo.specs - geronimo-servlet_2.5_spec - - - org.apache.geronimo.specs - geronimo-javamail_1.4_spec - - - org.apache.geronimo.specs - geronimo-stax-api_1.0_spec - - - org.apache.geronimo.specs - geronimo-activation_1.1_spec - - - org.codehaus.jettison - jettison - - - com.sun.xml.bind - jaxb-impl - - - javax.xml.bind - jaxb-api - - + cxf-rt-frontend-jaxrs + + + + org.apache.cxf + cxf-rt-rs-extension-providers org.springframework diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/BypassSecuritySystem.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/BypassSecuritySystem.java index a8587718b..fed66b90a 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/BypassSecuritySystem.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/BypassSecuritySystem.java @@ -82,6 +82,8 @@ public class BypassSecuritySystem return new AuthorizationResult( true, session.getUser(), null ); } + + @Override public String getAuthenticatorId() { diff --git a/pom.xml b/pom.xml index a1406a958..52a69c658 100644 --- a/pom.xml +++ b/pom.xml @@ -71,7 +71,7 @@ 2.4-SNAPSHOT 2.1 2.1 - 1.7.7 + 1.7.10 2.1 4.1.4.RELEASE @@ -85,7 +85,7 @@ 0.1-incubating - 2.6.15 + 3.0.3 10.10.1.1 4.3.6 4.4 @@ -562,22 +562,20 @@ org.apache.cxf - cxf-bundle-jaxrs - ${cxfVersion} - - - org.eclipse.jetty - jetty-server - - - commons-logging - commons-logging - - - org.codehaus.jettison - jettison - - + cxf-rt-frontend-jaxrs + ${cxf.version} + + + + org.apache.cxf + cxf-rt-rs-client + ${cxf.version} + + + + org.apache.cxf + cxf-rt-rs-extension-providers + ${cxf.version} org.apache.archiva @@ -1261,6 +1259,12 @@ ${slf4j.version} runtime + + org.slf4j + jul-to-slf4j + ${slf4j.version} + test + commons-logging