kopia lustrzana https://github.com/gaul/s3proxy
Update build
In general update the ancient build plugins around. Changes: * bring all maven plugins to latest versions * update checkstyle (as pre 8.41 is not supported anymore) * update checkstyle rules * make checkstyle plugin not fail the build (as there are issues) * fix maven-shade-plugin warnings about dupe resource * fix modernizer issue as it fails the build * make build reproducible Added comment about parent POM: the currently used parent is 10 years old, moreover, if you look in Maven Central, the GA is unmaintained (last release was in 2014). Better introduce own parent POM, or just copy whatever needed into this POM (related to staging) and stop using the ancient POM.pull/405/head
rodzic
ab6e321964
commit
075ff7f126
91
pom.xml
91
pom.xml
|
@ -1,6 +1,7 @@
|
|||
<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/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<!-- TODO: introduce own parent, do not depend on 10 years old unmaintained parent -->
|
||||
<parent>
|
||||
<groupId>org.sonatype.oss</groupId>
|
||||
<artifactId>oss-parent</artifactId>
|
||||
|
@ -53,7 +54,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.6</version>
|
||||
<version>3.0.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
|
@ -73,8 +74,43 @@
|
|||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-maven</id>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<requireMavenVersion>
|
||||
<version>3.2.5</version>
|
||||
</requireMavenVersion>
|
||||
</rules>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>2.5.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.8.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>3.1.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>check</id>
|
||||
|
@ -89,12 +125,26 @@
|
|||
<headerLocation>src/main/resources/copyright_header.txt</headerLocation>
|
||||
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||
<violationSeverity>warning</violationSeverity>
|
||||
<!-- TODO: remove once source fixed -->
|
||||
<failOnViolation>false</failOnViolation>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.puppycrawl.tools</groupId>
|
||||
<artifactId>checkstyle</artifactId>
|
||||
<version>9.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
|
@ -115,7 +165,7 @@
|
|||
<path>
|
||||
<groupId>com.google.errorprone</groupId>
|
||||
<artifactId>error_prone_core</artifactId>
|
||||
<version>2.9.0</version>
|
||||
<version>2.10.0</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
|
@ -123,7 +173,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<version>3.2.0</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
|
@ -136,7 +186,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<version>3.3.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
|
@ -149,7 +199,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<version>3.2.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
|
@ -158,6 +208,17 @@
|
|||
</goals>
|
||||
<configuration>
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
<filters>
|
||||
<filter>
|
||||
<artifact>org.eclipse.jetty:*</artifact>
|
||||
<excludes>
|
||||
<exclude>META-INF/MANIFEST.MF</exclude>
|
||||
<exclude>META-INF/LICENSE</exclude>
|
||||
<exclude>META-INF/NOTICE.txt</exclude>
|
||||
<exclude>about.html</exclude>
|
||||
</excludes>
|
||||
</filter>
|
||||
</filters>
|
||||
<artifactSet>
|
||||
<includes>
|
||||
<include>org.eclipse.jetty:*</include>
|
||||
|
@ -176,7 +237,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>3.3.0</version>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/jar-with-dependencies.xml</descriptor>
|
||||
|
@ -201,7 +262,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<version>3.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
|
@ -246,7 +307,7 @@
|
|||
<plugin>
|
||||
<groupId>com.github.spotbugs</groupId>
|
||||
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||
<version>4.2.0</version>
|
||||
<version>4.4.2</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.github.spotbugs</groupId>
|
||||
|
@ -269,7 +330,7 @@
|
|||
<plugin>
|
||||
<groupId>org.skife.maven</groupId>
|
||||
<artifactId>really-executable-jar-maven-plugin</artifactId>
|
||||
<version>1.4.1</version>
|
||||
<version>1.5.0</version>
|
||||
<configuration>
|
||||
<programFile>s3proxy</programFile>
|
||||
</configuration>
|
||||
|
@ -285,7 +346,7 @@
|
|||
<plugin>
|
||||
<groupId>org.gaul</groupId>
|
||||
<artifactId>modernizer-maven-plugin</artifactId>
|
||||
<version>2.1.0</version>
|
||||
<version>2.3.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>modernizer</id>
|
||||
|
@ -302,7 +363,7 @@
|
|||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.5</version>
|
||||
<version>1.6.8</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<serverId>ossrh</serverId>
|
||||
|
@ -319,7 +380,9 @@
|
|||
<jclouds.version>2.4.0</jclouds.version>
|
||||
<slf4j.version>1.7.28</slf4j.version>
|
||||
<shade.prefix>${project.groupId}.shaded</shade.prefix>
|
||||
<surefire.version>2.20</surefire.version>
|
||||
<surefire.version>2.22.2</surefire.version>
|
||||
<!-- Reproducible build: timestamp to use wherever needed -->
|
||||
<project.build.outputTimestamp>2021-11-26T09:00:00Z</project.build.outputTimestamp>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
|
|
|
@ -68,8 +68,8 @@ import com.google.common.cache.Cache;
|
|||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Streams;
|
||||
import com.google.common.escape.Escaper;
|
||||
import com.google.common.hash.HashCode;
|
||||
import com.google.common.hash.HashFunction;
|
||||
|
@ -1472,7 +1472,7 @@ public class S3ProxyHandler {
|
|||
isListV2 ? "NextContinuationToken" : "NextMarker",
|
||||
encodeBlob(encodingType, nextMarker));
|
||||
if (Quirks.OPAQUE_MARKERS.contains(blobStoreType)) {
|
||||
StorageMetadata sm = Iterables.getLast(set, null);
|
||||
StorageMetadata sm = Streams.findLast(set.stream()).orElse(null);
|
||||
if (sm != null) {
|
||||
lastKeyToMarker.put(Maps.immutableEntry(containerName,
|
||||
sm.getName()), nextMarker);
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
|
||||
</module>
|
||||
<module name="NewlineAtEndOfFile"/>
|
||||
<module name="SuppressionCommentFilter"/>
|
||||
<module name="Translation"/>
|
||||
<module name="LineLength"/>
|
||||
<module name="TreeWalker">
|
||||
<property name="cacheFile" value="target/cachefile"/>
|
||||
<module name="SuppressionCommentFilter"/>
|
||||
<module name="AbbreviationAsWordInName"/>
|
||||
<module name="AbstractClassName"/>
|
||||
<module name="AnnotationLocation"/>
|
||||
|
@ -38,7 +38,6 @@
|
|||
<module name="EqualsHashCode"/>
|
||||
<module name="ExplicitInitialization"/>
|
||||
<module name="FallThrough"/>
|
||||
<module name="FileContentsHolder"/>
|
||||
<module name="FinalClass"/>
|
||||
<module name="GenericWhitespace"/>
|
||||
<!--
|
||||
|
@ -67,7 +66,6 @@
|
|||
<module name="InterfaceIsType"/>
|
||||
<module name="JavadocStyle"/>
|
||||
<module name="LeftCurly"/>
|
||||
<module name="LineLength"/>
|
||||
<module name="LocalFinalVariableName"/>
|
||||
<module name="LocalVariableName"/>
|
||||
<module name="MagicNumber">
|
||||
|
|
Ładowanie…
Reference in New Issue