Skip to content

Commit

Permalink
[NO_REVIEW] apache#1647 Upgrade Dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
vttranlina committed Jul 24, 2023
1 parent aeb4710 commit b7666d6
Show file tree
Hide file tree
Showing 125 changed files with 866 additions and 1,274 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pipeline {
stage('Build') {
steps {
echo 'Building'
sh 'mvn -U -B -e clean install -DskipTests -T1C ${MVN_SHOW_TIMESTAMPS} ${MVN_LOCAL_REPO_OPT}'
sh 'mvn -U -B -e clean install -DskipTests -Djib.skip -T1C ${MVN_SHOW_TIMESTAMPS} ${MVN_LOCAL_REPO_OPT}'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void waitUntilReady(WaitStrategyTarget waitStrategyTarget) {
Unreliables.retryUntilTrue(Ints.checkedCast(timeout.getSeconds()), TimeUnit.SECONDS, () -> {
try {
ClusterFactory.createWithoutKeyspace(ClusterConfiguration.builder()
.host(Host.from(cassandraContainer.getContainerIpAddress(), cassandraContainer.getMappedPort(9042)))
.host(Host.from(cassandraContainer.getHost(), cassandraContainer.getMappedPort(9042)))
.username("cassandra")
.password("cassandra")
.maxRetry(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private static String buildSpecificImageDiscriminator() {

@SuppressWarnings("resource")
public DockerCassandra() {
this("cassandra_3_11_10-" + buildSpecificImageDiscriminator(), AdditionalDockerFileStep.IDENTITY);
this("cassandra_3_11_15-" + buildSpecificImageDiscriminator(), AdditionalDockerFileStep.IDENTITY);
}

private DockerCassandra(String imageName, AdditionalDockerFileStep additionalSteps) {
Expand Down Expand Up @@ -168,7 +168,7 @@ public void close() {
new ImageFromDockerfile(imageName,doNotDeleteImageAfterUsage)
.withDockerfileFromBuilder(builder ->
additionalSteps.applyStep(builder
.from("cassandra:3.11.10")
.from("cassandra:3.11.15")
.env("CASSANDRA_CONFIG", "/etc/cassandra")
.run("echo \"-Xms" + CASSANDRA_MEMORY + "M\" >> " + JVM_OPTIONS
+ "&& echo \"-Xmx" + CASSANDRA_MEMORY + "M\" >> " + JVM_OPTIONS
Expand All @@ -183,6 +183,7 @@ public void close() {
.build()))
.withTmpFs(ImmutableMap.of("/var/lib/cassandra", "rw,noexec,nosuid,size=200m"))
.withExposedPorts(CASSANDRA_PORT)
.withCreateContainerCmdModifier(createContainerCmd -> createContainerCmd.withName("james-cassandra-test-" + UUID.randomUUID()))
.withLogConsumer(DockerCassandra::displayDockerLog);
cassandraContainer
.waitingFor(new CassandraWaitStrategy(cassandraContainer));
Expand Down Expand Up @@ -223,7 +224,7 @@ public Host getHost() {
}

public String getIp() {
return cassandraContainer.getContainerIpAddress();
return cassandraContainer.getHost();
}

public int getBindingPort() {
Expand Down
2 changes: 1 addition & 1 deletion backends-common/opensearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
<version>2.19.0</version>
<version>${log4j2.version}</version>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx:1.22
FROM nginx:1.25

COPY conf/nginx-conf/ /etc/nginx/conf.d/
COPY conf/default.crt /etc/ssl/certs/default.crt
Expand Down
10 changes: 6 additions & 4 deletions backends-common/pulsar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
<properties>
<pulsar-client.version>2.11.0</pulsar-client.version>
<clever-cloud.pulsar4s.version>2.9.0</clever-cloud.pulsar4s.version>
<testcontainer-pulsar.version>0.40.17</testcontainer-pulsar.version>
<akka-stream.version>2.8.3</akka-stream.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -86,13 +88,13 @@
<dependency>
<groupId>com.dimafeng</groupId>
<artifactId>testcontainers-scala-pulsar_${scala.base}</artifactId>
<version>0.40.10</version>
<version>${testcontainer-pulsar.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.dimafeng</groupId>
<artifactId>testcontainers-scala-scalatest_${scala.base}</artifactId>
<version>0.40.10</version>
<version>${testcontainer-pulsar.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -102,12 +104,12 @@
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-stream-typed_${scala.base}</artifactId>
<version>2.6.20</version>
<version>${akka-stream.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-stream_${scala.base}</artifactId>
<version>2.6.20</version>
<version>${akka-stream.version}</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private String hostName(Optional<String> hostNamePrefix) {
}

private String getHostIp() {
return container.getContainerIpAddress();
return container.getHost();
}

private Integer getPort() {
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-healthcheck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>3.4.18</version>
<version>3.5.8</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
5 changes: 3 additions & 2 deletions examples/custom-imap/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ services:
image: apache/james:memory-latest
container_name: james
hostname: james.local
command:
- --generate-keystore
volumes:
- ./target/custom-imap-3.8.0-SNAPSHOT-jar-with-dependencies.jar:/root/extensions-jars/custom-imap-3.8.0-SNAPSHOT-jar-with-dependencies.jar
- ./sample-configuration/keystore:/root/conf/keystore
- ./target/custom-imap-jar-with-dependencies.jar:/root/extensions-jars/custom-imap.jar
- ./sample-configuration/imapserver.xml:/root/conf/imapserver.xml
ports:
- "143:143"
Expand Down
3 changes: 2 additions & 1 deletion examples/custom-imap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>5.1.0</version>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand All @@ -97,6 +97,7 @@
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>custom-imap</finalName>
</configuration>
<executions>
<execution>
Expand Down
Binary file removed examples/custom-imap/sample-configuration/keystore
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/custom-james-assembly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ We do provide in this example [JIB](https://github.com/GoogleContainerTools/jib/
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>2.7.1</version>
<version>3.3.2</version>
<configuration>
<from>
<image>adoptopenjdk:11-jdk-hotspot</image>
Expand Down
4 changes: 2 additions & 2 deletions examples/custom-james-assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>2.7.1</version>
<version>3.3.2</version>
<configuration>
<from>
<image>eclipse-temurin:11-jre-focal</image>
<image>eclipse-temurin:11-jre-jammy</image>
</from>
<to>
<image>apache/james</image>
Expand Down
4 changes: 2 additions & 2 deletions examples/imap-autoconf/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ services:
image: apache/james:memory-latest
container_name: james
hostname: james.local
volumes:
- ./keystore:/root/conf/keystore
command:
- --generate-keystore
ports:
- "465:465"
- "993:993"
Expand Down
Binary file removed examples/imap-autoconf/keystore
Binary file not shown.
5 changes: 3 additions & 2 deletions examples/metrics-graphite/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ services:
image: apache/james:memory-latest
container_name: james
hostname: james.local
command:
- --generate-keystore
volumes:
- ./james/keystore:/root/conf/keystore
- ./target/metrics-graphite-3.8.0-SNAPSHOT-jar-with-dependencies.jar:/root/extensions-jars/metrics-graphite-3.8.0-SNAPSHOT-jar-with-dependencies.jar
- ./target/metrics-graphite-jar-with-dependencies.jar:/root/extensions-jars/metrics-graphite.jar
- ./james/extensions.properties:/root/conf/extensions.properties

graphite:
Expand Down
Binary file removed examples/metrics-graphite/james/keystore
Binary file not shown.
5 changes: 3 additions & 2 deletions examples/metrics-graphite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-graphite</artifactId>
<version>4.2.15</version>
<version>4.2.19</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>5.1.0</version>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -75,6 +75,7 @@
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>metrics-graphite</finalName>
</configuration>
<executions>
<execution>
Expand Down
10 changes: 10 additions & 0 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<executions>
<execution>
<id>get-the-git-infos</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
5 changes: 3 additions & 2 deletions examples/proxy-smtp/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
volumes:
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
ports:
- 25:25
- "25:25"
- 143:143
- 993:993
- 465:465
Expand All @@ -17,10 +17,11 @@ services:
image: apache/james:memory-latest
container_name: james
hostname: james.local
command:
- --generate-keystore
volumes:
- ./smtpserver.xml:/root/conf/smtpserver.xml:ro
- ./imapserver.xml:/root/conf/imapserver.xml:ro
- ./keystore:/root/conf/keystore

helo:
image: alpine:latest
Expand Down
Binary file removed examples/proxy-smtp/keystore
Binary file not shown.
4 changes: 0 additions & 4 deletions mailbox/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion mailbox/event/json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<dependency>
<groupId>com.beachape</groupId>
<artifactId>enumeratum_${scala.base}</artifactId>
<version>1.7.0</version>
<version>1.7.2</version>
</dependency>
<dependency>
<groupId>com.chuusai</groupId>
Expand Down
4 changes: 0 additions & 4 deletions mailbox/store/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
import javax.mail.Flags.Flag;

import org.apache.commons.io.input.TeeInputStream;
import org.apache.commons.io.input.UnsynchronizedBufferedInputStream;
import org.apache.commons.io.input.UnsynchronizedFilterInputStream;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.james.events.EventBus;
Expand Down Expand Up @@ -107,7 +109,6 @@
import org.apache.james.mime4j.stream.RecursionMode;
import org.apache.james.util.io.BodyOffsetInputStream;
import org.apache.james.util.io.InputStreamConsummer;
import org.apache.james.util.io.UnsynchronizedBufferedInputStream;
import org.apache.james.util.streams.Iterators;
import org.reactivestreams.Publisher;

Expand Down Expand Up @@ -358,7 +359,9 @@ public AppendResult appendMessage(InputStream msgIn, Date internalDate, final Ma
file = Files.createTempFile("imap", ".msg").toFile();
try (FileOutputStream out = new FileOutputStream(file);
BufferedOutputStream bufferedOut = new BufferedOutputStream(out);
UnsynchronizedBufferedInputStream tmpMsgIn = new UnsynchronizedBufferedInputStream(new TeeInputStream(msgIn, bufferedOut));
UnsynchronizedFilterInputStream tmpMsgIn = UnsynchronizedBufferedInputStream.builder()
.setInputStream(new TeeInputStream(msgIn, bufferedOut))
.get();
BodyOffsetInputStream bIn = new BodyOffsetInputStream(tmpMsgIn)) {
Pair<PropertyBuilder, HeaderImpl> pair = parseProperties(bIn);
PropertyBuilder propertyBuilder = pair.getLeft();
Expand Down Expand Up @@ -405,8 +408,10 @@ private Mono<AppendResult> appendMessage(Content msgIn, Date internalDate, final
}

try (InputStream contentStream = msgIn.getInputStream();
UnsynchronizedBufferedInputStream bufferedContentStream = new UnsynchronizedBufferedInputStream(contentStream);
BodyOffsetInputStream bIn = new BodyOffsetInputStream(bufferedContentStream)) {
UnsynchronizedFilterInputStream bufferedContentStream = UnsynchronizedBufferedInputStream.builder()
.setInputStream(contentStream)
.get();
BodyOffsetInputStream bIn = new BodyOffsetInputStream(bufferedContentStream)) {
Pair<PropertyBuilder, HeaderImpl> pair = parseProperties(bIn);
PropertyBuilder propertyBuilder = pair.getLeft();
HeaderImpl headers = pair.getRight();
Expand Down
4 changes: 0 additions & 4 deletions mailet/amqp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
Expand Down
4 changes: 0 additions & 4 deletions mailet/crypto/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

import javax.mail.MessagingException;

import org.apache.james.util.io.UnsynchronizedBufferedInputStream;
import org.apache.commons.io.input.UnsynchronizedBufferedInputStream;
import org.bouncycastle.cert.jcajce.JcaCertStoreBuilder;
import org.bouncycastle.cert.selector.X509CertificateHolderSelector;
import org.bouncycastle.cert.selector.jcajce.JcaX509CertSelectorConverter;
Expand Down Expand Up @@ -101,7 +101,10 @@ public KeyStoreHolder(String keyStoreFileName, String keyStorePassword, String k
}

keyStore = KeyStore.getInstance(keyStoreType);
keyStore.load(new UnsynchronizedBufferedInputStream(new FileInputStream(keyStoreFileName)), keyStorePassword.toCharArray());
keyStore.load(UnsynchronizedBufferedInputStream
.builder()
.setInputStream(new FileInputStream(keyStoreFileName))
.get(), keyStorePassword.toCharArray());
if (keyStore.size() == 0) {
throw new KeyStoreException("The keystore must be not empty");
}
Expand Down
Loading

0 comments on commit b7666d6

Please sign in to comment.