Dependency cleanup web-common

This commit is contained in:
Martin Stockhammer 2020-06-25 22:18:20 +02:00
parent 11efad1ee6
commit 33d4958f10
3 changed files with 178 additions and 83 deletions

View File

@ -179,11 +179,102 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.archiva</groupId> <groupId>org.apache.archiva</groupId>
<artifactId>audit</artifactId> <artifactId>archiva-storage-api</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.ws.rs</groupId> <groupId>org.apache.archiva</groupId>
<artifactId>javax.ws.rs-api</artifactId> <artifactId>archiva-model</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-common</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-storage-fs</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-repository-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-repository-admin-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-scheduler-repository-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-checksum</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-scheduler-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>metadata-model</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-filelock</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva.maven</groupId>
<artifactId>archiva-maven-model</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-users-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-configuration</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-policy</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-authentication-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-integrations-security</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-rest-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-users-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-common-ldap</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-keys-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-authorization-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva.components.registry</groupId>
<artifactId>archiva-components-spring-registry-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva.components.cache</groupId>
<artifactId>archiva-components-spring-cache-api</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.archiva.components</groupId> <groupId>org.apache.archiva.components</groupId>
@ -193,6 +284,45 @@
<groupId>org.apache.archiva.components</groupId> <groupId>org.apache.archiva.components</groupId>
<artifactId>archiva-components-spring-quartz</artifactId> <artifactId>archiva-components-spring-quartz</artifactId>
</dependency> </dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-provider-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.quartz-scheduler</groupId> <groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId> <artifactId>quartz</artifactId>
@ -209,10 +339,6 @@
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId> <artifactId>spring-context</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.jsoup</groupId> <groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId> <artifactId>jsoup</artifactId>
@ -229,11 +355,28 @@
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId> <artifactId>commons-text</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.rometools</groupId>
<artifactId>rome</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-core</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.apache.cxf</groupId> <groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId> <artifactId>cxf-rt-frontend-jaxrs</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
</dependency>
<dependency> <dependency>
@ -248,6 +391,11 @@
<artifactId>javax.annotation-api</artifactId> <artifactId>javax.annotation-api</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>javax.persistence</groupId> <groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId> <artifactId>javax.persistence-api</artifactId>
@ -264,22 +412,7 @@
<version>${redback.version}</version> <version>${redback.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.apache.archiva</groupId> <groupId>org.apache.archiva</groupId>
<artifactId>archiva-test-utils</artifactId> <artifactId>archiva-test-utils</artifactId>
@ -292,11 +425,6 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.apache.maven.wagon</groupId> <groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http</artifactId> <artifactId>wagon-http</artifactId>
@ -327,7 +455,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-plus</artifactId> <artifactId>jetty-servlet</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- override transitive from cxf --> <!-- override transitive from cxf -->
@ -337,25 +465,12 @@
<version>${jetty.version}</version> <version>${jetty.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-io</artifactId>
<version>${jetty.version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-security</artifactId> <artifactId>jetty-security</artifactId>
<version>${jetty.version}</version> <version>${jetty.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.apache.archiva.redback</groupId> <groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-rest-services</artifactId> <artifactId>redback-rest-services</artifactId>
@ -363,18 +478,6 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-keys-jpa</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-rest-services</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.apache.archiva</groupId> <groupId>org.apache.archiva</groupId>
<artifactId>archiva-webdav</artifactId> <artifactId>archiva-webdav</artifactId>
@ -412,18 +515,6 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>

View File

@ -18,8 +18,6 @@ package org.apache.archiva.web.api;
* under the License. * under the License.
*/ */
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.RepositoryAdminException;
import org.apache.archiva.admin.model.admin.ArchivaAdministration; import org.apache.archiva.admin.model.admin.ArchivaAdministration;
import org.apache.archiva.checksum.ChecksumAlgorithm; import org.apache.archiva.checksum.ChecksumAlgorithm;
@ -321,12 +319,9 @@ public class DefaultFileUploadService
// get from the session file with groupId/artifactId // get from the session file with groupId/artifactId
Iterable<FileMetadata> filesToAdd = Iterables.filter(fileMetadatas, new Predicate<FileMetadata>() { Iterator<FileMetadata> iterator = fileMetadatas.stream( )
public boolean apply(FileMetadata fileMetadata) { .filter( fileMetadata -> fileMetadata != null && !fileMetadata.isPomFile( ) )
return fileMetadata != null && !fileMetadata.isPomFile(); .iterator( );
}
});
Iterator<FileMetadata> iterator = filesToAdd.iterator();
boolean pomGenerated = false; boolean pomGenerated = false;
while (iterator.hasNext()) { while (iterator.hasNext()) {
FileMetadata fileMetadata = iterator.next(); FileMetadata fileMetadata = iterator.next();
@ -337,14 +332,8 @@ public class DefaultFileUploadService
deleteFile(fileMetadata.getServerFileName()); deleteFile(fileMetadata.getServerFileName());
} }
filesToAdd = Iterables.filter(fileMetadatas, new Predicate<FileMetadata>() { iterator = fileMetadatas.stream( ).filter( fileMetadata -> fileMetadata != null && fileMetadata.isPomFile( ) )
@Override .iterator( );
public boolean apply(FileMetadata fileMetadata) {
return fileMetadata != null && fileMetadata.isPomFile();
}
});
iterator = filesToAdd.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
FileMetadata fileMetadata = iterator.next(); FileMetadata fileMetadata = iterator.next();
log.debug("fileToAdd: {}", fileMetadata); log.debug("fileToAdd: {}", fileMetadata);

17
pom.xml
View File

@ -73,7 +73,7 @@
<!-- dependencies of maven modules --> <!-- dependencies of maven modules -->
<jsoup.version>1.12.1</jsoup.version> <jsoup.version>1.12.1</jsoup.version>
<rome.version>1.12.2</rome.version> <rome.version>1.13.1</rome.version>
<cronutils.version>9.0.2</cronutils.version> <cronutils.version>9.0.2</cronutils.version>
<lucene.version>4.10.4</lucene.version> <lucene.version>4.10.4</lucene.version>
@ -1399,6 +1399,16 @@
<artifactId>redback-policy</artifactId> <artifactId>redback-policy</artifactId>
<version>${redback.version}</version> <version>${redback.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-users-jpa</artifactId>
<version>${redback.version}</version>
</dependency>
<dependency>
<groupId>org.apache.archiva.redback</groupId>
<artifactId>redback-keys-api</artifactId>
<version>${redback.version}</version>
</dependency>
@ -1624,6 +1634,11 @@
<artifactId>jetty-plus</artifactId> <artifactId>jetty-plus</artifactId>
<version>${jetty.version}</version> <version>${jetty.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency> <dependency>