Do not pull in javax.inject into runtime 55/91655/2
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 26 Jul 2020 13:52:47 +0000 (15:52 +0200)
committerHema Gopalakrishnan <hema.gopalkrishnan@ericsson.com>
Mon, 3 Aug 2020 12:09:10 +0000 (12:09 +0000)
We are not using injection on OSGi runtime, we should be relying on it
being provided by the injectipn framework when needed. Also minimize
dependencies on infrautils' inject.

JIRA: INFRAUTILS-65
Change-Id: I91010efe1139a12f8e8bc90765d1a555a748dcc2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 files changed:
alivenessmonitor/alivenessmonitor-impl-protocols/pom.xml
arputil/arputil-impl/pom.xml
cloudscaler/api/pom.xml
cloudscaler/impl/pom.xml
features/odl-genius-api/pom.xml
features/odl-genius-fcaps-application/pom.xml
ipv6util/api/pom.xml
ipv6util/impl/pom.xml
lockmanager/lockmanager-impl/pom.xml
mdsalutil/mdsalutil-api/pom.xml
mdsalutil/mdsalutil-impl/pom.xml
networkutils/networkutils/pom.xml

index 6b5b34d1898eadd0b74562a1687d0ddd97d64cdc..c7077a9fe172a42df24da739206776d554aacf5f 100644 (file)
@@ -49,6 +49,12 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <artifactId>blueprint-maven-plugin-annotation</artifactId>
       <optional>true</optional>
     </dependency>
+    <dependency>
+      <groupId>javax.inject</groupId>
+      <artifactId>javax.inject</artifactId>
+      <scope>provided</scope>
+      <optional>true</optional>
+    </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
index 15602df98941e48c4efb2d6617ea43d8b986e913..7b00bc41108883d1fba23b3f4339586545f23785 100644 (file)
@@ -78,9 +78,15 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <groupId>org.opendaylight.infrautils</groupId>
       <artifactId>metrics-api</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.opendaylight.infrautils</groupId>
+      <artifactId>inject</artifactId>
+    </dependency>
     <dependency>
       <groupId>javax.inject</groupId>
       <artifactId>javax.inject</artifactId>
+      <scope>provided</scope>
+      <optional>true</optional>
     </dependency>
     <!-- Testing Dependencies -->
     <dependency>
index 811434240e2b1de264674595c6fe48897e6c2c2d..a8f50f49703d135828377059fb4d3fd5b0129733 100644 (file)
@@ -54,9 +54,5 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <groupId>commons-net</groupId>
       <artifactId>commons-net</artifactId>
     </dependency>
-    <dependency>
-      <groupId>javax.inject</groupId>
-      <artifactId>javax.inject</artifactId>
-    </dependency>
   </dependencies>
 </project>
index 06a774630bb0bc401459ac253061049483952bc9..16492a3e65fa522db611073dc983508a56ce3b7f 100644 (file)
@@ -89,6 +89,8 @@
     <dependency>
       <groupId>javax.inject</groupId>
       <artifactId>javax.inject</artifactId>
+      <scope>provided</scope>
+      <optional>true</optional>
     </dependency>
     <dependency>
       <groupId>javax.annotation</groupId>
index 4da0a3b3c8a1798fa0bf280c0d46b8f81be82e68..184de66206bb25f63b7c79fc3e183ea40339b3d8 100644 (file)
       <type>xml</type>
       <classifier>features</classifier>
     </dependency>
-    <dependency>
-      <groupId>org.opendaylight.infrautils</groupId>
-      <artifactId>odl-infrautils-inject</artifactId>
-      <type>xml</type>
-      <classifier>features</classifier>
-    </dependency>
     <dependency>
       <groupId>org.opendaylight.infrautils</groupId>
       <artifactId>odl-infrautils-jobcoordinator</artifactId>
index 59cc50614d87ba2baead97fe69b641e241610991..91bc901d29e9c883cbc6da15be0558cc2e493a0a 100644 (file)
       <classifier>features</classifier>
     </dependency>
 
-    <!-- External libraries to wrap -->
-    <dependency>
-      <groupId>javax.inject</groupId>
-      <artifactId>javax.inject</artifactId>
-    </dependency>
-
     <!-- Bundles from this project -->
     <dependency>
       <groupId>org.opendaylight.genius</groupId>
index 26326b74e5ce3e37eedf0866d7a83b1127e1bb34..58497fb78fb734c880f4ec65d9b85c414648c839 100644 (file)
@@ -40,10 +40,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <groupId>org.opendaylight.mdsal.model</groupId>
       <artifactId>yang-ext</artifactId>
     </dependency>
-    <dependency>
-      <groupId>javax.inject</groupId>
-      <artifactId>javax.inject</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
index 19f2263b14227b3335ea619544085931d73d3f1e..1653daf2d8e61d738c54d62ad429859b6598e97f 100644 (file)
@@ -35,6 +35,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <dependency>
       <groupId>javax.inject</groupId>
       <artifactId>javax.inject</artifactId>
+      <scope>provided</scope>
+      <optional>true</optional>
     </dependency>
   </dependencies>
   <build>
index 7a511952952fe3f9e65fc2c386e2b7f1621ba42d..104947fd5f371a57aa886aa328cbbd4445c88634 100644 (file)
@@ -41,6 +41,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <dependency>
       <groupId>javax.inject</groupId>
       <artifactId>javax.inject</artifactId>
+      <scope>provided</scope>
+      <optional>true</optional>
     </dependency>
     <dependency>
       <groupId>javax.annotation</groupId>
index 165ca228032f1afc9994a801daaf1b7f886b340b..3b3fedcff864576f125d8f95b3902dbb6f07f2f2 100644 (file)
@@ -91,8 +91,10 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <artifactId>infrautils-util</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.opendaylight.infrautils</groupId>
-      <artifactId>inject</artifactId>
+      <groupId>javax.inject</groupId>
+      <artifactId>javax.inject</artifactId>
+      <scope>provided</scope>
+      <optional>true</optional>
     </dependency>
     <dependency>
       <groupId>javax.annotation</groupId>
index 642885c8413303f4df58a2567dd7b6aebb7fc5ff..0c1161fae271d7d7974f760438ac1446bbb72434 100644 (file)
@@ -43,6 +43,10 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <groupId>org.opendaylight.openflowplugin.model</groupId>
       <artifactId>model-flow-service</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.opendaylight.infrautils</groupId>
+      <artifactId>inject</artifactId>
+    </dependency>
     <dependency>
       <groupId>javax.inject</groupId>
       <artifactId>javax.inject</artifactId>
index 18f157703b448af15b41f8ebe9e0d479c2ee587f..36e5cd9f780ab7acd6497329e8156f3cdfa47db7 100644 (file)
@@ -51,6 +51,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <dependency>
       <groupId>javax.inject</groupId>
       <artifactId>javax.inject</artifactId>
+      <scope>provided</scope>
+      <optional>true</optional>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.genius</groupId>