From b6486a61a4fde65cd0117f1c717d7c8400d88e62 Mon Sep 17 00:00:00 2001 From: Zarathustra Date: Wed, 19 Jul 2017 04:32:59 +0100 Subject: [PATCH 1/8] BAEL-771 --- neuroph/README.md | 2 + neuroph/pom.xml | 51 ++++++++ .../main/java/com/baeldung/neuroph/App.java | 122 ++++++++++++++++++ pom.xml | 2 + 4 files changed, 177 insertions(+) create mode 100644 neuroph/README.md create mode 100644 neuroph/pom.xml create mode 100644 neuroph/src/main/java/com/baeldung/neuroph/App.java diff --git a/neuroph/README.md b/neuroph/README.md new file mode 100644 index 000000000000..28cfc6083139 --- /dev/null +++ b/neuroph/README.md @@ -0,0 +1,2 @@ +### Relevant Articles: +- [Introduction to Neuroph](http://www.baeldung.com/intro-to-neuroph) diff --git a/neuroph/pom.xml b/neuroph/pom.xml new file mode 100644 index 000000000000..a25ad2802d5a --- /dev/null +++ b/neuroph/pom.xml @@ -0,0 +1,51 @@ + + 4.0.0 + com.baeldung + neuroph + 1.0.0 + jar + + + 1.8 + 2.92 + + + + + org.beykery + neuroph + ${neuroph.version} + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + ${jdk.version} + ${jdk.version} + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.0.2 + + + **/log4j.properties + + + + com.baeldung.neuroph.App + + + + + + + + \ No newline at end of file diff --git a/neuroph/src/main/java/com/baeldung/neuroph/App.java b/neuroph/src/main/java/com/baeldung/neuroph/App.java new file mode 100644 index 000000000000..342b1dacc1a8 --- /dev/null +++ b/neuroph/src/main/java/com/baeldung/neuroph/App.java @@ -0,0 +1,122 @@ +package com.baeldung.neuroph; + +import org.neuroph.core.Layer; +import org.neuroph.core.NeuralNetwork; +import org.neuroph.core.Neuron; +import org.neuroph.core.data.DataSet; +import org.neuroph.core.data.DataSetRow; +import org.neuroph.core.learning.LearningRule; +import org.neuroph.nnet.learning.BackPropagation; +import org.neuroph.util.ConnectionFactory; +import org.neuroph.util.NeuralNetworkType; + +public class App { + + private static NeuralNetwork assembleNeuralNetwork() { + + Layer inputLayer = new Layer(); + inputLayer.addNeuron(new Neuron()); + inputLayer.addNeuron(new Neuron()); + + System.out.println("Input Layer Assembled!"); + + Layer hiddenLayerOne = new Layer(); + hiddenLayerOne.addNeuron(new Neuron()); + hiddenLayerOne.addNeuron(new Neuron()); + hiddenLayerOne.addNeuron(new Neuron()); + hiddenLayerOne.addNeuron(new Neuron()); + + System.out.println("Hidden Layer One Assembled!"); + + Layer hiddenLayerTwo = new Layer(); + hiddenLayerTwo.addNeuron(new Neuron()); + hiddenLayerTwo.addNeuron(new Neuron()); + hiddenLayerTwo.addNeuron(new Neuron()); + hiddenLayerTwo.addNeuron(new Neuron()); + + System.out.println("Hidden Layer Two Assembled!"); + + Layer outputLayer = new Layer(); + outputLayer.addNeuron(new Neuron()); + + System.out.println("Output Layer Assembled!"); + + NeuralNetwork ann = new NeuralNetwork(); + + ann.addLayer(0, inputLayer); + ann.addLayer(1, hiddenLayerOne); + ConnectionFactory.fullConnect(ann.getLayerAt(0), ann.getLayerAt(1)); + ann.addLayer(2, hiddenLayerTwo); + ConnectionFactory.fullConnect(ann.getLayerAt(1), ann.getLayerAt(2)); + ann.addLayer(3, outputLayer); + ConnectionFactory.fullConnect(ann.getLayerAt(2), ann.getLayerAt(3)); + ConnectionFactory.fullConnect(ann.getLayerAt(0), ann.getLayerAt(ann.getLayersCount()-1), false); + System.out.println("Layers Combined and Connected!"); + + ann.setInputNeurons(inputLayer.getNeurons()); + ann.setOutputNeurons(outputLayer.getNeurons()); + + ann.setNetworkType(NeuralNetworkType.MULTI_LAYER_PERCEPTRON); + System.out.println("Neural Network Assembled!"); + return ann; + } + + private static NeuralNetwork trainNeuralNetwork(NeuralNetwork ann) { + int inputSize = 2; + int outputSize = 1; + DataSet ds = new DataSet(inputSize, outputSize); + + DataSetRow rOne = new DataSetRow(new double[] {0, 1}, new double[] {0}); + ds.addRow(rOne); + DataSetRow rTwo = new DataSetRow(new double[] {1, 1}, new double[] {1}); + ds.addRow(rTwo); + DataSetRow rThree = new DataSetRow(new double[] {0, 0}, new double[] {0}); + ds.addRow(rThree); + DataSetRow rFour = new DataSetRow(new double[] {1, 0}, new double[] {0}); + ds.addRow(rFour); + System.out.println("Data Set Assembled!"); + + BackPropagation backPropagation = new BackPropagation(); + backPropagation.setMaxIterations(1000); + + ann.learn(ds, backPropagation); + System.out.println("Neural Network Trained!"); + return ann; + } + + private static void testNeuralNetwork(NeuralNetwork ann) { + System.out.println("Testing XOR"); + ann.setInput(0, 1); + System.out.println("Testing value : {0, 1}"); + ann.calculate(); + double[] networkOutputOne = ann.getOutput(); + System.out.println("Result: " + networkOutputOne[0]); + System.out.println("Actual value: 0.0"); + + ann.setInput(1, 1); + System.out.println("Testing value : {1, 1}"); + ann.calculate(); + double[] networkOutputTwo = ann.getOutput(); + System.out.println("Result: " + networkOutputTwo[0]); + System.out.println("Actual value: 1.0"); + + ann.setInput(0, 0); + System.out.println("Testing value : {0, 0}"); + ann.calculate(); + double[] networkOutputThree = ann.getOutput(); + System.out.println("Result: " + networkOutputThree[0]); + System.out.println("Actual value: 0.0"); + + ann.setInput(1, 0); + System.out.println("Testing value : {1, 0}"); + ann.calculate(); + double[] networkOutputFour = ann.getOutput(); + System.out.println("Result: " + networkOutputFour[0]); + System.out.println("Actual value: 0.0"); + } + + public static void main(String[] args){ + testNeuralNetwork(trainNeuralNetwork(assembleNeuralNetwork())); + } + +} diff --git a/pom.xml b/pom.xml index f0a331e3bde9..af55fa84dc4b 100644 --- a/pom.xml +++ b/pom.xml @@ -104,6 +104,8 @@ mocks mustache + neuroph + orika patterns From 183a14cfd33b2c3f2ae366be07d7253f07eac790 Mon Sep 17 00:00:00 2001 From: Zarathustra Date: Wed, 19 Jul 2017 20:30:31 +0100 Subject: [PATCH 2/8] Corrected XOR from mislabeled AND --- neuroph/src/main/java/com/baeldung/neuroph/App.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/neuroph/src/main/java/com/baeldung/neuroph/App.java b/neuroph/src/main/java/com/baeldung/neuroph/App.java index 342b1dacc1a8..9626f0192b5c 100644 --- a/neuroph/src/main/java/com/baeldung/neuroph/App.java +++ b/neuroph/src/main/java/com/baeldung/neuroph/App.java @@ -66,13 +66,13 @@ private static NeuralNetwork trainNeuralNetwork(NeuralNetwork ann) { int outputSize = 1; DataSet ds = new DataSet(inputSize, outputSize); - DataSetRow rOne = new DataSetRow(new double[] {0, 1}, new double[] {0}); + DataSetRow rOne = new DataSetRow(new double[] {0, 1}, new double[] {1}); ds.addRow(rOne); - DataSetRow rTwo = new DataSetRow(new double[] {1, 1}, new double[] {1}); + DataSetRow rTwo = new DataSetRow(new double[] {1, 1}, new double[] {0}); ds.addRow(rTwo); DataSetRow rThree = new DataSetRow(new double[] {0, 0}, new double[] {0}); ds.addRow(rThree); - DataSetRow rFour = new DataSetRow(new double[] {1, 0}, new double[] {0}); + DataSetRow rFour = new DataSetRow(new double[] {1, 0}, new double[] {1}); ds.addRow(rFour); System.out.println("Data Set Assembled!"); @@ -91,14 +91,14 @@ private static void testNeuralNetwork(NeuralNetwork ann) { ann.calculate(); double[] networkOutputOne = ann.getOutput(); System.out.println("Result: " + networkOutputOne[0]); - System.out.println("Actual value: 0.0"); + System.out.println("Actual value: 1.0"); ann.setInput(1, 1); System.out.println("Testing value : {1, 1}"); ann.calculate(); double[] networkOutputTwo = ann.getOutput(); System.out.println("Result: " + networkOutputTwo[0]); - System.out.println("Actual value: 1.0"); + System.out.println("Actual value: 0.0"); ann.setInput(0, 0); System.out.println("Testing value : {0, 0}"); @@ -112,7 +112,7 @@ private static void testNeuralNetwork(NeuralNetwork ann) { ann.calculate(); double[] networkOutputFour = ann.getOutput(); System.out.println("Result: " + networkOutputFour[0]); - System.out.println("Actual value: 0.0"); + System.out.println("Actual value: 1.0"); } public static void main(String[] args){ From bb974eca94e2850a747885499b30e946201ebb66 Mon Sep 17 00:00:00 2001 From: Zarathustra Date: Sun, 23 Jul 2017 08:53:16 +0100 Subject: [PATCH 3/8] Unit tests added --- neuroph/pom.xml | 45 ++++++++++++++- .../neuroph/{App.java => NeurophXOR.java} | 55 +------------------ .../java/com/baeldung/neuroph/XORTest.java | 50 +++++++++++++++++ 3 files changed, 97 insertions(+), 53 deletions(-) rename neuroph/src/main/java/com/baeldung/neuroph/{App.java => NeurophXOR.java} (55%) create mode 100644 neuroph/src/test/java/com/baeldung/neuroph/XORTest.java diff --git a/neuroph/pom.xml b/neuroph/pom.xml index a25ad2802d5a..fd75a71c9d06 100644 --- a/neuroph/pom.xml +++ b/neuroph/pom.xml @@ -11,11 +11,34 @@ + + junit + junit + 4.12 + test + + + org.hamcrest + hamcrest-core + + + + + org.hamcrest + hamcrest-library + 1.3 + test + org.beykery neuroph ${neuroph.version} + + junit + junit + RELEASE + @@ -40,11 +63,31 @@ - com.baeldung.neuroph.App + com.baeldung.neuroph.NeurophXOR + + + org.apache.maven.plugins + maven-surefire-plugin + 2.18.1 + + + test + test + + test + + + + test/java/com/baeldung/neuroph/XORTest.java + + + + + diff --git a/neuroph/src/main/java/com/baeldung/neuroph/App.java b/neuroph/src/main/java/com/baeldung/neuroph/NeurophXOR.java similarity index 55% rename from neuroph/src/main/java/com/baeldung/neuroph/App.java rename to neuroph/src/main/java/com/baeldung/neuroph/NeurophXOR.java index 9626f0192b5c..fb6a01d4c144 100644 --- a/neuroph/src/main/java/com/baeldung/neuroph/App.java +++ b/neuroph/src/main/java/com/baeldung/neuroph/NeurophXOR.java @@ -5,42 +5,33 @@ import org.neuroph.core.Neuron; import org.neuroph.core.data.DataSet; import org.neuroph.core.data.DataSetRow; -import org.neuroph.core.learning.LearningRule; import org.neuroph.nnet.learning.BackPropagation; import org.neuroph.util.ConnectionFactory; import org.neuroph.util.NeuralNetworkType; -public class App { +public class NeurophXOR { - private static NeuralNetwork assembleNeuralNetwork() { + public static NeuralNetwork assembleNeuralNetwork() { Layer inputLayer = new Layer(); inputLayer.addNeuron(new Neuron()); inputLayer.addNeuron(new Neuron()); - System.out.println("Input Layer Assembled!"); - Layer hiddenLayerOne = new Layer(); hiddenLayerOne.addNeuron(new Neuron()); hiddenLayerOne.addNeuron(new Neuron()); hiddenLayerOne.addNeuron(new Neuron()); hiddenLayerOne.addNeuron(new Neuron()); - System.out.println("Hidden Layer One Assembled!"); - Layer hiddenLayerTwo = new Layer(); hiddenLayerTwo.addNeuron(new Neuron()); hiddenLayerTwo.addNeuron(new Neuron()); hiddenLayerTwo.addNeuron(new Neuron()); hiddenLayerTwo.addNeuron(new Neuron()); - System.out.println("Hidden Layer Two Assembled!"); - Layer outputLayer = new Layer(); outputLayer.addNeuron(new Neuron()); - System.out.println("Output Layer Assembled!"); - NeuralNetwork ann = new NeuralNetwork(); ann.addLayer(0, inputLayer); @@ -51,17 +42,15 @@ private static NeuralNetwork assembleNeuralNetwork() { ann.addLayer(3, outputLayer); ConnectionFactory.fullConnect(ann.getLayerAt(2), ann.getLayerAt(3)); ConnectionFactory.fullConnect(ann.getLayerAt(0), ann.getLayerAt(ann.getLayersCount()-1), false); - System.out.println("Layers Combined and Connected!"); ann.setInputNeurons(inputLayer.getNeurons()); ann.setOutputNeurons(outputLayer.getNeurons()); ann.setNetworkType(NeuralNetworkType.MULTI_LAYER_PERCEPTRON); - System.out.println("Neural Network Assembled!"); return ann; } - private static NeuralNetwork trainNeuralNetwork(NeuralNetwork ann) { + public static NeuralNetwork trainNeuralNetwork(NeuralNetwork ann) { int inputSize = 2; int outputSize = 1; DataSet ds = new DataSet(inputSize, outputSize); @@ -74,49 +63,11 @@ private static NeuralNetwork trainNeuralNetwork(NeuralNetwork ann) { ds.addRow(rThree); DataSetRow rFour = new DataSetRow(new double[] {1, 0}, new double[] {1}); ds.addRow(rFour); - System.out.println("Data Set Assembled!"); BackPropagation backPropagation = new BackPropagation(); backPropagation.setMaxIterations(1000); ann.learn(ds, backPropagation); - System.out.println("Neural Network Trained!"); return ann; } - - private static void testNeuralNetwork(NeuralNetwork ann) { - System.out.println("Testing XOR"); - ann.setInput(0, 1); - System.out.println("Testing value : {0, 1}"); - ann.calculate(); - double[] networkOutputOne = ann.getOutput(); - System.out.println("Result: " + networkOutputOne[0]); - System.out.println("Actual value: 1.0"); - - ann.setInput(1, 1); - System.out.println("Testing value : {1, 1}"); - ann.calculate(); - double[] networkOutputTwo = ann.getOutput(); - System.out.println("Result: " + networkOutputTwo[0]); - System.out.println("Actual value: 0.0"); - - ann.setInput(0, 0); - System.out.println("Testing value : {0, 0}"); - ann.calculate(); - double[] networkOutputThree = ann.getOutput(); - System.out.println("Result: " + networkOutputThree[0]); - System.out.println("Actual value: 0.0"); - - ann.setInput(1, 0); - System.out.println("Testing value : {1, 0}"); - ann.calculate(); - double[] networkOutputFour = ann.getOutput(); - System.out.println("Result: " + networkOutputFour[0]); - System.out.println("Actual value: 1.0"); - } - - public static void main(String[] args){ - testNeuralNetwork(trainNeuralNetwork(assembleNeuralNetwork())); - } - } diff --git a/neuroph/src/test/java/com/baeldung/neuroph/XORTest.java b/neuroph/src/test/java/com/baeldung/neuroph/XORTest.java new file mode 100644 index 000000000000..063c57195bd4 --- /dev/null +++ b/neuroph/src/test/java/com/baeldung/neuroph/XORTest.java @@ -0,0 +1,50 @@ +package com.baeldung.neuroph; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.neuroph.core.NeuralNetwork; + +import static org.junit.Assert.*; + +public class XORTest { + private NeuralNetwork ann = null; + + @Before + public void annInit() { + ann = NeurophXOR.trainNeuralNetwork(NeurophXOR.assembleNeuralNetwork()); + } + + @Test + public void leftDisjunctTest() { + ann.setInput(0, 1); + ann.calculate(); + assertEquals(ann.getOutput()[0], 1.0,0.0); + } + + @Test + public void rightDisjunctTest() { + ann.setInput(1, 0); + ann.calculate(); + assertEquals(ann.getOutput()[0], 1.0,0.0); + } + + @Test + public void bothFalseConjunctTest() { + ann.setInput(0, 0); + ann.calculate(); + assertEquals(ann.getOutput()[0], 0.0,0.0); + } + + @Test + public void bothTrueConjunctTest() { + ann.setInput(1, 1); + ann.calculate(); + assertEquals(ann.getOutput()[0], 0.0,0.0); + } + + @After + public void annClose() { + ann = null; + } +} From 9a01086f967208a2c549104140f91ad6e12b3716 Mon Sep 17 00:00:00 2001 From: Zarathustra Date: Tue, 25 Jul 2017 10:02:12 +0100 Subject: [PATCH 4/8] Merged into libraries module - removed Neuroph module --- libraries/README.md | 1 + libraries/pom.xml | 43 +++++++++ .../java/com/baeldung/neuroph/NeurophXOR.java | 0 .../java/com/baeldung/neuroph/XORTest.java | 0 neuroph/README.md | 2 - neuroph/pom.xml | 94 ------------------- pom.xml | 2 - 7 files changed, 44 insertions(+), 98 deletions(-) rename {neuroph => libraries}/src/main/java/com/baeldung/neuroph/NeurophXOR.java (100%) rename {neuroph => libraries}/src/test/java/com/baeldung/neuroph/XORTest.java (100%) delete mode 100644 neuroph/README.md delete mode 100644 neuroph/pom.xml diff --git a/libraries/README.md b/libraries/README.md index 7970c0e99ec1..f0484ec710f3 100644 --- a/libraries/README.md +++ b/libraries/README.md @@ -26,6 +26,7 @@ - [A Guide to Apache Commons DbUtils](http://www.baeldung.com/apache-commons-dbutils) - [Introduction to Awaitility](http://www.baeldung.com/awaitlity-testing) - [Guide to the HyperLogLog Algorithm](http://www.baeldung.com/java-hyperloglog) +- [Introduction to Neuroph](http://www.baeldung.com/intro-to-neuroph) The libraries module contains examples related to small libraries that are relatively easy to use and does not require any separate module of its own. diff --git a/libraries/pom.xml b/libraries/pom.xml index 16f70cb17194..ea5772043786 100644 --- a/libraries/pom.xml +++ b/libraries/pom.xml @@ -122,6 +122,42 @@ + + + org.apache.maven.plugins + maven-jar-plugin + 3.0.2 + + + **/log4j.properties + + + + com.baeldung.neuroph.NeurophXOR + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.18.1 + + + test + test + + test + + + + test/java/com/baeldung/neuroph/XORTest.java + + + + + + @@ -144,6 +180,12 @@ + + + org.beykery + neuroph + ${neuroph.version} + cglib @@ -565,6 +607,7 @@ 1.4.196 9.4.2.v20170220 4.5.3 + 2.92 2.5 1.2.0 2.8.5 diff --git a/neuroph/src/main/java/com/baeldung/neuroph/NeurophXOR.java b/libraries/src/main/java/com/baeldung/neuroph/NeurophXOR.java similarity index 100% rename from neuroph/src/main/java/com/baeldung/neuroph/NeurophXOR.java rename to libraries/src/main/java/com/baeldung/neuroph/NeurophXOR.java diff --git a/neuroph/src/test/java/com/baeldung/neuroph/XORTest.java b/libraries/src/test/java/com/baeldung/neuroph/XORTest.java similarity index 100% rename from neuroph/src/test/java/com/baeldung/neuroph/XORTest.java rename to libraries/src/test/java/com/baeldung/neuroph/XORTest.java diff --git a/neuroph/README.md b/neuroph/README.md deleted file mode 100644 index 28cfc6083139..000000000000 --- a/neuroph/README.md +++ /dev/null @@ -1,2 +0,0 @@ -### Relevant Articles: -- [Introduction to Neuroph](http://www.baeldung.com/intro-to-neuroph) diff --git a/neuroph/pom.xml b/neuroph/pom.xml deleted file mode 100644 index fd75a71c9d06..000000000000 --- a/neuroph/pom.xml +++ /dev/null @@ -1,94 +0,0 @@ - - 4.0.0 - com.baeldung - neuroph - 1.0.0 - jar - - - 1.8 - 2.92 - - - - - junit - junit - 4.12 - test - - - org.hamcrest - hamcrest-core - - - - - org.hamcrest - hamcrest-library - 1.3 - test - - - org.beykery - neuroph - ${neuroph.version} - - - junit - junit - RELEASE - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.6.1 - - ${jdk.version} - ${jdk.version} - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.0.2 - - - **/log4j.properties - - - - com.baeldung.neuroph.NeurophXOR - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.18.1 - - - test - test - - test - - - - test/java/com/baeldung/neuroph/XORTest.java - - - - - - - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index af55fa84dc4b..f0a331e3bde9 100644 --- a/pom.xml +++ b/pom.xml @@ -104,8 +104,6 @@ mocks mustache - neuroph - orika patterns From 3d68566d395a6177ef832709e2e47204dad3edc7 Mon Sep 17 00:00:00 2001 From: Zarathustra Date: Tue, 25 Jul 2017 10:09:15 +0100 Subject: [PATCH 5/8] Merged into libraries module - removed Neuroph module --- core-java/hashcode/pom.xml | 39 ++++ .../com/baeldung/application/Application.java | 23 +++ .../main/java/com/baeldung/entities/User.java | 38 ++++ .../baeldung/application/ApplicationTest.java | 30 +++ .../java/com/baeldung/entities/UserTest.java | 34 ++++ .../ScheduledExecutorServiceDemo.java | 30 +-- .../atomic/SafeCounterWithLock.java | 2 +- .../atomic/SafeCounterWithoutLock.java | 2 +- .../cyclicbarrier/CyclicBarrierExample.java | 8 +- .../concurrent/executor/ExecutorDemo.java | 7 +- .../executorservice/ExecutorServiceDemo.java | 9 +- .../concurrent/future/FutureDemo.java | 11 +- libraries/pom.xml | 190 +----------------- .../webapp/VAADIN/themes/valo/addons.scss | 7 - testing/pom.xml | 6 + .../shopping/ShoppingIntegrationTest.java | 12 ++ .../testing/shopping/ShoppingStepsDef.java | 22 ++ .../test/resources/features/shopping.feature | 11 + vaadin/pom.xml | 173 ++++++++++++++++ .../com/baeldung/introduction}/BindData.java | 2 +- .../com/baeldung/introduction}/VaadinUI.java | 4 +- vaadin/src/main/resources/README | 1 + .../webapp/VAADIN/themes/mytheme/addons.scss | 0 .../webapp/VAADIN/themes/mytheme/favicon.ico | Bin .../webapp/VAADIN/themes/mytheme/mytheme.scss | 0 .../webapp/VAADIN/themes/mytheme/styles.css | 0 .../webapp/VAADIN/themes/mytheme/styles.scss | 0 27 files changed, 417 insertions(+), 244 deletions(-) create mode 100644 core-java/hashcode/pom.xml create mode 100644 core-java/hashcode/src/main/java/com/baeldung/application/Application.java create mode 100644 core-java/hashcode/src/main/java/com/baeldung/entities/User.java create mode 100644 core-java/hashcode/src/test/java/com/baeldung/application/ApplicationTest.java create mode 100644 core-java/hashcode/src/test/java/com/baeldung/entities/UserTest.java delete mode 100644 libraries/src/main/webapp/VAADIN/themes/valo/addons.scss create mode 100644 testing/src/test/java/com/baeldung/testing/shopping/ShoppingIntegrationTest.java create mode 100644 testing/src/test/java/com/baeldung/testing/shopping/ShoppingStepsDef.java create mode 100644 testing/src/test/resources/features/shopping.feature create mode 100644 vaadin/pom.xml rename {libraries/src/main/java/com/baeldung/vaadin => vaadin/src/main/java/com/baeldung/introduction}/BindData.java (89%) rename {libraries/src/main/java/com/baeldung/vaadin => vaadin/src/main/java/com/baeldung/introduction}/VaadinUI.java (99%) create mode 100644 vaadin/src/main/resources/README rename {libraries => vaadin}/src/main/webapp/VAADIN/themes/mytheme/addons.scss (100%) rename {libraries => vaadin}/src/main/webapp/VAADIN/themes/mytheme/favicon.ico (100%) rename {libraries => vaadin}/src/main/webapp/VAADIN/themes/mytheme/mytheme.scss (100%) rename {libraries => vaadin}/src/main/webapp/VAADIN/themes/mytheme/styles.css (100%) rename {libraries => vaadin}/src/main/webapp/VAADIN/themes/mytheme/styles.scss (100%) diff --git a/core-java/hashcode/pom.xml b/core-java/hashcode/pom.xml new file mode 100644 index 000000000000..393aa69153e9 --- /dev/null +++ b/core-java/hashcode/pom.xml @@ -0,0 +1,39 @@ + + + 4.0.0 + com.baeldung.hashcode + hashcode + 1.0 + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + + + + + + + junit + junit + 4.12 + test + + + org.slf4j + slf4j-api + 1.7.25 + + + org.slf4j + slf4j-simple + 1.7.25 + + + \ No newline at end of file diff --git a/core-java/hashcode/src/main/java/com/baeldung/application/Application.java b/core-java/hashcode/src/main/java/com/baeldung/application/Application.java new file mode 100644 index 000000000000..08c670c82f78 --- /dev/null +++ b/core-java/hashcode/src/main/java/com/baeldung/application/Application.java @@ -0,0 +1,23 @@ +package com.baeldung.application; + +import com.baeldung.entities.User; +import java.util.HashMap; +import java.util.Map; + +public class Application { + + public static void main(String[] args) { + Map users = new HashMap<>(); + User user1 = new User(1L, "John", "john@domain.com"); + User user2 = new User(2L, "Jennifer", "jennifer@domain.com"); + User user3 = new User(3L, "Mary", "mary@domain.com"); + + users.put(user1, user1); + users.put(user2, user2); + users.put(user3, user3); + + if (users.containsKey(user1)) { + System.out.print("User found in the collection"); + } + } +} diff --git a/core-java/hashcode/src/main/java/com/baeldung/entities/User.java b/core-java/hashcode/src/main/java/com/baeldung/entities/User.java new file mode 100644 index 000000000000..a976233562dc --- /dev/null +++ b/core-java/hashcode/src/main/java/com/baeldung/entities/User.java @@ -0,0 +1,38 @@ +package com.baeldung.entities; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class User { + + private final Logger logger = LoggerFactory.getLogger(User.class); + private long id; + private String name; + private String email; + + public User(long id, String name, String email) { + this.id = id; + this.name = name; + this.email = email; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null) return false; + if (this.getClass() != o.getClass()) return false; + User user = (User) o; + return id != user.id && (!name.equals(user.name) && !email.equals(user.email)); + } + + @Override + public int hashCode() { + int hash = 7; + hash = 31 * hash + (int) id; + hash = 31 * hash + (name == null ? 0 : name.hashCode()); + hash = 31 * hash + (email == null ? 0 : email.hashCode()); + logger.info("hashCode() method called - Computed hash: " + hash); + return hash; + } + // getters and setters here +} diff --git a/core-java/hashcode/src/test/java/com/baeldung/application/ApplicationTest.java b/core-java/hashcode/src/test/java/com/baeldung/application/ApplicationTest.java new file mode 100644 index 000000000000..dcd853f451d9 --- /dev/null +++ b/core-java/hashcode/src/test/java/com/baeldung/application/ApplicationTest.java @@ -0,0 +1,30 @@ +package com.baeldung.application; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import static org.junit.Assert.assertEquals; + +public class ApplicationTest { + + private ByteArrayOutputStream outContent; + + @Before + public void setUpPrintStreamInstance() throws Exception { + this.outContent = new ByteArrayOutputStream(); + System.setOut(new PrintStream(outContent)); + } + + @After + public void tearDownByteArrayOutputStream() throws Exception { + outContent = null; + } + + @Test + public void main_NoInputState_TextPrintedToConsole() throws Exception { + Application.main(new String[]{}); + assertEquals("User found in the collection", outContent.toString()); + } +} \ No newline at end of file diff --git a/core-java/hashcode/src/test/java/com/baeldung/entities/UserTest.java b/core-java/hashcode/src/test/java/com/baeldung/entities/UserTest.java new file mode 100644 index 000000000000..01f6085d7eac --- /dev/null +++ b/core-java/hashcode/src/test/java/com/baeldung/entities/UserTest.java @@ -0,0 +1,34 @@ +package com.baeldung.entities; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class UserTest { + + private User user; + private User comparisonUser; + + @Before + public void setUpUserInstances() { + this.user = new User(1L, "test", "test@domain.com"); + this.comparisonUser = this.user; + } + + @After + public void tearDownUserInstances() { + user = null; + comparisonUser = null; + } + + @Test + public void equals_EqualUserInstance_TrueAssertion(){ + Assert.assertTrue(user.equals(comparisonUser)); + } + + @Test + public void hashCode_UserHash_TrueAssertion() { + Assert.assertEquals(1792276941, user.hashCode()); + } +} \ No newline at end of file diff --git a/core-java/src/main/java/com/baeldung/concurrent/Scheduledexecutorservice/ScheduledExecutorServiceDemo.java b/core-java/src/main/java/com/baeldung/concurrent/Scheduledexecutorservice/ScheduledExecutorServiceDemo.java index 171f308c1682..b77019eea5fe 100644 --- a/core-java/src/main/java/com/baeldung/concurrent/Scheduledexecutorservice/ScheduledExecutorServiceDemo.java +++ b/core-java/src/main/java/com/baeldung/concurrent/Scheduledexecutorservice/ScheduledExecutorServiceDemo.java @@ -1,6 +1,5 @@ package com.baeldung.concurrent.Scheduledexecutorservice; -import java.util.concurrent.Callable; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.ScheduledExecutorService; @@ -12,32 +11,21 @@ public class ScheduledExecutorServiceDemo { public void execute() { ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor(); - ScheduledFuture scheduledFuture = executorService.schedule(new Runnable() { - @Override - public void run() { - // task details - } + ScheduledFuture scheduledFuture = executorService.schedule(() -> { + // Task }, 1, TimeUnit.SECONDS); - executorService.scheduleAtFixedRate(new Runnable() { - @Override - public void run() { - // task details - } + executorService.scheduleAtFixedRate(() -> { + // Task }, 1, 10, TimeUnit.SECONDS); - executorService.scheduleWithFixedDelay(new Runnable() { - @Override - public void run() { - // task details - } + executorService.scheduleWithFixedDelay(() -> { + // Task }, 1, 10, TimeUnit.SECONDS); - Future future = executorService.schedule(new Callable() { - @Override - public String call() throws Exception { - return "Hello World"; - } + Future future = executorService.schedule(() -> { + // Task + return "Hellow world"; }, 1, TimeUnit.SECONDS); executorService.shutdown(); diff --git a/core-java/src/main/java/com/baeldung/concurrent/atomic/SafeCounterWithLock.java b/core-java/src/main/java/com/baeldung/concurrent/atomic/SafeCounterWithLock.java index b2502018bbda..38633011bfd7 100644 --- a/core-java/src/main/java/com/baeldung/concurrent/atomic/SafeCounterWithLock.java +++ b/core-java/src/main/java/com/baeldung/concurrent/atomic/SafeCounterWithLock.java @@ -1,7 +1,7 @@ package com.baeldung.concurrent.atomic; public class SafeCounterWithLock { - int counter; + private volatile int counter; public int getValue() { return counter; diff --git a/core-java/src/main/java/com/baeldung/concurrent/atomic/SafeCounterWithoutLock.java b/core-java/src/main/java/com/baeldung/concurrent/atomic/SafeCounterWithoutLock.java index 55226f4f13ed..41e10789a6e4 100644 --- a/core-java/src/main/java/com/baeldung/concurrent/atomic/SafeCounterWithoutLock.java +++ b/core-java/src/main/java/com/baeldung/concurrent/atomic/SafeCounterWithoutLock.java @@ -3,7 +3,7 @@ import java.util.concurrent.atomic.AtomicInteger; public class SafeCounterWithoutLock { - AtomicInteger counter = new AtomicInteger(0); + private final AtomicInteger counter = new AtomicInteger(0); public int getValue() { return counter.get(); diff --git a/core-java/src/main/java/com/baeldung/concurrent/cyclicbarrier/CyclicBarrierExample.java b/core-java/src/main/java/com/baeldung/concurrent/cyclicbarrier/CyclicBarrierExample.java index e6075c933e89..85c0cf76804d 100644 --- a/core-java/src/main/java/com/baeldung/concurrent/cyclicbarrier/CyclicBarrierExample.java +++ b/core-java/src/main/java/com/baeldung/concurrent/cyclicbarrier/CyclicBarrierExample.java @@ -5,11 +5,9 @@ public class CyclicBarrierExample { public void start() { - CyclicBarrier cyclicBarrier = new CyclicBarrier(3, new Runnable() { - @Override - public void run() { - System.out.println("All previous tasks are completed"); - } + CyclicBarrier cyclicBarrier = new CyclicBarrier(3, () -> { + // Task + System.out.println("All previous tasks are completed"); }); Thread t1 = new Thread(new Task(cyclicBarrier), "T1"); diff --git a/core-java/src/main/java/com/baeldung/concurrent/executor/ExecutorDemo.java b/core-java/src/main/java/com/baeldung/concurrent/executor/ExecutorDemo.java index 9392134bfb70..84998cb489c7 100644 --- a/core-java/src/main/java/com/baeldung/concurrent/executor/ExecutorDemo.java +++ b/core-java/src/main/java/com/baeldung/concurrent/executor/ExecutorDemo.java @@ -6,11 +6,8 @@ public class ExecutorDemo { public void execute() { Executor executor = new Invoker(); - executor.execute(new Runnable() { - @Override - public void run() { - // task to be performed - } + executor.execute(()->{ + // task to be performed }); } diff --git a/core-java/src/main/java/com/baeldung/concurrent/executorservice/ExecutorServiceDemo.java b/core-java/src/main/java/com/baeldung/concurrent/executorservice/ExecutorServiceDemo.java index 631ae140ab06..ae2b279d9a91 100644 --- a/core-java/src/main/java/com/baeldung/concurrent/executorservice/ExecutorServiceDemo.java +++ b/core-java/src/main/java/com/baeldung/concurrent/executorservice/ExecutorServiceDemo.java @@ -10,15 +10,10 @@ public class ExecutorServiceDemo { public void execute() { - executor.execute(new Runnable() { - @Override - public void run() { - // task details - } + executor.submit(() -> { + new Task(); }); - executor.submit(new Task()); - executor.shutdown(); executor.shutdownNow(); try { diff --git a/core-java/src/main/java/com/baeldung/concurrent/future/FutureDemo.java b/core-java/src/main/java/com/baeldung/concurrent/future/FutureDemo.java index 89ce1a0a41d4..7cb611be0fca 100644 --- a/core-java/src/main/java/com/baeldung/concurrent/future/FutureDemo.java +++ b/core-java/src/main/java/com/baeldung/concurrent/future/FutureDemo.java @@ -1,6 +1,5 @@ package com.baeldung.concurrent.future; -import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -16,12 +15,10 @@ public String invoke() { ExecutorService executorService = Executors.newFixedThreadPool(10); - Future future = executorService.submit(new Callable() { - @Override - public String call() throws Exception { - Thread.sleep(10000l); - return "Hello World"; - } + Future future = executorService.submit(() -> { + // Task + Thread.sleep(10000l); + return "Hellow world"; }); future.cancel(false); diff --git a/libraries/pom.xml b/libraries/pom.xml index ea5772043786..7647f6bf624b 100644 --- a/libraries/pom.xml +++ b/libraries/pom.xml @@ -71,58 +71,7 @@ - - - org.apache.maven.plugins - maven-war-plugin - 3.0.0 - - false - WEB-INF/classes/VAADIN/widgetsets/WEB-INF/** - - - - com.vaadin - vaadin-maven-plugin - ${vaadin.plugin.version} - - - - update-theme - update-widgetset - compile - compile-theme - - - - - - org.apache.maven.plugins - maven-clean-plugin - 3.0.0 - - - - src/main/webapp/VAADIN/themes - - **/styles.css - **/styles.scss.cache - - - - - - - org.eclipse.jetty - jetty-maven-plugin - ${jetty.version} - - 2 - true - - - - + org.apache.maven.plugins maven-jar-plugin @@ -160,25 +109,6 @@ - - - - vaadin-addons - http://maven.vaadin.com/vaadin-addons - - - - - - com.vaadin - vaadin-bom - ${vaadin.version} - pom - import - - - - @@ -439,7 +369,6 @@ quartz 2.3.0 - one.util streamex @@ -505,72 +434,6 @@ ${org.hamcrest.java-hamcrest.version} test - - - com.vaadin - vaadin-server - - - com.vaadin - vaadin-client-compiled - - - com.vaadin - vaadin-themes - - - com.vaadin - vaadin-push - - - org.seleniumhq.selenium - selenium-java - test - 3.4.0 - - - org.seleniumhq.selenium - htmlunit-driver - 2.27 - - - org.eclipse.jetty.websocket - websocket-server - ${jetty.version} - - - org.eclipse.jetty.websocket - websocket-client - ${jetty.version} - - - org.eclipse.jetty.websocket - websocket-api - ${jetty.version} - - - org.eclipse.jetty.websocket - websocket-common - ${jetty.version} - - - org.eclipse.jetty - jetty-continuation - ${jetty.version} - - - org.eclipse.jetty - jetty-util - ${jetty.version} - - - org.seleniumhq.selenium - selenium-api - 3.4.0 - test - jar - - net.agkn hll @@ -607,10 +470,10 @@ 1.4.196 9.4.2.v20170220 4.5.3 - 2.92 2.5 1.2.0 2.8.5 + 2.92 1.4.0 1.24.0 1.1.3-rc.5 @@ -623,54 +486,7 @@ 3.5.0 3.0.0 2.0.0.0 - - 7.7.10 - 8.0.6 - mytheme - 1.6.0 1.7.1 - - - - vaadin-prerelease - - false - - - - vaadin-prereleases - http://maven.vaadin.com/vaadin-prereleases - - - vaadin-snapshots - https://oss.sonatype.org/content/repositories/vaadin-snapshots/ - - false - - - true - - - - - - vaadin-prereleases - http://maven.vaadin.com/vaadin-prereleases - - - vaadin-snapshots - https://oss.sonatype.org/content/repositories/vaadin-snapshots/ - - false - - - true - - - - - - - + \ No newline at end of file diff --git a/libraries/src/main/webapp/VAADIN/themes/valo/addons.scss b/libraries/src/main/webapp/VAADIN/themes/valo/addons.scss deleted file mode 100644 index a5670b70c7ea..000000000000 --- a/libraries/src/main/webapp/VAADIN/themes/valo/addons.scss +++ /dev/null @@ -1,7 +0,0 @@ -/* This file is automatically managed and will be overwritten from time to time. */ -/* Do not manually edit this file. */ - -/* Import and include this mixin into your project theme to include the addon themes */ -@mixin addons { -} - diff --git a/testing/pom.xml b/testing/pom.xml index aa10392aa897..bfd47dbc4a18 100644 --- a/testing/pom.xml +++ b/testing/pom.xml @@ -45,6 +45,12 @@ test + + info.cukes + cucumber-java8 + ${cucumber.version} + test + org.pitest diff --git a/testing/src/test/java/com/baeldung/testing/shopping/ShoppingIntegrationTest.java b/testing/src/test/java/com/baeldung/testing/shopping/ShoppingIntegrationTest.java new file mode 100644 index 000000000000..7bf8641ed6fb --- /dev/null +++ b/testing/src/test/java/com/baeldung/testing/shopping/ShoppingIntegrationTest.java @@ -0,0 +1,12 @@ +package com.baeldung.testing.shopping; + +import org.junit.runner.RunWith; + +import cucumber.api.CucumberOptions; +import cucumber.api.junit.Cucumber; + +@RunWith(Cucumber.class) +@CucumberOptions(features = { "classpath:features/shopping.feature" }) +public class ShoppingIntegrationTest { + +} diff --git a/testing/src/test/java/com/baeldung/testing/shopping/ShoppingStepsDef.java b/testing/src/test/java/com/baeldung/testing/shopping/ShoppingStepsDef.java new file mode 100644 index 000000000000..2c4bf2eeaef4 --- /dev/null +++ b/testing/src/test/java/com/baeldung/testing/shopping/ShoppingStepsDef.java @@ -0,0 +1,22 @@ +package com.baeldung.testing.shopping; + +import static org.junit.Assert.assertEquals; +import cucumber.api.java8.En; + +public class ShoppingStepsDef implements En { + + private int budget = 0; + + public ShoppingStepsDef() { + + Given("I have (\\d+) in my wallet", (Integer money) -> budget = money); + + When("I buy .* with (\\d+)", (Integer price) -> budget -= price); + + Then("I should have (\\d+) in my wallet", (Integer finalBudget) -> { + assertEquals(budget, finalBudget.intValue()); + }); + + } + +} \ No newline at end of file diff --git a/testing/src/test/resources/features/shopping.feature b/testing/src/test/resources/features/shopping.feature new file mode 100644 index 000000000000..d1ce43df754a --- /dev/null +++ b/testing/src/test/resources/features/shopping.feature @@ -0,0 +1,11 @@ +Feature: Shopping + + Scenario: Track my budget + Given I have 100 in my wallet + When I buy milk with 10 + Then I should have 90 in my wallet + + Scenario: Track my budget + Given I have 200 in my wallet + When I buy rice with 20 + Then I should have 180 in my wallet diff --git a/vaadin/pom.xml b/vaadin/pom.xml new file mode 100644 index 000000000000..6d3512ba2ddb --- /dev/null +++ b/vaadin/pom.xml @@ -0,0 +1,173 @@ + + + 4.0.0 + + org.test + vaadin-app + war + 1.0-SNAPSHOT + vaadin-app + + + 3 + + + + 7.7.10 + 8.0.6 + 9.3.9.v20160517 + UTF-8 + 1.8 + 1.8 + local + mytheme + + + + + vaadin-addons + http://maven.vaadin.com/vaadin-addons + + + + + + + com.vaadin + vaadin-bom + ${vaadin.version} + pom + import + + + + + + + javax.servlet + javax.servlet-api + 3.0.1 + provided + + + com.vaadin + vaadin-server + + + com.vaadin + vaadin-push + + + com.vaadin + vaadin-client-compiled + + + com.vaadin + vaadin-themes + + + + + + + org.apache.maven.plugins + maven-war-plugin + 3.0.0 + + false + + WEB-INF/classes/VAADIN/widgetsets/WEB-INF/** + + + + com.vaadin + vaadin-maven-plugin + ${vaadin.plugin.version} + + + + update-theme + update-widgetset + compile + + compile-theme + + + + + + org.apache.maven.plugins + maven-clean-plugin + 3.0.0 + + + + + src/main/webapp/VAADIN/themes + + **/styles.css + **/styles.scss.cache + + + + + + + + + org.eclipse.jetty + jetty-maven-plugin + ${jetty.plugin.version} + + 2 + + + + + + + + + vaadin-prerelease + + false + + + + + vaadin-prereleases + http://maven.vaadin.com/vaadin-prereleases + + + vaadin-snapshots + https://oss.sonatype.org/content/repositories/vaadin-snapshots/ + + false + + + true + + + + + + vaadin-prereleases + http://maven.vaadin.com/vaadin-prereleases + + + vaadin-snapshots + https://oss.sonatype.org/content/repositories/vaadin-snapshots/ + + false + + + true + + + + + + + diff --git a/libraries/src/main/java/com/baeldung/vaadin/BindData.java b/vaadin/src/main/java/com/baeldung/introduction/BindData.java similarity index 89% rename from libraries/src/main/java/com/baeldung/vaadin/BindData.java rename to vaadin/src/main/java/com/baeldung/introduction/BindData.java index bcdc4eee71db..299554c03963 100644 --- a/libraries/src/main/java/com/baeldung/vaadin/BindData.java +++ b/vaadin/src/main/java/com/baeldung/introduction/BindData.java @@ -1,4 +1,4 @@ -package com.baeldung.vaadin; +package com.baeldung.introduction; public class BindData { diff --git a/libraries/src/main/java/com/baeldung/vaadin/VaadinUI.java b/vaadin/src/main/java/com/baeldung/introduction/VaadinUI.java similarity index 99% rename from libraries/src/main/java/com/baeldung/vaadin/VaadinUI.java rename to vaadin/src/main/java/com/baeldung/introduction/VaadinUI.java index 68e2ca794434..1b3733ad741a 100644 --- a/libraries/src/main/java/com/baeldung/vaadin/VaadinUI.java +++ b/vaadin/src/main/java/com/baeldung/introduction/VaadinUI.java @@ -1,4 +1,4 @@ -package com.baeldung.vaadin; +package com.baeldung.introduction; import java.time.Instant; import java.util.ArrayList; @@ -278,4 +278,4 @@ protected void init(VaadinRequest vaadinRequest) { @VaadinServletConfiguration(ui = VaadinUI.class, productionMode = false) public static class MyUIServlet extends VaadinServlet { } -} \ No newline at end of file +} diff --git a/vaadin/src/main/resources/README b/vaadin/src/main/resources/README new file mode 100644 index 000000000000..faabc74ad584 --- /dev/null +++ b/vaadin/src/main/resources/README @@ -0,0 +1 @@ +Please add your static resources here diff --git a/libraries/src/main/webapp/VAADIN/themes/mytheme/addons.scss b/vaadin/src/main/webapp/VAADIN/themes/mytheme/addons.scss similarity index 100% rename from libraries/src/main/webapp/VAADIN/themes/mytheme/addons.scss rename to vaadin/src/main/webapp/VAADIN/themes/mytheme/addons.scss diff --git a/libraries/src/main/webapp/VAADIN/themes/mytheme/favicon.ico b/vaadin/src/main/webapp/VAADIN/themes/mytheme/favicon.ico similarity index 100% rename from libraries/src/main/webapp/VAADIN/themes/mytheme/favicon.ico rename to vaadin/src/main/webapp/VAADIN/themes/mytheme/favicon.ico diff --git a/libraries/src/main/webapp/VAADIN/themes/mytheme/mytheme.scss b/vaadin/src/main/webapp/VAADIN/themes/mytheme/mytheme.scss similarity index 100% rename from libraries/src/main/webapp/VAADIN/themes/mytheme/mytheme.scss rename to vaadin/src/main/webapp/VAADIN/themes/mytheme/mytheme.scss diff --git a/libraries/src/main/webapp/VAADIN/themes/mytheme/styles.css b/vaadin/src/main/webapp/VAADIN/themes/mytheme/styles.css similarity index 100% rename from libraries/src/main/webapp/VAADIN/themes/mytheme/styles.css rename to vaadin/src/main/webapp/VAADIN/themes/mytheme/styles.css diff --git a/libraries/src/main/webapp/VAADIN/themes/mytheme/styles.scss b/vaadin/src/main/webapp/VAADIN/themes/mytheme/styles.scss similarity index 100% rename from libraries/src/main/webapp/VAADIN/themes/mytheme/styles.scss rename to vaadin/src/main/webapp/VAADIN/themes/mytheme/styles.scss From cc76610e8852a9f2539507f4826d8e676cfe16b0 Mon Sep 17 00:00:00 2001 From: Zarathustra Date: Tue, 25 Jul 2017 10:12:09 +0100 Subject: [PATCH 6/8] Merged pom.xml --- libraries/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/pom.xml b/libraries/pom.xml index 7647f6bf624b..1ecefde1d451 100644 --- a/libraries/pom.xml +++ b/libraries/pom.xml @@ -489,4 +489,4 @@ 1.6.0 1.7.1 - \ No newline at end of file + From ba519a7cfa92542ec5e20d309acf87ccc166455b Mon Sep 17 00:00:00 2001 From: Zarathustra Date: Tue, 25 Jul 2017 10:13:38 +0100 Subject: [PATCH 7/8] Merged pom.xml --- libraries/pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/libraries/pom.xml b/libraries/pom.xml index 1ecefde1d451..c5e1f64594a8 100644 --- a/libraries/pom.xml +++ b/libraries/pom.xml @@ -7,7 +7,6 @@ 1.0.0-SNAPSHOT 4.0.0 - libraries libraries From 5e31c399f7aa62af18770f88a1e6fd27b98b0219 Mon Sep 17 00:00:00 2001 From: Zarathustra Date: Tue, 25 Jul 2017 10:26:19 +0100 Subject: [PATCH 8/8] libraries pom.xml - I removed a white space during merge so conflict persisted - here's the temporary reversion --- libraries/pom.xml | 47 +++-------------------------------------------- 1 file changed, 3 insertions(+), 44 deletions(-) diff --git a/libraries/pom.xml b/libraries/pom.xml index c5e1f64594a8..11c9d510af5e 100644 --- a/libraries/pom.xml +++ b/libraries/pom.xml @@ -7,6 +7,7 @@ 1.0.0-SNAPSHOT 4.0.0 + libraries libraries @@ -70,51 +71,9 @@ - - - org.apache.maven.plugins - maven-jar-plugin - 3.0.2 - - - **/log4j.properties - - - - com.baeldung.neuroph.NeurophXOR - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.18.1 - - - test - test - - test - - - - test/java/com/baeldung/neuroph/XORTest.java - - - - - - - - - org.beykery - neuroph - ${neuroph.version} - cglib @@ -368,6 +327,7 @@ quartz 2.3.0 + one.util streamex @@ -472,7 +432,6 @@ 2.5 1.2.0 2.8.5 - 2.92 1.4.0 1.24.0 1.1.3-rc.5 @@ -488,4 +447,4 @@ 1.6.0 1.7.1 - + \ No newline at end of file