Repository: iluwatar/java-design-patterns
Issue: Redundant dependency declarations on child poms
Labels: info: good first issue
epic: dependencies
type: refactoring

I've noticed that there are redeclaration of dependencies (e.g: junit 5 engine/mockito) on our modules. I don't think we'll be needing those since they are already specified on the parent pom.

Might be a good idea to have an issue that will do cleanups on child poms. Wdyt? @iluwatar 

Issue comments:
@jjjimenez100 yes I think we should clean up. Can you point out some example where this redeclaration occurs?
Looking at the parent pom, we already have the `mockito-core` dependency specified in [here](https://github.com/iluwatar/java-design-patterns/blob/master/pom.xml#L276).

Some of the child poms like [this](https://github.com/iluwatar/java-design-patterns/blob/master/decorator/pom.xml#L43) and [this](https://github.com/iluwatar/java-design-patterns/blob/master/observer/pom.xml#L48) seem to redeclare the same dependency (Same goes for the jupiter engine ones)

I think that example is just how Maven's dependency management works (see https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Management)
Can I take this issue?
Ok @akrystian 
I found two probably not needed dependencies:
- `spring-boot-dependencies` 
- `javassist`

I can try remove it.

Pull request review comments:

Patch that resolved the issue:
diff --git a/cqrs/pom.xml b/cqrs/pom.xml
index b3afda05c226..feab9d1acacb 100644
--- a/cqrs/pom.xml
+++ b/cqrs/pom.xml
@@ -50,8 +50,8 @@
 		<dependency>
 			<groupId>com.sun.xml.bind</groupId>
 			<artifactId>jaxb-impl</artifactId>
-			<scope>test</scope>
 			<version>2.1.17</version>
+			<scope>test</scope>
 		</dependency>
 		<dependency>
 			<groupId>javax.xml.bind</groupId>
diff --git a/eip-aggregator/pom.xml b/eip-aggregator/pom.xml
index 3410b4504379..e4b96d0aa75d 100644
--- a/eip-aggregator/pom.xml
+++ b/eip-aggregator/pom.xml
@@ -43,7 +43,6 @@
         <dependency>
             <groupId>org.apache.camel</groupId>
             <artifactId>camel-core</artifactId>
-            <version>${camel.version}</version>
         </dependency>
 
         <dependency>
diff --git a/eip-splitter/pom.xml b/eip-splitter/pom.xml
index 906a43d22a27..6aef2dc09953 100644
--- a/eip-splitter/pom.xml
+++ b/eip-splitter/pom.xml
@@ -43,7 +43,6 @@
         <dependency>
             <groupId>org.apache.camel</groupId>
             <artifactId>camel-core</artifactId>
-            <version>${camel.version}</version>
         </dependency>
 
         <dependency>
diff --git a/eip-wire-tap/pom.xml b/eip-wire-tap/pom.xml
index f44bbd232979..ae896f0d0399 100644
--- a/eip-wire-tap/pom.xml
+++ b/eip-wire-tap/pom.xml
@@ -43,7 +43,6 @@
         <dependency>
             <groupId>org.apache.camel</groupId>
             <artifactId>camel-core</artifactId>
-            <version>${camel.version}</version>
         </dependency>
 
         <dependency>
diff --git a/trampoline/pom.xml b/trampoline/pom.xml
index a0f25fc39b56..99ef231ef534 100644
--- a/trampoline/pom.xml
+++ b/trampoline/pom.xml
@@ -38,7 +38,6 @@
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
-            <version>4.12</version>
             <scope>test</scope>
         </dependency>
 


Test patch: