Merge branch 'eugenp:master' into JAVA-18149
This commit is contained in:
commit
2be0236bcc
|
@ -118,11 +118,6 @@
|
|||
<artifactId>curator-recipes</artifactId>
|
||||
<version>${curator.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.zookeeper</groupId>
|
||||
<artifactId>zookeeper</artifactId>
|
||||
<version>${zookeeper.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
|
@ -191,10 +186,8 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<avro.version>1.8.2</avro.version>
|
||||
<beam.version>2.19.0</beam.version>
|
||||
<beam.version>2.45.0</beam.version>
|
||||
<bval.version>1.1.2</bval.version>
|
||||
<javax.validation.validation-api.version>1.1.0.Final</javax.validation.validation-api.version>
|
||||
<meecrowave-junit.version>1.2.0</meecrowave-junit.version>
|
||||
|
|
|
@ -14,4 +14,4 @@ This module contains articles about core Groovy concepts
|
|||
- [A Quick Guide to Working with Web Services in Groovy](https://www.baeldung.com/groovy-web-services)
|
||||
- [Categories in Groovy](https://www.baeldung.com/groovy-categories)
|
||||
- [How to Determine the Data Type in Groovy](https://www.baeldung.com/groovy-determine-data-type)
|
||||
- [[<-- Prev]](/core-groovy)
|
||||
- [[<-- Prev]](/core-groovy-modules/core-groovy)
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-eclipse-batch</artifactId>
|
||||
<version>${groovy.version}-01</version>
|
||||
<version>${groovy-eclipse-batch.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
@ -163,9 +163,10 @@
|
|||
|
||||
<properties>
|
||||
<groovy-wslite.version>1.1.3</groovy-wslite.version>
|
||||
<assembly.plugin.version>3.1.0</assembly.plugin.version>
|
||||
<compiler.plugin.version>3.8.0</compiler.plugin.version>
|
||||
<groovy.compiler.version>3.3.0-01</groovy.compiler.version>
|
||||
<assembly.plugin.version>3.4.2</assembly.plugin.version>
|
||||
<compiler.plugin.version>3.8.1</compiler.plugin.version>
|
||||
<groovy.compiler.version>3.7.0</groovy.compiler.version>
|
||||
<groovy-eclipse-batch.version>3.0.8-01</groovy-eclipse-batch.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -21,12 +21,12 @@
|
|||
</modules>
|
||||
|
||||
<properties>
|
||||
<groovy.version>3.0.8</groovy.version>
|
||||
<groovy-all.version>3.0.8</groovy-all.version>
|
||||
<groovy-sql.version>3.0.8</groovy-sql.version>
|
||||
<hsqldb.version>2.4.0</hsqldb.version>
|
||||
<groovy.version>3.0.15</groovy.version>
|
||||
<groovy-all.version>3.0.15</groovy-all.version>
|
||||
<groovy-sql.version>3.0.15</groovy-sql.version>
|
||||
<hsqldb.version>2.7.1</hsqldb.version>
|
||||
<spock-core.version>2.3-groovy-3.0</spock-core.version>
|
||||
<gmavenplus-plugin.version>1.6</gmavenplus-plugin.version>
|
||||
<gmavenplus-plugin.version>2.1.0</gmavenplus-plugin.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -17,7 +17,7 @@ public class ClassWithSuppressWarningsNames implements Serializable {
|
|||
list.add(Integer.valueOf(value));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecated")
|
||||
@SuppressWarnings("deprecation")
|
||||
void suppressDeprecatedWarning() {
|
||||
ClassWithSuppressWarningsNames cls = new ClassWithSuppressWarningsNames();
|
||||
cls.deprecatedMethod(); // no warning here
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
=========
|
||||
|
||||
## Core Java Collections Cookbooks and Examples
|
||||
|
||||
### Relevant Articles:
|
||||
|
||||
- More articles: [[<-- prev]](/core-java-modules/core-java-collections-4)
|
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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>
|
||||
<artifactId>core-java-collections-5</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>core-java-collections-5</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung.core-java-modules</groupId>
|
||||
<artifactId>core-java-modules</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.junit.platform</groupId>
|
||||
<artifactId>junit-platform-runner</artifactId>
|
||||
<version>${junit-platform.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.vintage</groupId>
|
||||
<artifactId>junit-vintage-engine</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.roaringbitmap</groupId>
|
||||
<artifactId>RoaringBitmap</artifactId>
|
||||
<version>${roaringbitmap.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${jmh.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<junit.version>5.9.2</junit.version>
|
||||
<roaringbitmap.version>0.9.38</roaringbitmap.version>
|
||||
<jmh.version>1.36</jmh.version>
|
||||
</properties>
|
||||
</project>
|
|
@ -0,0 +1,82 @@
|
|||
package com.baeldung.roaringbitmap;
|
||||
|
||||
import java.util.BitSet;
|
||||
|
||||
import org.openjdk.jmh.annotations.Benchmark;
|
||||
import org.openjdk.jmh.annotations.Scope;
|
||||
import org.openjdk.jmh.annotations.Setup;
|
||||
import org.openjdk.jmh.annotations.State;
|
||||
import org.roaringbitmap.RoaringBitmap;
|
||||
|
||||
@State(Scope.Thread)
|
||||
public class BitSetsBenchmark {
|
||||
private RoaringBitmap rb1;
|
||||
private BitSet bs1;
|
||||
private RoaringBitmap rb2;
|
||||
private BitSet bs2;
|
||||
private final static int SIZE = 10_000_000;
|
||||
|
||||
@Setup
|
||||
public void setup() {
|
||||
rb1 = new RoaringBitmap();
|
||||
bs1 = new BitSet(SIZE);
|
||||
rb2 = new RoaringBitmap();
|
||||
bs2 = new BitSet(SIZE);
|
||||
for (int i = 0; i < SIZE / 2; i++) {
|
||||
rb1.add(i);
|
||||
bs1.set(i);
|
||||
}
|
||||
for (int i = SIZE / 2; i < SIZE; i++) {
|
||||
rb2.add(i);
|
||||
bs2.set(i);
|
||||
}
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public RoaringBitmap roaringBitmapUnion() {
|
||||
return RoaringBitmap.or(rb1, rb2);
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public BitSet bitSetUnion() {
|
||||
BitSet result = (BitSet) bs1.clone();
|
||||
result.or(bs2);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public RoaringBitmap roaringBitmapIntersection() {
|
||||
return RoaringBitmap.and(rb1, rb2);
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public BitSet bitSetIntersection() {
|
||||
BitSet result = (BitSet) bs1.clone();
|
||||
result.and(bs2);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public RoaringBitmap roaringBitmapDifference() {
|
||||
return RoaringBitmap.andNot(rb1, rb2);
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public BitSet bitSetDifference() {
|
||||
BitSet result = (BitSet) bs1.clone();
|
||||
result.andNot(bs2);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public RoaringBitmap roaringBitmapXOR() {
|
||||
return RoaringBitmap.xor(rb1, rb2);
|
||||
}
|
||||
|
||||
@Benchmark
|
||||
public BitSet bitSetXOR() {
|
||||
BitSet result = (BitSet) bs1.clone();
|
||||
result.xor(bs2);
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.baeldung.roaringbitmap;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class BitSetsBenchmarkRunner {
|
||||
public static void main(String... args) throws IOException {
|
||||
org.openjdk.jmh.Main.main(args);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.baeldung.roaringbitmap;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.roaringbitmap.RoaringBitmap;
|
||||
|
||||
class RoaringBitmapBenchmarkUnitTest {
|
||||
@Test
|
||||
public void givenTwoRoaringBitmap_whenUsingOr_thenWillGetSetsUnion() {
|
||||
RoaringBitmap expected = RoaringBitmap.bitmapOf(1, 2, 3, 4, 5, 6, 7, 8);
|
||||
RoaringBitmap A = RoaringBitmap.bitmapOf(1, 2, 3, 4, 5);
|
||||
RoaringBitmap B = RoaringBitmap.bitmapOf(4, 5, 6, 7, 8);
|
||||
RoaringBitmap union = RoaringBitmap.or(A, B);
|
||||
assertEquals(expected, union);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenTwoRoaringBitmap_whenUsingAnd_thenWillGetSetsIntersection() {
|
||||
RoaringBitmap expected = RoaringBitmap.bitmapOf(4, 5);
|
||||
RoaringBitmap A = RoaringBitmap.bitmapOfRange(1, 6);
|
||||
RoaringBitmap B = RoaringBitmap.bitmapOf(4, 5, 6, 7, 8);
|
||||
RoaringBitmap intersection = RoaringBitmap.and(A, B);
|
||||
assertEquals(expected, intersection);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenTwoRoaringBitmap_whenUsingAndNot_thenWillGetSetsDifference() {
|
||||
RoaringBitmap expected = RoaringBitmap.bitmapOf(1, 2, 3);
|
||||
RoaringBitmap A = new RoaringBitmap();
|
||||
A.add(1L, 6L);
|
||||
RoaringBitmap B = RoaringBitmap.bitmapOf(4, 5, 6, 7, 8);
|
||||
RoaringBitmap difference = RoaringBitmap.andNot(A, B);
|
||||
assertEquals(expected, difference);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenTwoRoaringBitmap_whenUsingXOR_thenWillGetSetsSymmetricDifference() {
|
||||
RoaringBitmap expected = RoaringBitmap.bitmapOf(1, 2, 3, 6, 7, 8);
|
||||
RoaringBitmap A = RoaringBitmap.bitmapOfRange(1, 6);
|
||||
RoaringBitmap B = RoaringBitmap.bitmapOfRange(4, 9);
|
||||
RoaringBitmap xor = RoaringBitmap.xor(A, B);
|
||||
assertEquals(expected, xor);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package com.baeldung.listduplicate;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class ListDuplicate {
|
||||
public List<Integer> listDuplicateUsingSet(List<Integer> list) {
|
||||
List<Integer> duplicates = new ArrayList<>();
|
||||
Set<Integer> set = new HashSet<>();
|
||||
for (Integer i : list) {
|
||||
if (set.contains(i)) {
|
||||
duplicates.add(i);
|
||||
} else {
|
||||
set.add(i);
|
||||
}
|
||||
}
|
||||
return duplicates;
|
||||
}
|
||||
|
||||
public List<Integer> listDuplicateUsingMap(List<Integer> list) {
|
||||
List<Integer> duplicates = new ArrayList<>();
|
||||
Map<Integer, Integer> frequencyMap = new HashMap<>();
|
||||
for (Integer number : list) {
|
||||
frequencyMap.put(number, frequencyMap.getOrDefault(number, 0) + 1);
|
||||
}
|
||||
for (int number : frequencyMap.keySet()) {
|
||||
if (frequencyMap.get(number) != 1) {
|
||||
duplicates.add(number);
|
||||
}
|
||||
}
|
||||
return duplicates;
|
||||
}
|
||||
|
||||
public List<Integer> listDuplicateUsingFilterAndSetAdd(List<Integer> list) {
|
||||
Set<Integer> elements = new HashSet<Integer>();
|
||||
return list.stream()
|
||||
.filter(n -> !elements.add(n))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public List<Integer> listDuplicateUsingCollectionsFrequency(List<Integer> list) {
|
||||
List<Integer> duplicates = new ArrayList<>();
|
||||
Set<Integer> set = list.stream()
|
||||
.filter(i -> Collections.frequency(list, i) > 1)
|
||||
.collect(Collectors.toSet());
|
||||
duplicates.addAll(set);
|
||||
return duplicates;
|
||||
}
|
||||
|
||||
public List<Integer> listDuplicateUsingMapAndCollectorsGroupingBy(List<Integer> list) {
|
||||
List<Integer> duplicates = new ArrayList<>();
|
||||
Set<Integer> set = list.stream()
|
||||
.collect(Collectors.groupingBy(Function.identity(), Collectors.counting()))
|
||||
.entrySet()
|
||||
.stream()
|
||||
.filter(m -> m.getValue() > 1)
|
||||
.map(Map.Entry::getKey)
|
||||
.collect(Collectors.toSet());
|
||||
duplicates.addAll(set);
|
||||
return duplicates;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package com.baeldung.listduplicate;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ListDuplicateUnitTest {
|
||||
private static ListDuplicate listDuplicate;
|
||||
|
||||
@BeforeClass
|
||||
public static void setup() {
|
||||
listDuplicate = new ListDuplicate();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenList_whenUsingSet_thenReturnDuplicateElements() {
|
||||
List<Integer> list = Arrays.asList(1, 2, 3, 3, 4, 4, 5);
|
||||
List<Integer> duplicates = listDuplicate.listDuplicateUsingSet(list);
|
||||
Assert.assertEquals(duplicates.size(), 2);
|
||||
Assert.assertEquals(duplicates.contains(3), true);
|
||||
Assert.assertEquals(duplicates.contains(4), true);
|
||||
Assert.assertEquals(duplicates.contains(1), false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenList_whenUsingFrequencyMap_thenReturnDuplicateElements() {
|
||||
List<Integer> list = Arrays.asList(1, 2, 3, 3, 4, 4, 5);
|
||||
List<Integer> duplicates = listDuplicate.listDuplicateUsingMap(list);
|
||||
Assert.assertEquals(duplicates.size(), 2);
|
||||
Assert.assertEquals(duplicates.contains(3), true);
|
||||
Assert.assertEquals(duplicates.contains(4), true);
|
||||
Assert.assertEquals(duplicates.contains(1), false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenList_whenUsingFilterAndSetAdd_thenReturnDuplicateElements() {
|
||||
List<Integer> list = Arrays.asList(1, 2, 3, 3, 4, 4, 5);
|
||||
List<Integer> duplicates = listDuplicate.listDuplicateUsingFilterAndSetAdd(list);
|
||||
Assert.assertEquals(duplicates.size(), 2);
|
||||
Assert.assertEquals(duplicates.contains(3), true);
|
||||
Assert.assertEquals(duplicates.contains(4), true);
|
||||
Assert.assertEquals(duplicates.contains(1), false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenList_whenUsingCollectionsFrequency_thenReturnDuplicateElements() {
|
||||
List<Integer> list = Arrays.asList(1, 2, 3, 3, 4, 4, 5);
|
||||
List<Integer> duplicates = listDuplicate.listDuplicateUsingCollectionsFrequency(list);
|
||||
Assert.assertEquals(duplicates.size(), 2);
|
||||
Assert.assertEquals(duplicates.contains(3), true);
|
||||
Assert.assertEquals(duplicates.contains(4), true);
|
||||
Assert.assertEquals(duplicates.contains(1), false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenList_whenUsingMapAndCollectorsGroupingBy_thenReturnDuplicateElements() {
|
||||
List<Integer> list = Arrays.asList(1, 2, 3, 3, 4, 4, 5);
|
||||
List<Integer> duplicates = listDuplicate.listDuplicateUsingCollectionsFrequency(list);
|
||||
Assert.assertEquals(duplicates.size(), 2);
|
||||
Assert.assertEquals(duplicates.contains(3), true);
|
||||
Assert.assertEquals(duplicates.contains(4), true);
|
||||
Assert.assertEquals(duplicates.contains(1), false);
|
||||
}
|
||||
|
||||
}
|
|
@ -31,6 +31,7 @@
|
|||
<module>core-java-collections-2</module>
|
||||
<module>core-java-collections-3</module>
|
||||
<module>core-java-collections-4</module>
|
||||
<module>core-java-collections-5</module>
|
||||
<module>core-java-collections-conversions</module>
|
||||
<module>core-java-collections-conversions-2</module>
|
||||
<module>core-java-collections-set-2</module>
|
||||
|
|
|
@ -64,11 +64,16 @@
|
|||
<version>${commons-lang3.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<couchbase.client.version>2.5.0</couchbase.client.version>
|
||||
<spring-framework.version>4.3.5.RELEASE</spring-framework.version>
|
||||
<couchbase.client.version>2.7.2</couchbase.client.version>
|
||||
<spring-framework.version>5.3.25</spring-framework.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,53 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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>
|
||||
<artifactId>core-java-exclusions</artifactId>
|
||||
<version>0.0.0-SNAPSHOT</version>
|
||||
<name>core-java-exclusions</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung.dependency-exclusion</groupId>
|
||||
<artifactId>dependency-exclusion</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${surefire-version}</version>
|
||||
<configuration>
|
||||
<runOrder>alphabetical</runOrder>
|
||||
<threadCount>1</threadCount>
|
||||
<properties>
|
||||
<property>
|
||||
<name>junit</name>
|
||||
<value>false</value>
|
||||
</property>
|
||||
</properties>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<!-- Deactivate JUnit 4.7 engine by overriding it with an empty dummy -->
|
||||
<groupId>org.apache.maven.surefire</groupId>
|
||||
<artifactId>surefire-junit47</artifactId>
|
||||
<version>dummy</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,12 @@
|
|||
package com.sample.project.tests;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class ExcludeDirectDependencyUnitTest {
|
||||
@Test
|
||||
public void basicUnitTest() {
|
||||
assertTrue(true);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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>
|
||||
<groupId>org.apache.maven.surefire</groupId>
|
||||
<artifactId>surefire-junit47</artifactId>
|
||||
<version>dummy</version>
|
||||
</project>
|
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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>
|
||||
<groupId>com.baeldung.dependency-exclusion</groupId>
|
||||
<artifactId>dependency-exclusion</artifactId>
|
||||
<name>dependency-exclusion</name>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-java</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-java</relativePath>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<surefire-version>2.22.2</surefire-version>
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
<module>dummy-surefire-junit47</module>
|
||||
<module>core-java-exclusions</module>
|
||||
</modules>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.7.0</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<compilerArgs>
|
||||
<arg>-parameters</arg>
|
||||
</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${surefire-version}</version>
|
||||
<configuration>
|
||||
<threadCount>1</threadCount>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.surefire</groupId>
|
||||
<artifactId>surefire-junit-platform</artifactId>
|
||||
<version>${surefire-version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
</project>
|
|
@ -39,13 +39,6 @@
|
|||
<artifactId>gt-swing</artifactId>
|
||||
<version>${geotools-swing.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.locationtech.jts</groupId>
|
||||
<artifactId>jts-core</artifactId>
|
||||
<version>1.19.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
<version>${java-hamcrest.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<commons-csv.version>1.9.0</commons-csv.version>
|
||||
<commons-csv.version>1.10.0</commons-csv.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -1,9 +1,11 @@
|
|||
package com.baeldung.commons.io.csv;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.apache.commons.csv.CSVFormat;
|
||||
import org.apache.commons.csv.CSVPrinter;
|
||||
import org.apache.commons.csv.CSVRecord;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
|
@ -13,9 +15,7 @@ import java.util.Collections;
|
|||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class CSVReaderWriterUnitTest {
|
||||
class CSVReaderWriterUnitTest {
|
||||
|
||||
public static final Map<String, String> AUTHOR_BOOK_MAP = Collections.unmodifiableMap(new LinkedHashMap<String, String>() {
|
||||
{
|
||||
|
@ -24,12 +24,24 @@ public class CSVReaderWriterUnitTest {
|
|||
}
|
||||
});
|
||||
public static final String[] HEADERS = { "author", "title" };
|
||||
|
||||
enum BookHeaders{
|
||||
author, title
|
||||
}
|
||||
|
||||
public static final String EXPECTED_FILESTREAM = "author,title\r\n" + "Dan Simmons,Hyperion\r\n" + "Douglas Adams,The Hitchhiker's Guide to the Galaxy";
|
||||
|
||||
@Test
|
||||
public void givenCSVFile_whenRead_thenContentsAsExpected() throws IOException {
|
||||
void givenCSVFile_whenReadWithArrayHeader_thenContentsAsExpected() throws IOException {
|
||||
Reader in = new FileReader("src/test/resources/book.csv");
|
||||
Iterable<CSVRecord> records = CSVFormat.DEFAULT.withHeader(HEADERS).withFirstRecordAsHeader().parse(in);
|
||||
|
||||
CSVFormat csvFormat = CSVFormat.DEFAULT.builder()
|
||||
.setHeader(HEADERS)
|
||||
.setSkipHeaderRecord(true)
|
||||
.build();
|
||||
|
||||
Iterable<CSVRecord> records = csvFormat.parse(in);
|
||||
|
||||
for (CSVRecord record : records) {
|
||||
String author = record.get("author");
|
||||
String title = record.get("title");
|
||||
|
@ -38,9 +50,32 @@ public class CSVReaderWriterUnitTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void givenAuthorBookMap_whenWrittenToStream_thenOutputStreamAsExpected() throws IOException {
|
||||
void givenCSVFile_whenReadWithEnumHeader_thenContentsAsExpected() throws IOException {
|
||||
Reader in = new FileReader("src/test/resources/book.csv");
|
||||
|
||||
CSVFormat csvFormat = CSVFormat.DEFAULT.builder()
|
||||
.setHeader(BookHeaders.class)
|
||||
.setSkipHeaderRecord(true)
|
||||
.build();
|
||||
|
||||
Iterable<CSVRecord> records = csvFormat.parse(in);
|
||||
|
||||
for (CSVRecord record : records) {
|
||||
String author = record.get(BookHeaders.author);
|
||||
String title = record.get(BookHeaders.title);
|
||||
assertEquals(AUTHOR_BOOK_MAP.get(author), title);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void givenAuthorBookMap_whenWrittenToStream_thenOutputStreamAsExpected() throws IOException {
|
||||
StringWriter sw = new StringWriter();
|
||||
try (final CSVPrinter printer = new CSVPrinter(sw, CSVFormat.DEFAULT.withHeader(HEADERS))) {
|
||||
|
||||
CSVFormat csvFormat = CSVFormat.DEFAULT.builder()
|
||||
.setHeader(BookHeaders.class)
|
||||
.build();
|
||||
|
||||
try (final CSVPrinter printer = new CSVPrinter(sw, csvFormat)) {
|
||||
AUTHOR_BOOK_MAP.forEach((author, title) -> {
|
||||
try {
|
||||
printer.printRecord(author, title);
|
||||
|
@ -49,7 +84,8 @@ public class CSVReaderWriterUnitTest {
|
|||
}
|
||||
});
|
||||
}
|
||||
assertEquals(EXPECTED_FILESTREAM, sw.toString().trim());
|
||||
assertEquals(EXPECTED_FILESTREAM, sw.toString()
|
||||
.trim());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -179,17 +179,16 @@
|
|||
<serenity.version>1.9.9</serenity.version>
|
||||
<serenity.jbehave.version>1.9.0</serenity.jbehave.version>
|
||||
<serenity.jira.version>1.9.0</serenity.jira.version>
|
||||
<serenity.plugin.version>1.9.27</serenity.plugin.version>
|
||||
<serenity.plugin.version>3.6.12</serenity.plugin.version>
|
||||
<jsonassert.version>1.5.0</jsonassert.version>
|
||||
<awaitility.version>3.0.0</awaitility.version>
|
||||
<hoverfly-java.version>0.8.1</hoverfly-java.version>
|
||||
<spring.version>4.3.8.RELEASE</spring.version>
|
||||
<spring-mock-mvc.version>4.1.1</spring-mock-mvc.version>
|
||||
<spring-mock-mvc.version>5.3.0</spring-mock-mvc.version>
|
||||
<java-hamcrest.version>2.0.0.0</java-hamcrest.version>
|
||||
<dbunit.version>2.7.0</dbunit.version>
|
||||
<archunit.version>0.14.1</archunit.version>
|
||||
<modelassert.version>1.0.0</modelassert.version>
|
||||
<h2.version>2.1.214</h2.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
88
pom.xml
88
pom.xml
|
@ -331,14 +331,13 @@
|
|||
<module>parent-java</module>
|
||||
|
||||
<module>apache-cxf-modules</module>
|
||||
<module>apache-libraries</module>
|
||||
|
||||
<module>azure</module>
|
||||
<module>checker-plugin</module>
|
||||
<!-- <module>clojure</module> --> <!-- Not a maven project -->
|
||||
|
||||
<module>core-groovy-modules</module>
|
||||
<module>core-java-modules</module>
|
||||
|
||||
<module>couchbase</module>
|
||||
|
||||
<module>drools</module>
|
||||
|
@ -347,7 +346,6 @@
|
|||
<module>gradle-modules/gradle/maven-to-gradle</module>
|
||||
<!-- <module>grails</module> --> <!-- Not a maven project -->
|
||||
|
||||
<module>guava-modules</module>
|
||||
<!-- <module>guest</module> --> <!-- not to be built as its for guest articles -->
|
||||
|
||||
<module>apache-httpclient</module>
|
||||
|
@ -363,7 +361,7 @@
|
|||
<module>jaxb</module>
|
||||
<module>jersey</module>
|
||||
<module>jhipster-5</module>
|
||||
<module>jmeter</module>
|
||||
|
||||
<module>jmh</module>
|
||||
|
||||
<module>jsf</module>
|
||||
|
@ -380,7 +378,6 @@
|
|||
<module>libraries-data-db</module>
|
||||
<module>libraries-security</module>
|
||||
<module>libraries-server-2</module>
|
||||
<module>libraries-testing</module>
|
||||
<module>logging-modules</module>
|
||||
<module>lombok-modules</module>
|
||||
|
||||
|
@ -402,13 +399,6 @@
|
|||
<module>performance-tests</module>
|
||||
<module>persistence-modules</module>
|
||||
|
||||
|
||||
<module>quarkus-modules</module>
|
||||
|
||||
<module>rule-engines-modules</module>
|
||||
<module>rxjava-modules</module>
|
||||
|
||||
<module>reactive-systems</module>
|
||||
<module>security-modules</module>
|
||||
|
||||
<module>vavr-modules</module>
|
||||
|
@ -462,7 +452,6 @@
|
|||
<module>spf4j</module>
|
||||
<module>spring-4</module>
|
||||
<module>spring-aop</module>
|
||||
<module>spring-aop-2</module>
|
||||
<module>spring-batch</module>
|
||||
<module>spring-bom</module>
|
||||
<module>spring-boot-modules</module>
|
||||
|
@ -598,22 +587,19 @@
|
|||
<module>parent-java</module>
|
||||
|
||||
<module>apache-cxf-modules</module>
|
||||
<module>apache-libraries</module>
|
||||
|
||||
<module>azure</module>
|
||||
<module>checker-plugin</module>
|
||||
<!-- <module>clojure</module> --> <!-- Not a maven project -->
|
||||
|
||||
<module>core-groovy-modules</module>
|
||||
<module>core-java-modules</module>
|
||||
<module>couchbase</module>
|
||||
|
||||
<module>drools</module>
|
||||
<!-- <module>ethereum</module> --> <!-- JAVA-6001 -->
|
||||
<!-- <module>gradle-modules</module> --> <!-- Not a maven project -->
|
||||
<module>gradle-modules/gradle/maven-to-gradle</module>
|
||||
<!-- <module>grails</module> --> <!-- Not a maven project -->
|
||||
|
||||
<module>guava-modules</module>
|
||||
<!-- <module>guest</module> --> <!-- not to be built as its for guest articles -->
|
||||
|
||||
<module>apache-httpclient</module>
|
||||
|
@ -629,7 +615,6 @@
|
|||
<module>jaxb</module>
|
||||
<module>jersey</module>
|
||||
<module>jhipster-5</module>
|
||||
<module>jmeter</module>
|
||||
<module>jmh</module>
|
||||
|
||||
<module>jsf</module>
|
||||
|
@ -646,7 +631,6 @@
|
|||
<module>libraries-data-db</module>
|
||||
<module>libraries-security</module>
|
||||
<module>libraries-server-2</module>
|
||||
<module>libraries-testing</module>
|
||||
<module>logging-modules</module>
|
||||
<module>lombok-modules</module>
|
||||
|
||||
|
@ -657,7 +641,6 @@
|
|||
<module>microservices-modules</module>
|
||||
<module>muleesb</module>
|
||||
|
||||
|
||||
<module>netflix-modules</module>
|
||||
|
||||
<module>osgi</module>
|
||||
|
@ -668,13 +651,6 @@
|
|||
<module>performance-tests</module>
|
||||
<module>persistence-modules</module>
|
||||
|
||||
|
||||
<module>quarkus-modules</module>
|
||||
|
||||
<module>rule-engines-modules</module>
|
||||
<module>rxjava-modules</module>
|
||||
|
||||
<module>reactive-systems</module>
|
||||
<module>security-modules</module>
|
||||
|
||||
<module>vavr-modules</module>
|
||||
|
@ -719,8 +695,6 @@
|
|||
<module>server-modules</module>
|
||||
<module>spf4j</module>
|
||||
<module>spring-4</module>
|
||||
<module>spring-aop</module>
|
||||
<module>spring-aop-2</module>
|
||||
<module>spring-batch</module>
|
||||
<module>spring-bom</module>
|
||||
<module>spring-boot-modules</module>
|
||||
|
@ -875,12 +849,20 @@
|
|||
</build>
|
||||
|
||||
<modules>
|
||||
<module>spring-aop</module>
|
||||
<module>jmeter</module>
|
||||
<module>spring-aop-2</module>
|
||||
<module>algorithms-modules</module>
|
||||
<module>apache-libraries</module>
|
||||
<module>apache-poi</module>
|
||||
<module>apache-velocity</module>
|
||||
<module>di-modules</module>
|
||||
<module>asciidoctor</module>
|
||||
<module>aws-modules</module>
|
||||
|
||||
<module>couchbase</module>
|
||||
<module>core-groovy-modules</module>
|
||||
|
||||
<module>core-java-modules/core-java-9</module>
|
||||
<module>core-java-modules/core-java-9-improvements</module>
|
||||
<module>core-java-modules/core-java-9-jigsaw</module>
|
||||
|
@ -918,23 +900,24 @@
|
|||
<module>core-java-modules/core-java-networking-3</module>
|
||||
<module>core-java-modules/core-java-strings</module>
|
||||
<module>core-java-modules/core-java-httpclient</module>
|
||||
<module>custom-pmd</module>
|
||||
<module>custom-pmd</module>
|
||||
<module>spring-core-6</module>
|
||||
<module>data-structures</module>
|
||||
<module>ddd-contexts</module>
|
||||
<module>deeplearning4j</module>
|
||||
<module>docker-modules</module>
|
||||
<module>guava-modules</module>
|
||||
<module>apache-httpclient-2</module>
|
||||
<module>kubernetes-modules/kubernetes-spring</module>
|
||||
<module>libraries-concurrency</module>
|
||||
<module>libraries-testing</module>
|
||||
<module>maven-modules/compiler-plugin-java-9</module>
|
||||
<module>maven-modules/maven-generate-war</module>
|
||||
<module>maven-modules/multimodulemavenproject</module>
|
||||
<module>optaplanner</module>
|
||||
<module>persistence-modules/sirix</module>
|
||||
<module>persistence-modules/spring-data-cassandra-2</module>
|
||||
<module>quarkus-modules/quarkus-vs-springboot</module>
|
||||
<module>quarkus-modules/quarkus-jandex</module>
|
||||
<module>quarkus-modules</module>
|
||||
<module>spring-boot-modules/spring-boot-cassandre</module>
|
||||
<module>spring-boot-modules/spring-boot-3</module>
|
||||
<module>spring-boot-modules/spring-boot-3-native</module>
|
||||
|
@ -944,6 +927,12 @@
|
|||
<module>spring-swagger-codegen/custom-validations-opeanpi-codegen</module>
|
||||
<module>testing-modules/testing-assertions</module>
|
||||
<module>persistence-modules/fauna</module>
|
||||
|
||||
<module>rule-engines-modules</module>
|
||||
|
||||
<module>reactive-systems</module>
|
||||
<module>rxjava-modules</module>
|
||||
|
||||
<module>lightrun</module>
|
||||
<module>tablesaw</module>
|
||||
<module>geotools</module>
|
||||
|
@ -967,7 +956,7 @@
|
|||
<module>asm</module>
|
||||
<module>atomikos</module>
|
||||
<module>atomix</module>
|
||||
<module>axon</module>
|
||||
<!-- <module>axon</module>--><!-- JAVA-18408 -->
|
||||
|
||||
<module>bazel</module>
|
||||
<module>code-generation</module>
|
||||
|
@ -1058,7 +1047,8 @@
|
|||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>11</java.version>
|
||||
<java.version>11</java.version>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
|
@ -1086,12 +1076,16 @@
|
|||
|
||||
<modules>
|
||||
<module>algorithms-modules</module>
|
||||
<module>apache-libraries</module>
|
||||
<module>apache-poi</module>
|
||||
<module>apache-velocity</module>
|
||||
<module>di-modules</module>
|
||||
<module>asciidoctor</module>
|
||||
<module>aws-modules</module>
|
||||
|
||||
<module>couchbase</module>
|
||||
|
||||
<module>core-groovy-modules</module>
|
||||
<module>core-java-modules/core-java-9</module>
|
||||
<module>core-java-modules/core-java-9-improvements</module>
|
||||
<module>core-java-modules/core-java-9-jigsaw</module>
|
||||
|
@ -1129,23 +1123,28 @@
|
|||
<module>core-java-modules/core-java-networking-3</module>
|
||||
<module>core-java-modules/core-java-strings</module>
|
||||
<module>core-java-modules/core-java-httpclient</module>
|
||||
<module>custom-pmd</module>
|
||||
<module>spring-aop</module>
|
||||
<module>spring-aop-2</module>
|
||||
|
||||
<module>custom-pmd</module>
|
||||
<module>spring-core-6</module>
|
||||
<module>data-structures</module>
|
||||
<module>ddd-contexts</module>
|
||||
<module>deeplearning4j</module>
|
||||
<module>jmeter</module>
|
||||
<module>docker-modules</module>
|
||||
<module>guava-modules</module>
|
||||
<module>apache-httpclient-2</module>
|
||||
<module>kubernetes-modules/kubernetes-spring</module>
|
||||
<module>libraries-concurrency</module>
|
||||
<module>libraries-testing</module>
|
||||
<module>maven-modules/compiler-plugin-java-9</module>
|
||||
<module>maven-modules/maven-generate-war</module>
|
||||
<module>maven-modules/multimodulemavenproject</module>
|
||||
<module>optaplanner</module>
|
||||
<module>persistence-modules/sirix</module>
|
||||
<module>persistence-modules/spring-data-cassandra-2</module>
|
||||
<module>quarkus-modules/quarkus-vs-springboot</module>
|
||||
<module>quarkus-modules/quarkus-jandex</module>
|
||||
<module>quarkus-modules</module>
|
||||
<module>spring-boot-modules/spring-boot-cassandre</module>
|
||||
<module>spring-boot-modules/spring-boot-3</module>
|
||||
<module>spring-boot-modules/spring-boot-3-native</module>
|
||||
|
@ -1155,6 +1154,12 @@
|
|||
<module>spring-swagger-codegen/custom-validations-opeanpi-codegen</module>
|
||||
<module>testing-modules/testing-assertions</module>
|
||||
<module>persistence-modules/fauna</module>
|
||||
|
||||
<module>rule-engines-modules</module>
|
||||
|
||||
<module>reactive-systems</module>
|
||||
<module>rxjava-modules</module>
|
||||
|
||||
<module>lightrun</module>
|
||||
<module>tablesaw</module>
|
||||
<module>geotools</module>
|
||||
|
@ -1177,7 +1182,7 @@
|
|||
<module>asm</module>
|
||||
<module>atomikos</module>
|
||||
<module>atomix</module>
|
||||
<module>axon</module>
|
||||
<!-- <module>axon</module>--><!-- JAVA-18408 -->
|
||||
|
||||
<module>bazel</module>
|
||||
<module>code-generation</module>
|
||||
|
@ -1272,7 +1277,8 @@
|
|||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>11</java.version>
|
||||
<java.version>11</java.version>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
|
@ -1343,8 +1349,8 @@
|
|||
<jstl.version>1.2</jstl.version>
|
||||
<jackson.version>2.13.3</jackson.version>
|
||||
<commons-fileupload.version>1.4</commons-fileupload.version>
|
||||
<junit-platform.version>1.8.1</junit-platform.version>
|
||||
<junit-jupiter.version>5.8.1</junit-jupiter.version>
|
||||
<junit-platform.version>1.9.2</junit-platform.version>
|
||||
<junit-jupiter.version>5.9.2</junit-jupiter.version>
|
||||
<junit-platform-surefire-provider.version>1.3.2</junit-platform-surefire-provider.version>
|
||||
<directory-maven-plugin.version>0.3.1</directory-maven-plugin.version>
|
||||
<maven-install-plugin.version>2.5.2</maven-install-plugin.version>
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
<modules>
|
||||
<module>quarkus</module>
|
||||
<module>quarkus-extension</module>
|
||||
<!--Disabled because requires Java-9 <module>quarkus-jandex</module> <module>quarkus-vs-springboot</module> -->
|
||||
<module>quarkus-jandex</module>
|
||||
<module>quarkus-vs-springboot</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
|
@ -182,7 +182,7 @@
|
|||
</profiles>
|
||||
|
||||
<properties>
|
||||
<quarkus.version>1.7.0.Final</quarkus.version>
|
||||
<quarkus.version>2.16.3.Final</quarkus.version>
|
||||
<mockito.version>3.3.0</mockito.version>
|
||||
</properties>
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<easy-rules.version>3.0.0</easy-rules.version>
|
||||
<easy-rules.version>4.1.0</easy-rules.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -30,7 +30,7 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<evrete.version>2.1.04</evrete.version>
|
||||
<evrete.version>3.0.01</evrete.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -28,7 +28,7 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<openl.version>5.19.4</openl.version>
|
||||
<openl.version>5.26.5</openl.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -23,7 +23,7 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<rulebook.version>0.6.2</rulebook.version>
|
||||
<rulebook.version>0.12</rulebook.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
<modules>
|
||||
<module>rxjava-core</module>
|
||||
<module>rxjava-core-2</module>
|
||||
<module>rxjava-libraries</module>
|
||||
<module>rxjava-observables</module>
|
||||
<module>rxjava-operators</module>
|
||||
|
|
|
@ -12,7 +12,7 @@ import org.mockito.Mockito;
|
|||
import rx.Single;
|
||||
import rx.observers.TestSubscriber;
|
||||
|
||||
class SingleJustVsFromCallableTest {
|
||||
class SingleJustVsFromCallableUnitTest {
|
||||
|
||||
public EmployeeRepository repository = mock(EmployeeRepository.class);
|
||||
|
||||
|
|
|
@ -39,8 +39,22 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>${maven-war-plugin.version}</version>
|
||||
<configuration>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<aspectj-plugin.version>1.11</aspectj-plugin.version>
|
||||
<aspectj-plugin.version>1.14.0</aspectj-plugin.version>
|
||||
<maven-war-plugin.version>3.3.2</maven-war-plugin.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -69,11 +69,20 @@
|
|||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>${maven-war-plugin.version}</version>
|
||||
<configuration>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<aspectj-plugin.version>1.11</aspectj-plugin.version>
|
||||
<aspectj-plugin.version>1.14.0</aspectj-plugin.version>
|
||||
<maven-war-plugin.version>3.3.2</maven-war-plugin.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -51,8 +51,8 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<instancio.version>2.6.0</instancio.version>
|
||||
<instancio.version>2.9.0</instancio.version>
|
||||
<jackson.version>2.14.1</jackson.version>
|
||||
<junit-jupiter.version>5.9.2</junit-jupiter.version>
|
||||
</properties>
|
||||
</project>
|
||||
</project>
|
||||
|
|
|
@ -15,6 +15,12 @@
|
|||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>${junit-jupiter.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.platform</groupId>
|
||||
<artifactId>junit-platform-engine</artifactId>
|
||||
|
@ -39,7 +45,7 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<log4j2.version>2.17.1</log4j2.version>
|
||||
<log4j2.version>2.19.0</log4j2.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
Loading…
Reference in New Issue