Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Update asto module #410

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
202 changes: 76 additions & 126 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,30 @@ SOFTWARE.
-->
<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>

<parent>
<groupId>com.artipie</groupId>
<artifactId>ppom</artifactId>
<version>0.5.1</version>
<version>2.0-SNAPSHOT</version>
<relativePath/>
</parent>

<artifactId>asto</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>asto</name>

<name>${project.groupId}:${project.artifactId}</name>
<description>A simple Java storage</description>
<url>https://github.com/artipie/asto</url>

<inceptionYear>2019</inceptionYear>

<licenses>
<license>
<name>MIT</name>
<url>https://github.com/artipie/asto/blob/master/LICENSE.txt</url>
</license>
</licenses>

<developers>
<developer>
<id>1</id>
Expand All @@ -56,19 +62,23 @@ SOFTWARE.
<timezone>+1</timezone>
</developer>
</developers>

<issueManagement>
<system>GitHub</system>
<url>https://github.com/artipie/asto/issues</url>
</issueManagement>

<scm>
<connection>scm:git:[email protected]:artipie/asto.git</connection>
<developerConnection>scm:git:[email protected]:artipie/asto.git</developerConnection>
<url>https://github.com/artipie/asto</url>
</scm>

<ciManagement>
<system>rultor</system>
<url>https://www.rultor.com/s/asto</url>
</ciManagement>

<distributionManagement>
<site>
<id>github-pages</id>
Expand All @@ -79,10 +89,22 @@ SOFTWARE.
<url>http://central.artipie.com/artipie/maven</url>
</snapshotRepository>
</distributionManagement>

<properties>
<vertx.version>4.2.1</vertx.version>
<qulice.license>${project.basedir}/LICENSE.header</qulice.license>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-bom</artifactId>
<version>9.4.46.v20220331</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.artipie</groupId>
Expand All @@ -95,32 +117,25 @@ SOFTWARE.
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-log</artifactId>
<version>0.20.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>2.0.0-alpha5</version>
<scope>test</scope>
</dependency>

<!-- Vert.x dependencies -->
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-reactive-streams</artifactId>
<version>${vertx.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-rx-java2</artifactId>
<version>${vertx.version}</version>
<optional>true</optional>
<exclusions>
<exclusion>
Expand All @@ -132,7 +147,6 @@ SOFTWARE.
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
<version>${vertx.version}</version>
<optional>true</optional>
<exclusions>
<exclusion>
Expand All @@ -141,32 +155,42 @@ SOFTWARE.
</exclusion>
</exclusions>
</dependency>

<!-- RxJava -->
<dependency>
<groupId>com.github.akarnokd</groupId>
<artifactId>rxjava2-jdk8-interop</artifactId>
<version>0.3.7</version>
</dependency>
<dependency>
<groupId>com.github.akarnokd</groupId>
<artifactId>rxjava2-extensions</artifactId>
<version>0.20.10</version>
</dependency>
<dependency>
<groupId>org.cqfn</groupId>
<artifactId>rio</artifactId>
<version>0.3</version>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-retry</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
</dependency>
<dependency>
<groupId>wtf.g4s8</groupId>
<artifactId>tuples</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>

<!-- S3 client -->
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.7.19</version>
<version>2.17.174</version>
<optional>true</optional>
<exclusions>
<exclusion>
Expand All @@ -188,6 +212,7 @@ SOFTWARE.
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>io.etcd</groupId>
<artifactId>jetcd-test</artifactId>
Expand All @@ -199,65 +224,67 @@ SOFTWARE.
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.6.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.adobe.testing</groupId>
<artifactId>s3mock</artifactId>
<version>2.4.8</version>
<version>2.4.9</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.adobe.testing</groupId>
<artifactId>s3mock-junit5</artifactId>
<version>2.1.26</version>
<version>2.4.9</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.15</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>wtf.g4s8</groupId>
<artifactId>tuples</artifactId>
<version>0.1.2</version>
</dependency>
<!-- TestNG compatibility layer with Junit5 -->
<dependency>
<groupId>com.github.testng-team</groupId>
<artifactId>testng-junit5</artifactId>
<version>0.0.1</version>
<groupId>org.reactivestreams</groupId>
<artifactId>reactive-streams-tck</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.reactivestreams</groupId>
<artifactId>reactive-streams-tck</artifactId>
<version>1.0.3</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit-platform</artifactId>
<version>${surefire.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-testng</artifactId>
<version>${surefire.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<forkCount>1</forkCount>
<reuseForks>true</reuseForks>
Expand All @@ -273,82 +300,5 @@ SOFTWARE.
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.8.1</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>jacoco-check</id>
<configuration combine.self="append">
<rules>
<rule>
<element>BUNDLE</element>
<limits>
<limit>
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>0.7</minimum>
</limit>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.70</minimum>
</limit>
<limit>
<counter>BRANCH</counter>
<value>COVEREDRATIO</value>
<minimum>0.70</minimum>
</limit>
<limit>
<counter>COMPLEXITY</counter>
<value>COVEREDRATIO</value>
<minimum>0.70</minimum>
</limit>
<limit>
<counter>METHOD</counter>
<value>COVEREDRATIO</value>
<minimum>0.70</minimum>
</limit>
<limit>
<counter>CLASS</counter>
<value>MISSEDCOUNT</value>
<maximum>5</maximum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
<execution>
<id>jacoco-site</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>jacoco-initialize</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<repositories>
<repository>
<id>OSS sonnatype</id>
<name>Vert.x snapshot repo</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
</repositories>
</project>
7 changes: 4 additions & 3 deletions src/main/java/com/artipie/asto/s3/S3Storage.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,10 @@ public CompletableFuture<Void> save(final Key key, final Content content) {
public CompletableFuture<Void> move(final Key source, final Key destination) {
return this.client.copyObject(
CopyObjectRequest.builder()
.copySource(String.format("%s/%s", this.bucket, source.string()))
.bucket(this.bucket)
.key(destination.string())
.sourceBucket(this.bucket)
.sourceKey(source.string())
.destinationBucket(this.bucket)
.destinationKey(destination.string())
.build()
).thenCompose(
copied -> this.client.deleteObject(
Expand Down