fixed conflict
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
<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">
|
||||
<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>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>core-java-concurrency-advanced-3</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<name>core-java-concurrency-advanced-3</name>
|
||||
@@ -14,6 +16,15 @@
|
||||
<relativePath>../../parent-java</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>${assertj.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>core-java-concurrency-advanced-3</finalName>
|
||||
<plugins>
|
||||
@@ -35,6 +46,7 @@
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<assertj.version>3.14.0</assertj.version>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
package com.baeldung.rejection;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.concurrent.ThreadPoolExecutor.AbortPolicy;
|
||||
import java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy;
|
||||
import java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy;
|
||||
import java.util.concurrent.ThreadPoolExecutor.DiscardPolicy;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
public class SaturationPolicyUnitTest {
|
||||
|
||||
private ThreadPoolExecutor executor;
|
||||
|
||||
@After
|
||||
public void shutdownExecutor() {
|
||||
if (executor != null && !executor.isTerminated()) {
|
||||
executor.shutdownNow();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenAbortPolicy_WhenSaturated_ThenShouldThrowRejectedExecutionException() {
|
||||
executor = new ThreadPoolExecutor(1, 1, 0, MILLISECONDS, new SynchronousQueue<>(), new AbortPolicy());
|
||||
executor.execute(() -> waitFor(100));
|
||||
|
||||
assertThatThrownBy(() -> executor.execute(() -> System.out.println("Will be rejected"))).isInstanceOf(RejectedExecutionException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenCallerRunsPolicy_WhenSaturated_ThenTheCallerThreadRunsTheTask() {
|
||||
executor = new ThreadPoolExecutor(1, 1, 0, MILLISECONDS, new SynchronousQueue<>(), new CallerRunsPolicy());
|
||||
executor.execute(() -> waitFor(100));
|
||||
|
||||
long startTime = System.nanoTime();
|
||||
executor.execute(() -> waitFor(100));
|
||||
double blockedDuration = (System.nanoTime() - startTime) / 1_000_000.0;
|
||||
|
||||
assertThat(blockedDuration).isGreaterThanOrEqualTo(100);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenDiscardPolicy_WhenSaturated_ThenExecutorDiscardsTheNewTask() throws InterruptedException {
|
||||
executor = new ThreadPoolExecutor(1, 1, 0, MILLISECONDS, new SynchronousQueue<>(), new DiscardPolicy());
|
||||
executor.execute(() -> waitFor(100));
|
||||
|
||||
BlockingQueue<String> queue = new LinkedBlockingDeque<>();
|
||||
executor.execute(() -> queue.offer("Result"));
|
||||
|
||||
assertThat(queue.poll(200, MILLISECONDS)).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenDiscardOldestPolicy_WhenSaturated_ThenExecutorDiscardsTheOldestTask() {
|
||||
executor = new ThreadPoolExecutor(1, 1, 0, MILLISECONDS, new ArrayBlockingQueue<>(2), new DiscardOldestPolicy());
|
||||
executor.execute(() -> waitFor(100));
|
||||
|
||||
BlockingQueue<String> queue = new LinkedBlockingDeque<>();
|
||||
executor.execute(() -> queue.offer("First"));
|
||||
executor.execute(() -> queue.offer("Second"));
|
||||
executor.execute(() -> queue.offer("Third"));
|
||||
|
||||
waitFor(150);
|
||||
List<String> results = new ArrayList<>();
|
||||
queue.drainTo(results);
|
||||
assertThat(results).containsExactlyInAnyOrder("Second", "Third");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenGrowPolicy_WhenSaturated_ThenExecutorIncreaseTheMaxPoolSize() {
|
||||
executor = new ThreadPoolExecutor(1, 1, 0, MILLISECONDS, new ArrayBlockingQueue<>(2), new GrowPolicy());
|
||||
executor.execute(() -> waitFor(100));
|
||||
|
||||
BlockingQueue<String> queue = new LinkedBlockingDeque<>();
|
||||
executor.execute(() -> queue.offer("First"));
|
||||
executor.execute(() -> queue.offer("Second"));
|
||||
executor.execute(() -> queue.offer("Third"));
|
||||
|
||||
waitFor(150);
|
||||
List<String> results = new ArrayList<>();
|
||||
queue.drainTo(results);
|
||||
assertThat(results).containsExactlyInAnyOrder("First", "Second", "Third");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenExecutorIsTerminated_WhenSubmittedNewTask_ThenTheSaturationPolicyApplies() {
|
||||
ThreadPoolExecutor executor = new ThreadPoolExecutor(1, 1, 0, MILLISECONDS, new LinkedBlockingQueue<>());
|
||||
executor.shutdownNow();
|
||||
|
||||
assertThatThrownBy(() -> executor.execute(() -> {
|
||||
})).isInstanceOf(RejectedExecutionException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenExecutorIsTerminating_WhenSubmittedNewTask_ThenTheSaturationPolicyApplies() {
|
||||
ThreadPoolExecutor executor = new ThreadPoolExecutor(1, 1, 0, MILLISECONDS, new LinkedBlockingQueue<>());
|
||||
executor.execute(() -> waitFor(100));
|
||||
executor.shutdown();
|
||||
|
||||
assertThatThrownBy(() -> executor.execute(() -> {
|
||||
})).isInstanceOf(RejectedExecutionException.class);
|
||||
}
|
||||
|
||||
private static class GrowPolicy implements RejectedExecutionHandler {
|
||||
|
||||
private final Lock lock = new ReentrantLock();
|
||||
|
||||
@Override
|
||||
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
|
||||
lock.lock();
|
||||
try {
|
||||
executor.setMaximumPoolSize(executor.getMaximumPoolSize() + 1);
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
|
||||
executor.submit(r);
|
||||
}
|
||||
}
|
||||
|
||||
private void waitFor(int millis) {
|
||||
try {
|
||||
Thread.sleep(millis);
|
||||
} catch (InterruptedException ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
-3
@@ -18,8 +18,11 @@ public class CounterUnitTest {
|
||||
Counter counter = new Counter();
|
||||
Future<Integer> future1 = (Future<Integer>) executorService.submit(new CounterCallable(counter));
|
||||
Future<Integer> future2 = (Future<Integer>) executorService.submit(new CounterCallable(counter));
|
||||
|
||||
assertThat(future1.get()).isEqualTo(1);
|
||||
assertThat(future2.get()).isEqualTo(2);
|
||||
|
||||
// Just to make sure both are completed
|
||||
future1.get();
|
||||
future2.get();
|
||||
|
||||
assertThat(counter.getCounter()).isEqualTo(2);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-3
@@ -18,8 +18,11 @@ public class ExtrinsicLockCounterUnitTest {
|
||||
ExtrinsicLockCounter counter = new ExtrinsicLockCounter();
|
||||
Future<Integer> future1 = (Future<Integer>) executorService.submit(new ExtrinsicLockCounterCallable(counter));
|
||||
Future<Integer> future2 = (Future<Integer>) executorService.submit(new ExtrinsicLockCounterCallable(counter));
|
||||
|
||||
assertThat(future1.get()).isEqualTo(1);
|
||||
assertThat(future2.get()).isEqualTo(2);
|
||||
|
||||
// Just to make sure both are completed
|
||||
future1.get();
|
||||
future2.get();
|
||||
|
||||
assertThat(counter.getCounter()).isEqualTo(2);
|
||||
}
|
||||
}
|
||||
|
||||
+7
-4
@@ -11,15 +11,18 @@ import java.util.concurrent.Future;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class ReentrantLockCounterUnitTest {
|
||||
|
||||
|
||||
@Test
|
||||
public void whenCalledIncrementCounter_thenCorrect() throws Exception {
|
||||
ExecutorService executorService = Executors.newFixedThreadPool(2);
|
||||
ReentrantLockCounter counter = new ReentrantLockCounter();
|
||||
Future<Integer> future1 = (Future<Integer>) executorService.submit(new ReentrantLockCounterCallable(counter));
|
||||
Future<Integer> future2 = (Future<Integer>) executorService.submit(new ReentrantLockCounterCallable(counter));
|
||||
|
||||
assertThat(future1.get()).isEqualTo(1);
|
||||
assertThat(future2.get()).isEqualTo(2);
|
||||
|
||||
// Just to make sure both are completed
|
||||
future1.get();
|
||||
future2.get();
|
||||
|
||||
assertThat(counter.getCounter()).isEqualTo(2);
|
||||
}
|
||||
}
|
||||
|
||||
+9
-6
@@ -11,16 +11,19 @@ import java.util.concurrent.Future;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class ReentrantReadWriteLockCounterUnitTest {
|
||||
|
||||
|
||||
@Test
|
||||
public void whenCalledIncrementCounter_thenCorrect() throws Exception {
|
||||
ExecutorService executorService = Executors.newFixedThreadPool(2);
|
||||
ReentrantReadWriteLockCounter counter = new ReentrantReadWriteLockCounter();
|
||||
Future<Integer> future1 = (Future<Integer>) executorService.submit(new ReentranReadWriteLockCounterCallable(counter));
|
||||
Future<Integer> future2 = (Future<Integer>) executorService.submit(new ReentranReadWriteLockCounterCallable(counter));
|
||||
Future<Integer> future1 = (Future<Integer>) executorService.submit(new ReentranReadWriteLockCounterCallable(counter));
|
||||
Future<Integer> future2 = (Future<Integer>) executorService.submit(new ReentranReadWriteLockCounterCallable(counter));
|
||||
|
||||
assertThat(future2.get()).isEqualTo(2);
|
||||
assertThat(future1.get()).isEqualTo(1);
|
||||
// Just to make sure both are completed
|
||||
future1.get();
|
||||
future2.get();
|
||||
|
||||
assertThat(counter.getCounter()).isEqualTo(2);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+4
-6
@@ -2,18 +2,16 @@ package com.baeldung.datetime.sql;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.baeldung.datetime.sql.DateUtils;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.Date;
|
||||
import java.time.LocalDate;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class DateUtilsUnitTest {
|
||||
|
||||
@Test
|
||||
public void givenCurrentDate_thenTodayIsReturned() {
|
||||
assertEquals(DateUtils.getNow(), new Date());
|
||||
assertEquals(DateUtils.getNow().toLocalDate(), LocalDate.now());
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.baeldung.timezone;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class ModifyDefaultTimezoneUnitTest {
|
||||
|
||||
@Test
|
||||
public void givenDefaultTimezoneSet_thenDateTimezoneIsCorrect() {
|
||||
TimeZone.setDefault(TimeZone.getTimeZone("Portugal"));
|
||||
Date date = new Date();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
assertEquals(calendar.getTimeZone(), TimeZone.getTimeZone("Portugal"));
|
||||
}
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.baeldung.timezone;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class ModifyTimezonePropertyUnitTest {
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
System.setProperty("user.timezone", "IST");
|
||||
TimeZone.setDefault(null);
|
||||
}
|
||||
|
||||
@After
|
||||
public void teardown() {
|
||||
System.clearProperty("user.timezone");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenTimezonePropertySet_thenDateTimezoneIsCorrect() {
|
||||
Date date = new Date();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
assertEquals(calendar.getTimeZone(), TimeZone.getTimeZone("IST"));
|
||||
}
|
||||
|
||||
}
|
||||
+5
-10
@@ -1,4 +1,4 @@
|
||||
package com.baeldung.maths.calculator.basic;
|
||||
package com.baeldung.calculator.basic;
|
||||
|
||||
import java.util.InputMismatchException;
|
||||
import java.util.Scanner;
|
||||
@@ -7,19 +7,14 @@ public class BasicCalculatorIfElse {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
System.out.println("---------------------------------- \n" +
|
||||
"Welcome to Basic Calculator \n" +
|
||||
"----------------------------------");
|
||||
System.out.println("Following operations are supported : \n" +
|
||||
"1. Addition (+) \n" +
|
||||
"2. Subtraction (-) \n" +
|
||||
"3. Multiplication (* OR x) \n" +
|
||||
"4. Division (/) \n");
|
||||
System.out.println("---------------------------------- \n" + "Welcome to Basic Calculator \n" + "----------------------------------");
|
||||
System.out.println("Following operations are supported : \n" + "1. Addition (+) \n" + "2. Subtraction (-) \n" + "3. Multiplication (* OR x) \n" + "4. Division (/) \n");
|
||||
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
try {
|
||||
System.out.println("Enter an operator: (+ OR - OR * OR /) ");
|
||||
char operation = scanner.next().charAt(0);
|
||||
char operation = scanner.next()
|
||||
.charAt(0);
|
||||
|
||||
if (!(operation == '+' || operation == '-' || operation == '*' || operation == 'x' || operation == '/')) {
|
||||
System.err.println("Invalid Operator. Please use only + or - or * or /");
|
||||
+24
-30
@@ -1,4 +1,4 @@
|
||||
package com.baeldung.maths.calculator.basic;
|
||||
package com.baeldung.calculator.basic;
|
||||
|
||||
import java.util.InputMismatchException;
|
||||
import java.util.Scanner;
|
||||
@@ -6,19 +6,14 @@ import java.util.Scanner;
|
||||
public class BasicCalculatorSwitchCase {
|
||||
public static void main(String[] args) {
|
||||
|
||||
System.out.println("---------------------------------- \n"
|
||||
+ "Welcome to Basic Calculator \n"
|
||||
+ "----------------------------------");
|
||||
System.out.println("Following operations are supported : \n" +
|
||||
"1. Addition (+) \n" +
|
||||
"2. Subtraction (-) \n" +
|
||||
"3. Multiplication (* OR x) \n" +
|
||||
"4. Division (/) \n");
|
||||
System.out.println("---------------------------------- \n" + "Welcome to Basic Calculator \n" + "----------------------------------");
|
||||
System.out.println("Following operations are supported : \n" + "1. Addition (+) \n" + "2. Subtraction (-) \n" + "3. Multiplication (* OR x) \n" + "4. Division (/) \n");
|
||||
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
try {
|
||||
System.out.println("Enter an operator: (+ OR - OR * OR /) ");
|
||||
char operation = scanner.next().charAt(0);
|
||||
char operation = scanner.next()
|
||||
.charAt(0);
|
||||
|
||||
if (!(operation == '+' || operation == '-' || operation == '*' || operation == 'x' || operation == '/')) {
|
||||
System.err.println("Invalid Operator. Please use only + or - or * or /");
|
||||
@@ -35,24 +30,24 @@ public class BasicCalculatorSwitchCase {
|
||||
}
|
||||
|
||||
switch (operation) {
|
||||
case '+':
|
||||
System.out.println(num1 + " + " + num2 + " = " + (num1 + num2));
|
||||
break;
|
||||
case '-':
|
||||
System.out.println(num1 + " - " + num2 + " = " + (num1 - num2));
|
||||
break;
|
||||
case '*':
|
||||
System.out.println(num1 + " x " + num2 + " = " + (num1 * num2));
|
||||
break;
|
||||
case 'x':
|
||||
System.out.println(num1 + " x " + num2 + " = " + (num1 * num2));
|
||||
break;
|
||||
case '/':
|
||||
System.out.println(num1 + " / " + num2 + " = " + (num1 / num2));
|
||||
break;
|
||||
default:
|
||||
System.err.println("Invalid Operator Specified.");
|
||||
break;
|
||||
case '+':
|
||||
System.out.println(num1 + " + " + num2 + " = " + (num1 + num2));
|
||||
break;
|
||||
case '-':
|
||||
System.out.println(num1 + " - " + num2 + " = " + (num1 - num2));
|
||||
break;
|
||||
case '*':
|
||||
System.out.println(num1 + " x " + num2 + " = " + (num1 * num2));
|
||||
break;
|
||||
case 'x':
|
||||
System.out.println(num1 + " x " + num2 + " = " + (num1 * num2));
|
||||
break;
|
||||
case '/':
|
||||
System.out.println(num1 + " / " + num2 + " = " + (num1 / num2));
|
||||
break;
|
||||
default:
|
||||
System.err.println("Invalid Operator Specified.");
|
||||
break;
|
||||
}
|
||||
} catch (InputMismatchException exc) {
|
||||
System.err.println(exc.getMessage());
|
||||
@@ -60,5 +55,4 @@ public class BasicCalculatorSwitchCase {
|
||||
scanner.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -29,6 +29,11 @@
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>${json.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
<dependency>
|
||||
<groupId>org.junit.platform</groupId>
|
||||
<artifactId>junit-platform-runner</artifactId>
|
||||
<version>${junit.platform.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -78,7 +77,6 @@
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>${assertj.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -94,8 +92,7 @@
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>${h2.version}</version>
|
||||
</dependency>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/io.arrow-kt/arrow-core -->
|
||||
<dependency>
|
||||
<groupId>io.arrow-kt</groupId>
|
||||
@@ -125,7 +122,6 @@
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -133,13 +129,11 @@
|
||||
<dependency>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy</artifactId>
|
||||
<version>${byte-buddy.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.bytebuddy</groupId>
|
||||
<artifactId>byte-buddy-agent</artifactId>
|
||||
<version>${byte-buddy.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -12,22 +12,6 @@
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jboss-public-repository-group</id>
|
||||
<name>JBoss Public Repository Group</name>
|
||||
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>never</updatePolicy>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>daily</updatePolicy>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.beust</groupId>
|
||||
@@ -44,8 +28,5 @@
|
||||
<properties>
|
||||
<jcommander.version>1.78</jcommander.version>
|
||||
<lombok.version>1.18.6</lombok.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
@@ -48,15 +48,10 @@
|
||||
<version>${common-math3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-net</groupId>
|
||||
<artifactId>commons-net</artifactId>
|
||||
<version>${commons-net.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>${h2.version}</version>
|
||||
</dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.knowm.xchart</groupId>
|
||||
<artifactId>xchart</artifactId>
|
||||
@@ -71,9 +66,7 @@
|
||||
<commons-chain.version>1.2</commons-chain.version>
|
||||
<assertj.version>3.6.2</assertj.version>
|
||||
<commons.dbutils.version>1.6</commons.dbutils.version>
|
||||
<commons-codec-version>1.10.L001</commons-codec-version>
|
||||
<xchart-version>3.5.2</xchart-version>
|
||||
<commons-net.version>3.6</commons-net.version>
|
||||
<common-math3.version>3.6.1</common-math3.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -87,11 +87,6 @@
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.api-client</groupId>
|
||||
<artifactId>google-api-client</artifactId>
|
||||
<version>${google-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.googlecode.jmapper-framework</groupId>
|
||||
<artifactId>jmapper-core</artifactId>
|
||||
@@ -153,7 +148,6 @@
|
||||
<infinispan.version>9.1.5.Final</infinispan.version>
|
||||
<jackson.version>2.9.8</jackson.version>
|
||||
<spring.version>4.3.8.RELEASE</spring.version>
|
||||
<google-api.version>1.23.0</google-api.version>
|
||||
<jmapper.version>1.6.0.1</jmapper.version>
|
||||
<suanshu.version>4.0.0</suanshu.version>
|
||||
<derive4j.version>1.1.0</derive4j.version>
|
||||
|
||||
@@ -54,21 +54,11 @@
|
||||
<artifactId>datanucleus-maven-plugin</artifactId>
|
||||
<version>${datanucleus-maven-plugin.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.datanucleus</groupId>
|
||||
<artifactId>datanucleus-xml</artifactId>
|
||||
<version>${datanucleus-xml.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.datanucleus</groupId>
|
||||
<artifactId>datanucleus-jdo-query</artifactId>
|
||||
<version>${datanucleus-jdo-query.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
@@ -218,10 +208,8 @@
|
||||
<ormlite.version>5.0</ormlite.version>
|
||||
<datanucleus.version>5.1.1</datanucleus.version>
|
||||
<datanucleus-maven-plugin.version>5.0.2</datanucleus-maven-plugin.version>
|
||||
<datanucleus-xml.version>5.0.0-release</datanucleus-xml.version>
|
||||
<datanucleus-jdo-query.version>5.0.4</datanucleus-jdo-query.version>
|
||||
<javax.jdo.version>3.2.0-m7</javax.jdo.version>
|
||||
<slf4j.version>1.7.25</slf4j.version>
|
||||
<HikariCP.version>2.7.2</HikariCP.version>
|
||||
<ebean.version>11.22.4</ebean.version>
|
||||
</properties>
|
||||
|
||||
@@ -35,11 +35,6 @@
|
||||
<version>${opencsv.version}</version>
|
||||
</dependency>
|
||||
<!-- google api -->
|
||||
<dependency>
|
||||
<groupId>com.google.api-client</groupId>
|
||||
<artifactId>google-api-client</artifactId>
|
||||
<version>${google-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.oauth-client</groupId>
|
||||
<artifactId>google-oauth-client-jetty</artifactId>
|
||||
|
||||
@@ -13,11 +13,6 @@
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>${h2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
@@ -29,17 +24,6 @@
|
||||
<artifactId>kafka-streams</artifactId>
|
||||
<version>${kafka.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.kafka</groupId>
|
||||
<artifactId>kafka-clients</artifactId>
|
||||
<version>${kafka.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.kafka</groupId>
|
||||
<artifactId>kafka-clients</artifactId>
|
||||
@@ -57,11 +41,6 @@
|
||||
<artifactId>ignite-spring-data</artifactId>
|
||||
<version>${ignite.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.ignite</groupId>
|
||||
<artifactId>ignite-indexing</artifactId>
|
||||
<version>${ignite.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
@@ -116,59 +95,17 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.flink</groupId>
|
||||
<artifactId>flink-connector-kafka-0.11_2.11</artifactId>
|
||||
<version>${flink.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.flink</groupId>
|
||||
<artifactId>flink-streaming-java_2.11</artifactId>
|
||||
<version>${flink.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.flink</groupId>
|
||||
<artifactId>flink-core</artifactId>
|
||||
<version>${flink.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<groupId>commons-logging</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.flink</groupId>
|
||||
<artifactId>flink-java</artifactId>
|
||||
<version>${flink.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<groupId>commons-logging</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.flink</groupId>
|
||||
<artifactId>flink-test-utils_2.11</artifactId>
|
||||
<version>${flink.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>${assertj.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
@@ -189,22 +126,6 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>${logback.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-core</artifactId>
|
||||
<version>${logback.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -243,14 +164,10 @@
|
||||
<gson.version>2.8.2</gson.version>
|
||||
<cache.version>1.1.0</cache.version>
|
||||
<flink.version>1.5.0</flink.version>
|
||||
<assertj.version>3.6.2</assertj.version>
|
||||
<hazelcast.version>3.8.4</hazelcast.version>
|
||||
<maven-antrun-plugin.version>1.8</maven-antrun-plugin.version>
|
||||
<build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version>
|
||||
<org.apache.crunch.crunch-core.version>0.15.0</org.apache.crunch.crunch-core.version>
|
||||
<org.apache.hadoop.hadoop-client>2.2.0</org.apache.hadoop.hadoop-client>
|
||||
<slf4j.version>1.7.25</slf4j.version>
|
||||
<logback.version>1.0.1</logback.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -38,11 +38,6 @@
|
||||
<artifactId>google-http-client-jackson2</artifactId>
|
||||
<version>${googleclient.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.http-client</groupId>
|
||||
<artifactId>google-http-client-gson</artifactId>
|
||||
<version>${googleclient.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Retrofit -->
|
||||
<dependency>
|
||||
|
||||
+10
-11
@@ -13,43 +13,42 @@
|
||||
<dependency>
|
||||
<groupId>it.unimi.dsi</groupId>
|
||||
<artifactId>fastutil</artifactId>
|
||||
<version>8.2.2</version>
|
||||
<version>${fastutil.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/junit/junit -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.openjdk.jmh/jmh-core -->
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>1.19</version>
|
||||
<version>${jmh.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>1.19</version>
|
||||
<version>${jmh.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- Eclipse Collections -->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.collections</groupId>
|
||||
<artifactId>eclipse-collections-api</artifactId>
|
||||
<version>10.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.collections</groupId>
|
||||
<artifactId>eclipse-collections</artifactId>
|
||||
<version>10.0.0</version>
|
||||
<version>${eclipse-collections.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<fastutil.version>8.2.2</fastutil.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
<jmh.version>1.19</jmh.version>
|
||||
<eclipse-collections.version>10.0.0</eclipse-collections.version>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
</properties>
|
||||
</project>
|
||||
@@ -23,12 +23,10 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.security.oauth</groupId>
|
||||
<artifactId>spring-security-oauth2</artifactId>
|
||||
<version>${spring-security-oauth2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -55,7 +53,6 @@
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -76,14 +73,11 @@
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<spring-boot-maven-plugin.version>2.0.4.RELEASE</spring-boot-maven-plugin.version>
|
||||
<scribejava.version>5.6.0</scribejava.version>
|
||||
<spring-security-oauth2.version>2.3.3.RELEASE</spring-security-oauth2.version>
|
||||
<passay.version>1.3.1</passay.version>
|
||||
<tink.version>1.2.2</tink.version>
|
||||
<cryptacular.version>1.2.2</cryptacular.version>
|
||||
<jasypt.version>1.9.2</jasypt.version>
|
||||
<bouncycastle.version>1.58</bouncycastle.version>
|
||||
<spring.version>4.3.8.RELEASE</spring.version>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
@@ -79,12 +79,6 @@
|
||||
<version>${smack.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.igniterealtime.smack</groupId>
|
||||
<artifactId>smack-im</artifactId>
|
||||
<version>${smack.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.igniterealtime.smack</groupId>
|
||||
<artifactId>smack-extensions</artifactId>
|
||||
@@ -116,7 +110,6 @@
|
||||
<httpclient.version>4.5.3</httpclient.version>
|
||||
<jetty.version>9.4.8.v20171121</jetty.version>
|
||||
<netty.version>4.1.20.Final</netty.version>
|
||||
<commons.collections.version>4.1</commons.collections.version>
|
||||
<tomcat.version>8.5.24</tomcat.version>
|
||||
<smack.version>4.3.1</smack.version>
|
||||
<eclipse.paho.client.mqttv3.version>1.2.0</eclipse.paho.client.mqttv3.version>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,16 +23,6 @@
|
||||
<artifactId>jersey-container-servlet</artifactId>
|
||||
<version>${jersey.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.media</groupId>
|
||||
<artifactId>jersey-media-moxy</artifactId>
|
||||
<version>${jersey.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>${h2.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -32,10 +32,6 @@
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<!-- various -->
|
||||
<hibernate-jpa-2.1-api.version>1.0.0.Final</hibernate-jpa-2.1-api.version>
|
||||
<!-- delombok maven plugin -->
|
||||
<delombok-maven-plugin.version>1.16.10.0</delombok-maven-plugin.version>
|
||||
<lucene.version>7.4.0</lucene.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<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>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>maven</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>maven</name>
|
||||
@@ -307,7 +306,6 @@
|
||||
<maven.verifier.version>1.1</maven.verifier.version>
|
||||
<maven.clean.version>3.0.0</maven.clean.version>
|
||||
<maven.build.helper.version>3.0.0</maven.build.helper.version>
|
||||
<resources.name>Baeldung</resources.name>
|
||||
<jetty.version>9.4.11.v20180605</jetty.version>
|
||||
<jersey.version>2.27</jersey.version>
|
||||
</properties>
|
||||
|
||||
@@ -47,8 +47,6 @@
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<maven-core.version>3.5.4</maven-core.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -2,10 +2,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>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>mesos-marathon</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>mesos-marathon</name>
|
||||
<name>mesos-marathon</name>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
|
||||
@@ -57,47 +57,12 @@
|
||||
<version>${micrometer.ver}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-spring-legacy</artifactId>
|
||||
<version>${micrometer.ver}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>${spring-boot-starter-web.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${fasterxml.jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-smile</artifactId>
|
||||
<version>${fasterxml.jackson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.netflix.spectator</groupId>
|
||||
<artifactId>spectator-api</artifactId>
|
||||
<version>${spectator-api.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.astefanutti.metrics.aspectj</groupId>
|
||||
<artifactId>metrics-aspectj</artifactId>
|
||||
<version>${metrics-aspectj.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.astefanutti.metrics.aspectj</groupId>
|
||||
<artifactId>metrics-aspectj-deps</artifactId>
|
||||
@@ -118,8 +83,6 @@
|
||||
<dep.ver.servlet>3.1.0</dep.ver.servlet>
|
||||
<netflix.servo.ver>0.12.17</netflix.servo.ver>
|
||||
<micrometer.ver>0.12.0.RELEASE</micrometer.ver>
|
||||
<fasterxml.jackson.version>2.9.1</fasterxml.jackson.version>
|
||||
<spectator-api.version>0.57.1</spectator-api.version>
|
||||
<spring-boot-starter-web.version>2.0.7.RELEASE</spring-boot-starter-web.version>
|
||||
<assertj-core.version>3.11.1</assertj-core.version>
|
||||
<metrics-aspectj.version>1.1.0</metrics-aspectj.version>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user