Java-1470 Split libraries module

This commit is contained in:
mikr 2020-04-29 20:49:15 +02:00
parent da174392ed
commit 299effed3e
54 changed files with 689 additions and 438 deletions

View File

@ -1,4 +1,4 @@
## Libraries ## Libraries-4
This module contains articles about various Java libraries. This module contains articles about various Java libraries.
These are small libraries that are relatively easy to use and do not require any separate module of their own. These are small libraries that are relatively easy to use and do not require any separate module of their own.
@ -8,36 +8,14 @@ The code examples related to different libraries are each in their own module.
Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-modules) we already have separate modules. Please make sure to have a look at the existing modules in such cases. Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-modules) we already have separate modules. Please make sure to have a look at the existing modules in such cases.
### Relevant articles ### Relevant articles
- [Quick Guide to RSS with Rome](https://www.baeldung.com/rome-rss)
- [Introduction to Javatuples](https://www.baeldung.com/java-tuples) - [Introduction to PCollections](https://www.baeldung.com/java-pcollections)
- [Introduction to Javassist](https://www.baeldung.com/javassist) - [Introduction to Eclipse Collections](https://www.baeldung.com/eclipse-collections)
- [Introduction to Apache Flink with Java](https://www.baeldung.com/apache-flink) - [DistinctBy in the Java Stream API](https://www.baeldung.com/java-streams-distinct-by)
- [Intro to JaVers](https://www.baeldung.com/javers) - [Introduction to NoException](https://www.baeldung.com/no-exception)
- [Merging Streams in Java](https://www.baeldung.com/java-merge-streams) - [Spring Yarg Integration](https://www.baeldung.com/spring-yarg)
- [Introduction to Quartz](https://www.baeldung.com/quartz) - [Delete a Directory Recursively in Java](https://www.baeldung.com/java-delete-directory)
- [How to Warm Up the JVM](https://www.baeldung.com/java-jvm-warmup) - [Guide to JDeferred](https://www.baeldung.com/jdeferred)
- [Software Transactional Memory in Java Using Multiverse](https://www.baeldung.com/java-multiverse-stm) - [Introduction to MBassador](https://www.baeldung.com/mbassador)
- [Locality-Sensitive Hashing in Java Using Java-LSH](https://www.baeldung.com/locality-sensitive-hashing) - [Using Pairs in Java](https://www.baeldung.com/java-pairs)
- [Introduction to Neuroph](https://www.baeldung.com/neuroph)
#5
- [Introduction to Caffeine](https://www.baeldung.com/java-caching-caffeine)
- [Introduction to StreamEx](https://www.baeldung.com/streamex)
- [A Docker Guide for Java](https://www.baeldung.com/docker-java-api)
- [Introduction to Akka Actors in Java](https://www.baeldung.com/akka-actors-java)
- [A Guide to Byte Buddy](https://www.baeldung.com/byte-buddy)
- [Introduction to jOOL](https://www.baeldung.com/jool)
- [Consumer Driven Contracts with Pact](https://www.baeldung.com/pact-junit-consumer-driven-contracts)
- [Introduction to Atlassian Fugue](https://www.baeldung.com/java-fugue)
- [Publish and Receive Messages with Nats Java Client](https://www.baeldung.com/nats-java-client)
- [Java Concurrency Utility with JCTools](https://www.baeldung.com/java-concurrency-jc-tools)
#6
- [Introduction to JavaPoet](https://www.baeldung.com/java-poet)
- [Guide to Resilience4j](https://www.baeldung.com/resilience4j)
- [Implementing a FTP-Client in Java](https://www.baeldung.com/java-ftp-client)
- [Introduction to Functional Java](https://www.baeldung.com/java-functional-library)
- [A Guide to the Reflections Library](https://www.baeldung.com/reflections-library)
- [Exactly Once Processing in Kafka](https://www.baeldung.com/kafka-exactly-once)
- More articles [[next -->]](/libraries-2) - More articles [[next -->]](/libraries-2)

21
libraries-5/README.md Normal file
View File

@ -0,0 +1,21 @@
## Libraries-5
This module contains articles about various Java libraries.
These are small libraries that are relatively easy to use and do not require any separate module of their own.
The code examples related to different libraries are each in their own module.
Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-modules) we already have separate modules. Please make sure to have a look at the existing modules in such cases.
### Relevant articles
- [Introduction to Caffeine](https://www.baeldung.com/java-caching-caffeine)
- [Introduction to StreamEx](https://www.baeldung.com/streamex)
- [A Docker Guide for Java](https://www.baeldung.com/docker-java-api)
- [Introduction to Akka Actors in Java](https://www.baeldung.com/akka-actors-java)
- [A Guide to Byte Buddy](https://www.baeldung.com/byte-buddy)
- [Introduction to jOOL](https://www.baeldung.com/jool)
- [Consumer Driven Contracts with Pact](https://www.baeldung.com/pact-junit-consumer-driven-contracts)
- [Introduction to Atlassian Fugue](https://www.baeldung.com/java-fugue)
- [Publish and Receive Messages with Nats Java Client](https://www.baeldung.com/nats-java-client)
- [Java Concurrency Utility with JCTools](https://www.baeldung.com/java-concurrency-jc-tools)
- More articles [[<-- prev]](/libraries-4) [[next -->]](/libraries-6)

View File

@ -7,9 +7,139 @@
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>1.0.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>libraries-5</artifactId> <artifactId>libraries-5</artifactId>
<modelVersion>4.0.0</modelVersion>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
</dependency>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>jool</artifactId>
<version>${jool.version}</version>
</dependency>
<dependency>
<groupId>au.com.dius</groupId>
<artifactId>pact-jvm-consumer-junit_2.11</artifactId>
<version>${pact.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/com.typesafe.akka/akka-actor -->
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_2.12</artifactId>
<version>${typesafe-akka.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-testkit_2.12</artifactId>
<version>${typesafe-akka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>one.util</groupId>
<artifactId>streamex</artifactId>
<version>${streamex.version}</version>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>${bytebuddy.version}</version>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<version>${bytebuddy.version}</version>
</dependency>
<!--Java Docker API Client -->
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java</artifactId>
<version>${docker.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--Java Docker API Client -->
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<version>${caffeine.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>${findbugs.version}</version>
<scope>test</scope>
</dependency>
<!-- Atlassian Fugue -->
<dependency>
<groupId>io.atlassian.fugue</groupId>
<artifactId>fugue</artifactId>
<version>${fugue.version}</version>
</dependency>
<dependency>
<groupId>io.nats</groupId>
<artifactId>jnats</artifactId>
<version>${jnats.version}</version>
</dependency>
<dependency>
<groupId>org.jctools</groupId>
<artifactId>jctools-core</artifactId>
<version>${jctools.version}</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>${jmh.version}</version>
</dependency>
</dependencies>
<properties>
<pact.version>3.5.0</pact.version>
<jool.version>0.9.12</jool.version>
<spring.version>4.3.8.RELEASE</spring.version>
<assertj.version>3.6.2</assertj.version>
<typesafe-akka.version>2.5.26</typesafe-akka.version>
<streamex.version>0.6.5</streamex.version>
<bytebuddy.version>1.7.1</bytebuddy.version>
<docker.version>3.0.14</docker.version>
<caffeine.version>2.5.5</caffeine.version>
<findbugs.version>3.0.2</findbugs.version>
<fugue.version>4.5.1</fugue.version>
<jnats.version>1.0</jnats.version>
<jctools.version>2.1.2</jctools.version>
<jmh.version>1.19</jmh.version>
</properties>
</project> </project>

View File

@ -8,6 +8,7 @@ import java.util.concurrent.TimeUnit;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import com.github.benmanes.caffeine.cache.*; import com.github.benmanes.caffeine.cache.*;
@ -65,43 +66,43 @@ public class CaffeineUnitTest {
assertEquals("Data for " + key, dataObject.getData()); assertEquals("Data for " + key, dataObject.getData());
}); });
cache.getAll(Arrays.asList("A", "B", "C")).thenAccept(dataObjectMap -> assertEquals(3, dataObjectMap.size())); cache.getAll(Arrays.asList("A", "B", "C")).thenAccept(dataObjectMap -> Assert.assertEquals(3, dataObjectMap.size()));
} }
@Test @Test
public void givenLoadingCacheWithSmallSize_whenPut_thenSizeIsConstant() { public void givenLoadingCacheWithSmallSize_whenPut_thenSizeIsConstant() {
LoadingCache<String, DataObject> cache = Caffeine.newBuilder().maximumSize(1).refreshAfterWrite(10, TimeUnit.MINUTES).build(k -> DataObject.get("Data for " + k)); LoadingCache<String, DataObject> cache = Caffeine.newBuilder().maximumSize(1).refreshAfterWrite(10, TimeUnit.MINUTES).build(k -> DataObject.get("Data for " + k));
assertEquals(0, cache.estimatedSize()); Assert.assertEquals(0, cache.estimatedSize());
cache.get("A"); cache.get("A");
assertEquals(1, cache.estimatedSize()); Assert.assertEquals(1, cache.estimatedSize());
cache.get("B"); cache.get("B");
cache.cleanUp(); cache.cleanUp();
assertEquals(1, cache.estimatedSize()); Assert.assertEquals(1, cache.estimatedSize());
} }
@Test @Test
public void givenLoadingCacheWithWeigher_whenPut_thenSizeIsConstant() { public void givenLoadingCacheWithWeigher_whenPut_thenSizeIsConstant() {
LoadingCache<String, DataObject> cache = Caffeine.newBuilder().maximumWeight(10).weigher((k, v) -> 5).build(k -> DataObject.get("Data for " + k)); LoadingCache<String, DataObject> cache = Caffeine.newBuilder().maximumWeight(10).weigher((k, v) -> 5).build(k -> DataObject.get("Data for " + k));
assertEquals(0, cache.estimatedSize()); Assert.assertEquals(0, cache.estimatedSize());
cache.get("A"); cache.get("A");
assertEquals(1, cache.estimatedSize()); Assert.assertEquals(1, cache.estimatedSize());
cache.get("B"); cache.get("B");
assertEquals(2, cache.estimatedSize()); Assert.assertEquals(2, cache.estimatedSize());
cache.get("C"); cache.get("C");
cache.cleanUp(); cache.cleanUp();
assertEquals(2, cache.estimatedSize()); Assert.assertEquals(2, cache.estimatedSize());
} }
@Test @Test
@ -138,7 +139,7 @@ public class CaffeineUnitTest {
cache.get("A"); cache.get("A");
cache.get("A"); cache.get("A");
assertEquals(1, cache.stats().hitCount()); Assert.assertEquals(1, cache.stats().hitCount());
assertEquals(1, cache.stats().missCount()); Assert.assertEquals(1, cache.stats().missCount());
} }
} }

View File

@ -6,6 +6,8 @@ import com.github.dockerjava.api.command.InspectContainerResponse;
import com.github.dockerjava.api.model.Container; import com.github.dockerjava.api.model.Container;
import com.github.dockerjava.api.model.PortBinding; import com.github.dockerjava.api.model.PortBinding;
import com.github.dockerjava.core.DockerClientBuilder; import com.github.dockerjava.core.DockerClientBuilder;
import org.hamcrest.MatcherAssert;
import org.hamcrest.core.Is;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
@ -51,7 +53,7 @@ public class ContainerLiveTest {
CreateContainerResponse container = dockerClient.createContainerCmd("mongo:3.6").withCmd("--bind_ip_all").withName("mongo").withHostName("baeldung").withEnv("MONGO_LATEST_VERSION=3.6").withPortBindings(PortBinding.parse("9999:27017")).exec(); CreateContainerResponse container = dockerClient.createContainerCmd("mongo:3.6").withCmd("--bind_ip_all").withName("mongo").withHostName("baeldung").withEnv("MONGO_LATEST_VERSION=3.6").withPortBindings(PortBinding.parse("9999:27017")).exec();
// then // then
assertThat(container.getId(), is(not(null))); MatcherAssert.assertThat(container.getId(), is(not(null)));
} }
@Test @Test
@ -104,7 +106,7 @@ public class ContainerLiveTest {
// then // then
InspectContainerResponse containerResponse = dockerClient.inspectContainerCmd(container.getId()).exec(); InspectContainerResponse containerResponse = dockerClient.inspectContainerCmd(container.getId()).exec();
assertThat(containerResponse.getId(), is(container.getId())); MatcherAssert.assertThat(containerResponse.getId(), Is.is(container.getId()));
} }
@Test @Test

View File

@ -8,6 +8,8 @@ import com.github.dockerjava.core.DockerClientBuilder;
import com.github.dockerjava.core.command.BuildImageResultCallback; import com.github.dockerjava.core.command.BuildImageResultCallback;
import com.github.dockerjava.core.command.PullImageResultCallback; import com.github.dockerjava.core.command.PullImageResultCallback;
import com.github.dockerjava.core.command.PushImageResultCallback; import com.github.dockerjava.core.command.PushImageResultCallback;
import org.hamcrest.MatcherAssert;
import org.hamcrest.core.Is;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
@ -81,7 +83,7 @@ public class ImageLiveTest {
InspectImageResponse imageResponse = dockerClient.inspectImageCmd(image.getId()).exec(); InspectImageResponse imageResponse = dockerClient.inspectImageCmd(image.getId()).exec();
// then // then
assertThat(imageResponse.getId(), is(image.getId())); MatcherAssert.assertThat(imageResponse.getId(), Is.is(image.getId()));
} }
@Test @Test

View File

@ -5,6 +5,7 @@ import com.github.dockerjava.api.command.CreateNetworkResponse;
import com.github.dockerjava.api.model.Network; import com.github.dockerjava.api.model.Network;
import com.github.dockerjava.api.model.Network.Ipam; import com.github.dockerjava.api.model.Network.Ipam;
import com.github.dockerjava.core.DockerClientBuilder; import com.github.dockerjava.core.DockerClientBuilder;
import org.hamcrest.MatcherAssert;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
@ -64,7 +65,7 @@ public class NetworkLiveTest {
Network network = dockerClient.inspectNetworkCmd().withNetworkId(networkName).exec(); Network network = dockerClient.inspectNetworkCmd().withNetworkId(networkName).exec();
// then // then
assertThat(network.getName(), is(networkName)); MatcherAssert.assertThat(network.getName(), is(networkName));
} }
@Test @Test

View File

@ -5,6 +5,7 @@ import com.github.dockerjava.api.command.CreateVolumeResponse;
import com.github.dockerjava.api.command.InspectVolumeResponse; import com.github.dockerjava.api.command.InspectVolumeResponse;
import com.github.dockerjava.api.command.ListVolumesResponse; import com.github.dockerjava.api.command.ListVolumesResponse;
import com.github.dockerjava.core.DockerClientBuilder; import com.github.dockerjava.core.DockerClientBuilder;
import org.hamcrest.MatcherAssert;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
@ -57,7 +58,7 @@ public class VolumeLiveTest {
CreateVolumeResponse unnamedVolume = dockerClient.createVolumeCmd().exec(); CreateVolumeResponse unnamedVolume = dockerClient.createVolumeCmd().exec();
// then // then
assertThat(unnamedVolume.getName(), is(not(null))); MatcherAssert.assertThat(unnamedVolume.getName(), is(not(null)));
} }
@Test @Test
@ -67,7 +68,7 @@ public class VolumeLiveTest {
CreateVolumeResponse namedVolume = dockerClient.createVolumeCmd().withName("myNamedVolume").exec(); CreateVolumeResponse namedVolume = dockerClient.createVolumeCmd().withName("myNamedVolume").exec();
// then // then
assertThat(namedVolume.getName(), is(not(null))); MatcherAssert.assertThat(namedVolume.getName(), is(not(null)));
} }
@Test @Test

View File

@ -1,4 +1,4 @@
package com.baeldung.atlassian.fugue; package com.baeldung.fugue;
import io.atlassian.fugue.*; import io.atlassian.fugue.*;
import org.junit.Assert; import org.junit.Assert;

View File

@ -1,5 +1,6 @@
package com.baeldung.jctools; package com.baeldung.jctools;
import org.assertj.core.api.Assertions;
import org.jctools.queues.SpscArrayQueue; import org.jctools.queues.SpscArrayQueue;
import org.jctools.queues.SpscChunkedArrayQueue; import org.jctools.queues.SpscChunkedArrayQueue;
import org.junit.Test; import org.junit.Test;
@ -44,16 +45,16 @@ public class JCToolsUnitTest {
@Test @Test
public void whenQueueIsFull_thenNoMoreElementsCanBeAdded() throws InterruptedException { public void whenQueueIsFull_thenNoMoreElementsCanBeAdded() throws InterruptedException {
SpscChunkedArrayQueue<Integer> queue = new SpscChunkedArrayQueue<>(8, 16); SpscChunkedArrayQueue<Integer> queue = new SpscChunkedArrayQueue<>(8, 16);
assertThat(queue.capacity()).isEqualTo(16); Assertions.assertThat(queue.capacity()).isEqualTo(16);
CountDownLatch startConsuming = new CountDownLatch(1); CountDownLatch startConsuming = new CountDownLatch(1);
CountDownLatch awakeProducer = new CountDownLatch(1); CountDownLatch awakeProducer = new CountDownLatch(1);
AtomicReference<Throwable> error = new AtomicReference<>(); AtomicReference<Throwable> error = new AtomicReference<>();
Thread producer = new Thread(() -> { Thread producer = new Thread(() -> {
IntStream.range(0, queue.capacity()).forEach(i -> { IntStream.range(0, queue.capacity()).forEach(i -> {
assertThat(queue.offer(i)).isTrue(); Assertions.assertThat(queue.offer(i)).isTrue();
}); });
assertThat(queue.offer(queue.capacity())).isFalse(); Assertions.assertThat(queue.offer(queue.capacity())).isFalse();
startConsuming.countDown(); startConsuming.countDown();
try { try {
awakeProducer.await(); awakeProducer.await();
@ -61,7 +62,7 @@ public class JCToolsUnitTest {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
assertThat(queue.offer(queue.capacity())).isTrue(); Assertions.assertThat(queue.offer(queue.capacity())).isTrue();
}); });
producer.setUncaughtExceptionHandler((t, e) -> { producer.setUncaughtExceptionHandler((t, e) -> {
error.set(e); error.set(e);

View File

@ -1,4 +1,4 @@
package com.baeldung.stream; package com.baeldung.streamex;
import one.util.streamex.StreamEx; import one.util.streamex.StreamEx;
import org.junit.Test; import org.junit.Test;

17
libraries-6/README.md Normal file
View File

@ -0,0 +1,17 @@
## Libraries-6
This module contains articles about various Java libraries.
These are small libraries that are relatively easy to use and do not require any separate module of their own.
The code examples related to different libraries are each in their own module.
Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-modules) we already have separate modules. Please make sure to have a look at the existing modules in such cases.
### Relevant articles
- [Introduction to JavaPoet](https://www.baeldung.com/java-poet)
- [Guide to Resilience4j](https://www.baeldung.com/resilience4j)
- [Implementing a FTP-Client in Java](https://www.baeldung.com/java-ftp-client)
- [Introduction to Functional Java](https://www.baeldung.com/java-functional-library)
- [A Guide to the Reflections Library](https://www.baeldung.com/reflections-library)
- [Exactly Once Processing in Kafka](https://www.baeldung.com/kafka-exactly-once)
- More articles [[<-- prev]](/libraries-5)

View File

@ -11,5 +11,101 @@
<artifactId>libraries-6</artifactId> <artifactId>libraries-6</artifactId>
<dependencies>
<dependency>
<groupId>org.functionaljava</groupId>
<artifactId>functionaljava-java8</artifactId>
<version>${functionaljava.version}</version>
</dependency>
<dependency>
<groupId>com.codepoetics</groupId>
<artifactId>protonpack</artifactId>
<version>${protonpack.version}</version>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams</artifactId>
<version>${kafka.version}</version>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>${kafka.version}</version>
<classifier>test</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-circuitbreaker</artifactId>
<version>${resilience4j.version}</version>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-bulkhead</artifactId>
<version>${resilience4j.version}</version>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-retry</artifactId>
<version>${resilience4j.version}</version>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-timelimiter</artifactId>
<version>${resilience4j.version}</version>
</dependency>
<dependency>
<groupId>com.squareup</groupId>
<artifactId>javapoet</artifactId>
<version>${javapoet.version}</version>
</dependency>
<dependency>
<groupId>org.mockftpserver</groupId>
<artifactId>MockFtpServer</artifactId>
<version>${mockftpserver.version}</version>
<scope>test</scope>
</dependency>
<!-- Reflections -->
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>${reflections.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>${commons-net.version}</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commonsio.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<kafka.version>2.0.0</kafka.version>
<javapoet.version>1.10.0</javapoet.version>
<reflections.version>0.9.11</reflections.version>
<mockftpserver.version>2.7.1</mockftpserver.version>
<functionaljava.version>4.8.1</functionaljava.version>
<resilience4j.version>0.12.1</resilience4j.version>
<protonpack.version>1.15</protonpack.version>
<commons-net.version>3.6</commons-net.version>
<assertj.version>3.6.2</assertj.version>
<commonsio.version>2.6</commonsio.version>
</properties>
</project> </project>

View File

@ -1,43 +1,43 @@
package com.baeldung.fj; package com.baeldung.fj;
import fj.F; import fj.F;
import fj.F1Functions; import fj.F1Functions;
import fj.Unit; import fj.Unit;
import fj.data.IO; import fj.data.IO;
import fj.data.IOFunctions; import fj.data.IOFunctions;
public class FunctionalJavaIOMain { public class FunctionalJavaIOMain {
public static IO<Unit> printLetters(final String s) { public static IO<Unit> printLetters(final String s) {
return () -> { return () -> {
for (int i = 0; i < s.length(); i++) { for (int i = 0; i < s.length(); i++) {
System.out.println(s.charAt(i)); System.out.println(s.charAt(i));
} }
return Unit.unit(); return Unit.unit();
}; };
} }
public static void main(String[] args) { public static void main(String[] args) {
F<String, IO<Unit>> printLetters = i -> printLetters(i); F<String, IO<Unit>> printLetters = i -> printLetters(i);
IO<Unit> lowerCase = IOFunctions.stdoutPrintln("What's your first Name ?"); IO<Unit> lowerCase = IOFunctions.stdoutPrintln("What's your first Name ?");
IO<Unit> input = IOFunctions.stdoutPrint("First Name: "); IO<Unit> input = IOFunctions.stdoutPrint("First Name: ");
IO<Unit> userInput = IOFunctions.append(lowerCase, input); IO<Unit> userInput = IOFunctions.append(lowerCase, input);
IO<String> readInput = IOFunctions.stdinReadLine(); IO<String> readInput = IOFunctions.stdinReadLine();
F<String, String> toUpperCase = i -> i.toUpperCase(); F<String, String> toUpperCase = i -> i.toUpperCase();
F<String, IO<Unit>> transformInput = F1Functions.<String, IO<Unit>, String> o(printLetters).f(toUpperCase); F<String, IO<Unit>> transformInput = F1Functions.<String, IO<Unit>, String> o(printLetters).f(toUpperCase);
IO<Unit> readAndPrintResult = IOFunctions.bind(readInput, transformInput); IO<Unit> readAndPrintResult = IOFunctions.bind(readInput, transformInput);
IO<Unit> program = IOFunctions.bind(userInput, nothing -> readAndPrintResult); IO<Unit> program = IOFunctions.bind(userInput, nothing -> readAndPrintResult);
IOFunctions.toSafe(program).run(); IOFunctions.toSafe(program).run();
} }
} }

View File

@ -1,48 +1,48 @@
package com.baeldung.fj; package com.baeldung.fj;
import fj.F; import fj.F;
import fj.Show; import fj.Show;
import fj.data.Array; import fj.data.Array;
import fj.data.List; import fj.data.List;
import fj.data.Option; import fj.data.Option;
import fj.function.Characters; import fj.function.Characters;
import fj.function.Integers; import fj.function.Integers;
public class FunctionalJavaMain { public class FunctionalJavaMain {
public static final F<Integer, Boolean> isEven = i -> i % 2 == 0; public static final F<Integer, Boolean> isEven = i -> i % 2 == 0;
public static void main(String[] args) { public static void main(String[] args) {
List<Integer> fList = List.list(3, 4, 5, 6); List<Integer> fList = List.list(3, 4, 5, 6);
List<Boolean> evenList = fList.map(isEven); List<Boolean> evenList = fList.map(isEven);
Show.listShow(Show.booleanShow).println(evenList); Show.listShow(Show.booleanShow).println(evenList);
fList = fList.map(i -> i + 1); fList = fList.map(i -> i + 1);
Show.listShow(Show.intShow).println(fList); Show.listShow(Show.intShow).println(fList);
Array<Integer> a = Array.array(17, 44, 67, 2, 22, 80, 1, 27); Array<Integer> a = Array.array(17, 44, 67, 2, 22, 80, 1, 27);
Array<Integer> b = a.filter(Integers.even); Array<Integer> b = a.filter(Integers.even);
Show.arrayShow(Show.intShow).println(b); Show.arrayShow(Show.intShow).println(b);
Array<String> array = Array.array("Welcome", "To", "baeldung"); Array<String> array = Array.array("Welcome", "To", "baeldung");
Boolean isExist = array.exists(s -> List.fromString(s).forall(Characters.isLowerCase)); Boolean isExist = array.exists(s -> List.fromString(s).forall(Characters.isLowerCase));
System.out.println(isExist); System.out.println(isExist);
Array<Integer> intArray = Array.array(17, 44, 67, 2, 22, 80, 1, 27); Array<Integer> intArray = Array.array(17, 44, 67, 2, 22, 80, 1, 27);
int sum = intArray.foldLeft(Integers.add, 0); int sum = intArray.foldLeft(Integers.add, 0);
System.out.println(sum); System.out.println(sum);
Option<Integer> n1 = Option.some(1); Option<Integer> n1 = Option.some(1);
Option<Integer> n2 = Option.some(2); Option<Integer> n2 = Option.some(2);
F<Integer, Option<Integer>> f1 = i -> i % 2 == 0 ? Option.some(i + 100) : Option.none(); F<Integer, Option<Integer>> f1 = i -> i % 2 == 0 ? Option.some(i + 100) : Option.none();
Option<Integer> result1 = n1.bind(f1); Option<Integer> result1 = n1.bind(f1);
Option<Integer> result2 = n2.bind(f1); Option<Integer> result2 = n2.bind(f1);
Show.optionShow(Show.intShow).println(result1); Show.optionShow(Show.intShow).println(result1);
Show.optionShow(Show.intShow).println(result2); Show.optionShow(Show.intShow).println(result2);
} }
} }

View File

@ -1,71 +1,71 @@
package com.baeldung.reflections; package com.baeldung.reflections;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.Date; import java.util.Date;
import java.util.Set; import java.util.Set;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.reflections.Reflections; import org.reflections.Reflections;
import org.reflections.scanners.MethodAnnotationsScanner; import org.reflections.scanners.MethodAnnotationsScanner;
import org.reflections.scanners.MethodParameterScanner; import org.reflections.scanners.MethodParameterScanner;
import org.reflections.scanners.ResourcesScanner; import org.reflections.scanners.ResourcesScanner;
import org.reflections.scanners.Scanner; import org.reflections.scanners.Scanner;
import org.reflections.scanners.SubTypesScanner; import org.reflections.scanners.SubTypesScanner;
import org.reflections.util.ClasspathHelper; import org.reflections.util.ClasspathHelper;
import org.reflections.util.ConfigurationBuilder; import org.reflections.util.ConfigurationBuilder;
public class ReflectionsApp { public class ReflectionsApp {
public Set<Class<? extends Scanner>> getReflectionsSubTypes() { public Set<Class<? extends Scanner>> getReflectionsSubTypes() {
Reflections reflections = new Reflections("org.reflections"); Reflections reflections = new Reflections("org.reflections");
Set<Class<? extends Scanner>> scannersSet = reflections.getSubTypesOf(Scanner.class); Set<Class<? extends Scanner>> scannersSet = reflections.getSubTypesOf(Scanner.class);
return scannersSet; return scannersSet;
} }
public Set<Class<?>> getJDKFunctinalInterfaces() { public Set<Class<?>> getJDKFunctinalInterfaces() {
Reflections reflections = new Reflections("java.util.function"); Reflections reflections = new Reflections("java.util.function");
Set<Class<?>> typesSet = reflections.getTypesAnnotatedWith(FunctionalInterface.class); Set<Class<?>> typesSet = reflections.getTypesAnnotatedWith(FunctionalInterface.class);
return typesSet; return typesSet;
} }
public Set<Method> getDateDeprecatedMethods() { public Set<Method> getDateDeprecatedMethods() {
Reflections reflections = new Reflections(java.util.Date.class, new MethodAnnotationsScanner()); Reflections reflections = new Reflections(java.util.Date.class, new MethodAnnotationsScanner());
Set<Method> deprecatedMethodsSet = reflections.getMethodsAnnotatedWith(Deprecated.class); Set<Method> deprecatedMethodsSet = reflections.getMethodsAnnotatedWith(Deprecated.class);
return deprecatedMethodsSet; return deprecatedMethodsSet;
} }
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
public Set<Constructor> getDateDeprecatedConstructors() { public Set<Constructor> getDateDeprecatedConstructors() {
Reflections reflections = new Reflections(java.util.Date.class, new MethodAnnotationsScanner()); Reflections reflections = new Reflections(java.util.Date.class, new MethodAnnotationsScanner());
Set<Constructor> constructorsSet = reflections.getConstructorsAnnotatedWith(Deprecated.class); Set<Constructor> constructorsSet = reflections.getConstructorsAnnotatedWith(Deprecated.class);
return constructorsSet; return constructorsSet;
} }
public Set<Method> getMethodsWithDateParam() { public Set<Method> getMethodsWithDateParam() {
Reflections reflections = new Reflections(java.text.SimpleDateFormat.class, new MethodParameterScanner()); Reflections reflections = new Reflections(java.text.SimpleDateFormat.class, new MethodParameterScanner());
Set<Method> methodsSet = reflections.getMethodsMatchParams(Date.class); Set<Method> methodsSet = reflections.getMethodsMatchParams(Date.class);
return methodsSet; return methodsSet;
} }
public Set<Method> getMethodsWithVoidReturn() { public Set<Method> getMethodsWithVoidReturn() {
Reflections reflections = new Reflections(java.text.SimpleDateFormat.class, new MethodParameterScanner()); Reflections reflections = new Reflections(java.text.SimpleDateFormat.class, new MethodParameterScanner());
Set<Method> methodsSet = reflections.getMethodsReturn(void.class); Set<Method> methodsSet = reflections.getMethodsReturn(void.class);
return methodsSet; return methodsSet;
} }
public Set<String> getPomXmlPaths() { public Set<String> getPomXmlPaths() {
Reflections reflections = new Reflections(new ResourcesScanner()); Reflections reflections = new Reflections(new ResourcesScanner());
Set<String> resourcesSet = reflections.getResources(Pattern.compile(".*pom\\.xml")); Set<String> resourcesSet = reflections.getResources(Pattern.compile(".*pom\\.xml"));
return resourcesSet; return resourcesSet;
} }
public Set<Class<? extends Scanner>> getReflectionsSubTypesUsingBuilder() { public Set<Class<? extends Scanner>> getReflectionsSubTypesUsingBuilder() {
Reflections reflections = new Reflections(new ConfigurationBuilder().setUrls(ClasspathHelper.forPackage("org.reflections")) Reflections reflections = new Reflections(new ConfigurationBuilder().setUrls(ClasspathHelper.forPackage("org.reflections"))
.setScanners(new SubTypesScanner())); .setScanners(new SubTypesScanner()));
Set<Class<? extends Scanner>> scannersSet = reflections.getSubTypesOf(Scanner.class); Set<Class<? extends Scanner>> scannersSet = reflections.getSubTypesOf(Scanner.class);
return scannersSet; return scannersSet;
} }
} }

View File

@ -4,6 +4,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import fj.F; import fj.F;
@ -96,9 +97,9 @@ public class FunctionalJavaUnitTest {
Option<Integer> result2 = n2.bind(function); Option<Integer> result2 = n2.bind(function);
Option<Integer> result3 = n3.bind(function); Option<Integer> result3 = n3.bind(function);
assertEquals(Option.none(), result1); Assert.assertEquals(Option.none(), result1);
assertEquals(Option.some(102), result2); Assert.assertEquals(Option.some(102), result2);
assertEquals(Option.none(), result3); Assert.assertEquals(Option.none(), result3);
} }
@Test @Test

View File

@ -1,50 +1,50 @@
package com.baeldung.reflections; package com.baeldung.reflections;
import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertFalse;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
public class ReflectionsUnitTest { public class ReflectionsUnitTest {
@Test @Test
public void givenTypeThenGetAllSubTypes() { public void givenTypeThenGetAllSubTypes() {
ReflectionsApp reflectionsApp = new ReflectionsApp(); ReflectionsApp reflectionsApp = new ReflectionsApp();
assertFalse(reflectionsApp.getReflectionsSubTypes() assertFalse(reflectionsApp.getReflectionsSubTypes()
.isEmpty()); .isEmpty());
} }
@Test @Test
public void givenTypeAndUsingBuilderThenGetAllSubTypes() { public void givenTypeAndUsingBuilderThenGetAllSubTypes() {
ReflectionsApp reflectionsApp = new ReflectionsApp(); ReflectionsApp reflectionsApp = new ReflectionsApp();
assertFalse(reflectionsApp.getReflectionsSubTypesUsingBuilder() assertFalse(reflectionsApp.getReflectionsSubTypesUsingBuilder()
.isEmpty()); .isEmpty());
} }
@Test @Test
public void givenAnnotationThenGetAllAnnotatedMethods() { public void givenAnnotationThenGetAllAnnotatedMethods() {
ReflectionsApp reflectionsApp = new ReflectionsApp(); ReflectionsApp reflectionsApp = new ReflectionsApp();
assertFalse(reflectionsApp.getDateDeprecatedMethods() assertFalse(reflectionsApp.getDateDeprecatedMethods()
.isEmpty()); .isEmpty());
} }
@Test @Test
public void givenAnnotationThenGetAllAnnotatedConstructors() { public void givenAnnotationThenGetAllAnnotatedConstructors() {
ReflectionsApp reflectionsApp = new ReflectionsApp(); ReflectionsApp reflectionsApp = new ReflectionsApp();
assertFalse(reflectionsApp.getDateDeprecatedConstructors() assertFalse(reflectionsApp.getDateDeprecatedConstructors()
.isEmpty()); .isEmpty());
} }
@Test @Test
public void givenParamTypeThenGetAllMethods() { public void givenParamTypeThenGetAllMethods() {
ReflectionsApp reflectionsApp = new ReflectionsApp(); ReflectionsApp reflectionsApp = new ReflectionsApp();
assertFalse(reflectionsApp.getMethodsWithDateParam() assertFalse(reflectionsApp.getMethodsWithDateParam()
.isEmpty()); .isEmpty());
} }
@Test @Test
public void givenReturnTypeThenGetAllMethods() { public void givenReturnTypeThenGetAllMethods() {
ReflectionsApp reflectionsApp = new ReflectionsApp(); ReflectionsApp reflectionsApp = new ReflectionsApp();
assertFalse(reflectionsApp.getMethodsWithVoidReturn() assertFalse(reflectionsApp.getMethodsWithVoidReturn()
.isEmpty()); .isEmpty());
} }
} }

View File

@ -1,4 +1,4 @@
package com.baeldung.resilience4j; package com.baeldung.resilence4j;
import io.github.resilience4j.bulkhead.Bulkhead; import io.github.resilience4j.bulkhead.Bulkhead;
import io.github.resilience4j.bulkhead.BulkheadConfig; import io.github.resilience4j.bulkhead.BulkheadConfig;

View File

@ -12,18 +12,18 @@
</parent> </parent>
<dependencies> <dependencies>
<!-- https://mvnrepository.com/artifact/com.typesafe.akka/akka-actor --> <!-- &lt;!&ndash; https://mvnrepository.com/artifact/com.typesafe.akka/akka-actor &ndash;&gt;-->
<dependency> <!-- <dependency>-->
<groupId>com.typesafe.akka</groupId> <!-- <groupId>com.typesafe.akka</groupId>-->
<artifactId>akka-actor_2.12</artifactId> <!-- <artifactId>akka-actor_2.12</artifactId>-->
<version>${typesafe-akka.version}</version> <!-- <version>${typesafe-akka.version}</version>-->
</dependency> <!-- </dependency>-->
<dependency> <!-- <dependency>-->
<groupId>com.typesafe.akka</groupId> <!-- <groupId>com.typesafe.akka</groupId>-->
<artifactId>akka-testkit_2.12</artifactId> <!-- <artifactId>akka-testkit_2.12</artifactId>-->
<version>${typesafe-akka.version}</version> <!-- <version>${typesafe-akka.version}</version>-->
<scope>test</scope> <!-- <scope>test</scope>-->
</dependency> <!-- </dependency>-->
<!-- https://mvnrepository.com/artifact/org.beykery/neuroph/2.92 --> <!-- https://mvnrepository.com/artifact/org.beykery/neuroph/2.92 -->
<dependency> <dependency>
<groupId>org.beykery</groupId> <groupId>org.beykery</groupId>
@ -36,16 +36,16 @@
<artifactId>cglib</artifactId> <artifactId>cglib</artifactId>
<version>${cglib.version}</version> <version>${cglib.version}</version>
</dependency> </dependency>
<dependency> <!-- <dependency>-->
<groupId>org.apache.commons</groupId> <!-- <groupId>org.apache.commons</groupId>-->
<artifactId>commons-lang3</artifactId> <!-- <artifactId>commons-lang3</artifactId>-->
<version>${commons-lang3.version}</version> <!-- <version>${commons-lang3.version}</version>-->
</dependency> <!-- </dependency>-->
<dependency> <!-- <dependency>-->
<groupId>commons-net</groupId> <!-- <groupId>commons-net</groupId>-->
<artifactId>commons-net</artifactId> <!-- <artifactId>commons-net</artifactId>-->
<version>${commons-net.version}</version> <!-- <version>${commons-net.version}</version>-->
</dependency> <!-- </dependency>-->
<dependency> <dependency>
<groupId>org.javatuples</groupId> <groupId>org.javatuples</groupId>
@ -64,11 +64,11 @@
<version>${javers.version}</version> <version>${javers.version}</version>
</dependency> </dependency>
<dependency> <!-- <dependency>-->
<groupId>io.nats</groupId> <!-- <groupId>io.nats</groupId>-->
<artifactId>jnats</artifactId> <!-- <artifactId>jnats</artifactId>-->
<version>${jnats.version}</version> <!-- <version>${jnats.version}</version>-->
</dependency> <!-- </dependency>-->
<!-- <dependency>--> <!-- <dependency>-->
<!-- <groupId>rome</groupId>--> <!-- <groupId>rome</groupId>-->
@ -228,11 +228,11 @@
<artifactId>jool</artifactId> <artifactId>jool</artifactId>
<version>${jool.version}</version> <version>${jool.version}</version>
</dependency> </dependency>
<dependency> <!-- <dependency>-->
<groupId>org.openjdk.jmh</groupId> <!-- <groupId>org.openjdk.jmh</groupId>-->
<artifactId>jmh-core</artifactId> <!-- <artifactId>jmh-core</artifactId>-->
<version>${jmh.version}</version> <!-- <version>${jmh.version}</version>-->
</dependency> <!-- </dependency>-->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
@ -244,18 +244,18 @@
<artifactId>java-lsh</artifactId> <artifactId>java-lsh</artifactId>
<version>${java-lsh.version}</version> <version>${java-lsh.version}</version>
</dependency> </dependency>
<dependency> <!-- <dependency>-->
<groupId>au.com.dius</groupId> <!-- <groupId>au.com.dius</groupId>-->
<artifactId>pact-jvm-consumer-junit_2.11</artifactId> <!-- <artifactId>pact-jvm-consumer-junit_2.11</artifactId>-->
<version>${pact.version}</version> <!-- <version>${pact.version}</version>-->
<scope>test</scope> <!-- <scope>test</scope>-->
<exclusions> <!-- <exclusions>-->
<exclusion> <!-- <exclusion>-->
<groupId>org.codehaus.groovy</groupId> <!-- <groupId>org.codehaus.groovy</groupId>-->
<artifactId>groovy-all</artifactId> <!-- <artifactId>groovy-all</artifactId>-->
</exclusion> <!-- </exclusion>-->
</exclusions> <!-- </exclusions>-->
</dependency> <!-- </dependency>-->
<!-- <dependency>--> <!-- <dependency>-->
<!-- <groupId>org.awaitility</groupId>--> <!-- <groupId>org.awaitility</groupId>-->
<!-- <artifactId>awaitility</artifactId>--> <!-- <artifactId>awaitility</artifactId>-->
@ -274,16 +274,16 @@
<version>${org.hamcrest.java-hamcrest.version}</version> <version>${org.hamcrest.java-hamcrest.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <!-- <dependency>-->
<groupId>net.bytebuddy</groupId> <!-- <groupId>net.bytebuddy</groupId>-->
<artifactId>byte-buddy</artifactId> <!-- <artifactId>byte-buddy</artifactId>-->
<version>${bytebuddy.version}</version> <!-- <version>${bytebuddy.version}</version>-->
</dependency> <!-- </dependency>-->
<dependency> <!-- <dependency>-->
<groupId>net.bytebuddy</groupId> <!-- <groupId>net.bytebuddy</groupId>-->
<artifactId>byte-buddy-agent</artifactId> <!-- <artifactId>byte-buddy-agent</artifactId>-->
<version>${bytebuddy.version}</version> <!-- <version>${bytebuddy.version}</version>-->
</dependency> <!-- </dependency>-->
<!-- <dependency>--> <!-- <dependency>-->
<!-- <groupId>org.pcollections</groupId>--> <!-- <groupId>org.pcollections</groupId>-->
<!-- <artifactId>pcollections</artifactId>--> <!-- <artifactId>pcollections</artifactId>-->
@ -320,43 +320,43 @@
<!-- <artifactId>jdeferred-core</artifactId>--> <!-- <artifactId>jdeferred-core</artifactId>-->
<!-- <version>${jdeferred.version}</version>--> <!-- <version>${jdeferred.version}</version>-->
<!-- </dependency>--> <!-- </dependency>-->
<dependency> <!-- <dependency>-->
<groupId>com.codepoetics</groupId> <!-- <groupId>com.codepoetics</groupId>-->
<artifactId>protonpack</artifactId> <!-- <artifactId>protonpack</artifactId>-->
<version>${protonpack.version}</version> <!-- <version>${protonpack.version}</version>-->
</dependency> <!-- </dependency>-->
<dependency> <!-- <dependency>-->
<groupId>org.functionaljava</groupId> <!-- <groupId>org.functionaljava</groupId>-->
<artifactId>functionaljava-java8</artifactId> <!-- <artifactId>functionaljava-java8</artifactId>-->
<version>${functionaljava.version}</version> <!-- <version>${functionaljava.version}</version>-->
</dependency> <!-- </dependency>-->
<dependency> <!-- <dependency>-->
<groupId>com.github.ben-manes.caffeine</groupId> <!-- <groupId>com.github.ben-manes.caffeine</groupId>-->
<artifactId>caffeine</artifactId> <!-- <artifactId>caffeine</artifactId>-->
<version>${caffeine.version}</version> <!-- <version>${caffeine.version}</version>-->
</dependency> <!-- </dependency>-->
<!--Java Docker API Client --> <!-- &lt;!&ndash;Java Docker API Client &ndash;&gt;-->
<dependency> <!-- <dependency>-->
<groupId>com.github.docker-java</groupId> <!-- <groupId>com.github.docker-java</groupId>-->
<artifactId>docker-java</artifactId> <!-- <artifactId>docker-java</artifactId>-->
<version>${docker.version}</version> <!-- <version>${docker.version}</version>-->
<exclusions> <!-- <exclusions>-->
<exclusion> <!-- <exclusion>-->
<groupId>org.slf4j</groupId> <!-- <groupId>org.slf4j</groupId>-->
<artifactId>slf4j-log4j12</artifactId> <!-- <artifactId>slf4j-log4j12</artifactId>-->
</exclusion> <!-- </exclusion>-->
<exclusion> <!-- <exclusion>-->
<groupId>org.slf4j</groupId> <!-- <groupId>org.slf4j</groupId>-->
<artifactId>jcl-over-slf4j</artifactId> <!-- <artifactId>jcl-over-slf4j</artifactId>-->
</exclusion> <!-- </exclusion>-->
<exclusion> <!-- <exclusion>-->
<groupId>ch.qos.logback</groupId> <!-- <groupId>ch.qos.logback</groupId>-->
<artifactId>logback-classic</artifactId> <!-- <artifactId>logback-classic</artifactId>-->
</exclusion> <!-- </exclusion>-->
</exclusions> <!-- </exclusions>-->
</dependency> <!-- </dependency>-->
<!--Java Docker API Client --> <!-- &lt;!&ndash;Java Docker API Client &ndash;&gt;-->
<!-- google api --> <!-- google api -->
<dependency> <dependency>
@ -364,58 +364,58 @@
<artifactId>google-oauth-client-jetty</artifactId> <artifactId>google-oauth-client-jetty</artifactId>
<version>${google-api.version}</version> <version>${google-api.version}</version>
</dependency> </dependency>
<dependency> <!-- <dependency>-->
<groupId>org.apache.kafka</groupId> <!-- <groupId>org.apache.kafka</groupId>-->
<artifactId>kafka-streams</artifactId> <!-- <artifactId>kafka-streams</artifactId>-->
<version>${kafka.version}</version> <!-- <version>${kafka.version}</version>-->
</dependency> <!-- </dependency>-->
<dependency> <!-- <dependency>-->
<groupId>org.apache.kafka</groupId> <!-- <groupId>org.apache.kafka</groupId>-->
<artifactId>kafka-clients</artifactId> <!-- <artifactId>kafka-clients</artifactId>-->
<version>${kafka.version}</version> <!-- <version>${kafka.version}</version>-->
<classifier>test</classifier> <!-- <classifier>test</classifier>-->
<scope>test</scope> <!-- <scope>test</scope>-->
</dependency> <!-- </dependency>-->
<!-- Atlassian Fugue --> <!-- &lt;!&ndash; Atlassian Fugue &ndash;&gt;-->
<dependency> <!-- <dependency>-->
<groupId>io.atlassian.fugue</groupId> <!-- <groupId>io.atlassian.fugue</groupId>-->
<artifactId>fugue</artifactId> <!-- <artifactId>fugue</artifactId>-->
<version>${fugue.version}</version> <!-- <version>${fugue.version}</version>-->
</dependency> <!-- </dependency>-->
<dependency> <!-- <dependency>-->
<groupId>org.jctools</groupId> <!-- <groupId>org.jctools</groupId>-->
<artifactId>jctools-core</artifactId> <!-- <artifactId>jctools-core</artifactId>-->
<version>${jctools.version}</version> <!-- <version>${jctools.version}</version>-->
</dependency> <!-- </dependency>-->
<!-- resilience4j --> <!-- resilience4j -->
<dependency> <!-- <dependency>-->
<groupId>io.github.resilience4j</groupId> <!-- <groupId>io.github.resilience4j</groupId>-->
<artifactId>resilience4j-circuitbreaker</artifactId> <!-- <artifactId>resilience4j-circuitbreaker</artifactId>-->
<version>${resilience4j.version}</version> <!-- <version>${resilience4j.version}</version>-->
</dependency> <!-- </dependency>-->
<dependency> <!-- <dependency>-->
<groupId>io.github.resilience4j</groupId> <!-- <groupId>io.github.resilience4j</groupId>-->
<artifactId>resilience4j-bulkhead</artifactId> <!-- <artifactId>resilience4j-bulkhead</artifactId>-->
<version>${resilience4j.version}</version> <!-- <version>${resilience4j.version}</version>-->
</dependency> <!-- </dependency>-->
<dependency> <!-- <dependency>-->
<groupId>io.github.resilience4j</groupId> <!-- <groupId>io.github.resilience4j</groupId>-->
<artifactId>resilience4j-retry</artifactId> <!-- <artifactId>resilience4j-retry</artifactId>-->
<version>${resilience4j.version}</version> <!-- <version>${resilience4j.version}</version>-->
</dependency> <!-- </dependency>-->
<dependency> <!-- <dependency>-->
<groupId>io.github.resilience4j</groupId> <!-- <groupId>io.github.resilience4j</groupId>-->
<artifactId>resilience4j-timelimiter</artifactId> <!-- <artifactId>resilience4j-timelimiter</artifactId>-->
<version>${resilience4j.version}</version> <!-- <version>${resilience4j.version}</version>-->
</dependency> <!-- </dependency>-->
<dependency> <!-- <dependency>-->
<groupId>com.squareup</groupId> <!-- <groupId>com.squareup</groupId>-->
<artifactId>javapoet</artifactId> <!-- <artifactId>javapoet</artifactId>-->
<version>${javapoet.version}</version> <!-- <version>${javapoet.version}</version>-->
</dependency> <!-- </dependency>-->
<dependency> <dependency>
<groupId>org.hamcrest</groupId> <groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId> <artifactId>hamcrest-all</artifactId>
@ -423,18 +423,18 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <!-- <dependency>-->
<groupId>org.mockftpserver</groupId> <!-- <groupId>org.mockftpserver</groupId>-->
<artifactId>MockFtpServer</artifactId> <!-- <artifactId>MockFtpServer</artifactId>-->
<version>${mockftpserver.version}</version> <!-- <version>${mockftpserver.version}</version>-->
<scope>test</scope> <!-- <scope>test</scope>-->
</dependency> <!-- </dependency>-->
<!-- Reflections --> <!-- &lt;!&ndash; Reflections &ndash;&gt;-->
<dependency> <!-- <dependency>-->
<groupId>org.reflections</groupId> <!-- <groupId>org.reflections</groupId>-->
<artifactId>reflections</artifactId> <!-- <artifactId>reflections</artifactId>-->
<version>${reflections.version}</version> <!-- <version>${reflections.version}</version>-->
</dependency> <!-- </dependency>-->
</dependencies> </dependencies>
<repositories> <repositories>
@ -562,7 +562,7 @@
<javatuples.version>1.2</javatuples.version> <javatuples.version>1.2</javatuples.version>
<assertj.version>3.6.2</assertj.version> <assertj.version>3.6.2</assertj.version>
<javers.version>3.1.0</javers.version> <javers.version>3.1.0</javers.version>
<jnats.version>1.0</jnats.version> <!-- <jnats.version>1.0</jnats.version>-->
<neuroph.version>2.92</neuroph.version> <neuroph.version>2.92</neuroph.version>
<serenity.version>1.9.26</serenity.version> <serenity.version>1.9.26</serenity.version>
@ -574,24 +574,24 @@
<pact.version>3.5.0</pact.version> <pact.version>3.5.0</pact.version>
<!-- <awaitility.version>3.0.0</awaitility.version>--> <!-- <awaitility.version>3.0.0</awaitility.version>-->
<org.hamcrest.java-hamcrest.version>2.0.0.0</org.hamcrest.java-hamcrest.version> <org.hamcrest.java-hamcrest.version>2.0.0.0</org.hamcrest.java-hamcrest.version>
<bytebuddy.version>1.7.1</bytebuddy.version> <!-- <bytebuddy.version>1.7.1</bytebuddy.version>-->
<!-- <pcollections.version>2.1.2</pcollections.version>--> <!-- <pcollections.version>2.1.2</pcollections.version>-->
<!-- <rome.version>1.0</rome.version>--> <!-- <rome.version>1.0</rome.version>-->
<!-- <eclipse-collections.version>8.2.0</eclipse-collections.version>--> <!-- <eclipse-collections.version>8.2.0</eclipse-collections.version>-->
<!-- <streamex.version>0.6.5</streamex.version>--> <!-- <streamex.version>0.6.5</streamex.version>-->
<!-- <vavr.version>0.9.0</vavr.version>--> <!-- <vavr.version>0.9.0</vavr.version>-->
<protonpack.version>1.15</protonpack.version> <!-- <protonpack.version>1.15</protonpack.version>-->
<caffeine.version>2.5.5</caffeine.version> <!-- <caffeine.version>2.5.5</caffeine.version>-->
<google-api.version>1.23.0</google-api.version> <google-api.version>1.23.0</google-api.version>
<kafka.version>2.0.0</kafka.version> <!-- <kafka.version>2.0.0</kafka.version>-->
<docker.version>3.0.14</docker.version> <!-- <docker.version>3.0.14</docker.version>-->
<jets3t-version>0.9.4.0006L</jets3t-version> <jets3t-version>0.9.4.0006L</jets3t-version>
<jctools.version>2.1.2</jctools.version> <!-- <jctools.version>2.1.2</jctools.version>-->
<typesafe-akka.version>2.5.11</typesafe-akka.version> <!-- <typesafe-akka.version>2.5.11</typesafe-akka.version>-->
<resilience4j.version>0.12.1</resilience4j.version> <!-- <resilience4j.version>0.12.1</resilience4j.version>-->
<javapoet.version>1.10.0</javapoet.version> <!-- <javapoet.version>1.10.0</javapoet.version>-->
<hamcrest-all.version>1.3</hamcrest-all.version> <hamcrest-all.version>1.3</hamcrest-all.version>
<javax.jdo.version>3.2.0-m7</javax.jdo.version> <javax.jdo.version>3.2.0-m7</javax.jdo.version>
<datanucleus.version>5.1.1</datanucleus.version> <datanucleus.version>5.1.1</datanucleus.version>
@ -603,17 +603,17 @@
<spring-mock-mvc.version>3.0.3</spring-mock-mvc.version> <spring-mock-mvc.version>3.0.3</spring-mock-mvc.version>
<quartz.version>2.3.0</quartz.version> <quartz.version>2.3.0</quartz.version>
<jool.version>0.9.12</jool.version> <jool.version>0.9.12</jool.version>
<jmh.version>1.19</jmh.version> <!-- <jmh.version>1.19</jmh.version>-->
<!-- <noexception.version>1.1.0</noexception.version>--> <!-- <noexception.version>1.1.0</noexception.version>-->
<!-- <yarg.version>2.0.4</yarg.version>--> <!-- <yarg.version>2.0.4</yarg.version>-->
<!-- <mbassador.version>1.3.1</mbassador.version>--> <!-- <mbassador.version>1.3.1</mbassador.version>-->
<!-- <jdeferred.version>1.2.6</jdeferred.version>--> <!-- <jdeferred.version>1.2.6</jdeferred.version>-->
<functionaljava.version>4.8.1</functionaljava.version> <!-- <functionaljava.version>4.8.1</functionaljava.version>-->
<fugue.version>4.5.1</fugue.version> <!-- <fugue.version>4.5.1</fugue.version>-->
<maven-jar-plugin.version>3.0.2</maven-jar-plugin.version> <maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
<mockftpserver.version>2.7.1</mockftpserver.version> <!-- <mockftpserver.version>2.7.1</mockftpserver.version>-->
<commons-net.version>3.6</commons-net.version> <!-- <commons-net.version>3.6</commons-net.version>-->
<reflections.version>0.9.11</reflections.version> <!-- <reflections.version>0.9.11</reflections.version>-->
</properties> </properties>
</project> </project>