Add odl-mdsal-bytebuddy 41/100641/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 18 Apr 2022 17:48:21 +0000 (19:48 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 18 Apr 2022 17:50:06 +0000 (19:50 +0200)
Rather than shading byte-buddy, provide it in a separate feature.
This will allow packagers better control of the runtime we link to
and allow it to be reused.

JIRA: MDSAL-747
Change-Id: Id25acfdb24cce9ce2529b0ac8706b8f00671ed7b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
artifacts/pom.xml
binding/mdsal-binding-dom-codec/pom.xml
dom/dom-parent/pom.xml
features/feature-parent/pom.xml
features/features-mdsal/pom.xml
features/odl-mdsal-binding-runtime/pom.xml
features/odl-mdsal-bytebuddy/pom.xml [new file with mode: 0644]
features/pom.xml

index f9a5323bcc6317c7bc2cc19debcb80b33ef74ed2..3e993dbeb0866a25bb73e5edd3ba45b10e51d368 100644 (file)
                 <type>xml</type>
             </dependency>
 
+            <!-- ByteBuddy -->
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>odl-mdsal-bytebuddy</artifactId>
+                <version>10.0.0-SNAPSHOT</version>
+                <classifier>features</classifier>
+                <type>xml</type>
+            </dependency>
+
             <!-- COMMON -->
             <dependency>
                 <groupId>${project.groupId}</groupId>
index 3147e0c7f5be65892108f6aad88ab729783e2f40..878c139532a4a2181258501de957f0c7a9c4e428 100644 (file)
 
     <dependencies>
         <dependency>
-            <!-- We are going to shade this -->
             <groupId>net.bytebuddy</groupId>
             <artifactId>byte-buddy</artifactId>
-            <version>1.12.8</version>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
                             org.opendaylight.mdsal.binding.dom.codec.impl,
                             org.opendaylight.mdsal.binding.dom.codec.loader,
                         </Private-Package>
-                        <Import-Package>
-                            !net.bytebuddy.*,
-                            *
-                        </Import-Package>
                     </instructions>
                 </configuration>
             </plugin>
-
-            <!-- Shade Byte-Buddy -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <shadedArtifactAttached>false</shadedArtifactAttached>
-                            <createDependencyReducedPom>true</createDependencyReducedPom>
-                            <createSourcesJar>true</createSourcesJar>
-                            <shadeSourcesContent>true</shadeSourcesContent>
-                            <minimizeJar>true</minimizeJar>
-                            <relocations>
-                                <relocation>
-                                    <pattern>${shade.source}</pattern>
-                                    <shadedPattern>${shade.target}</shadedPattern>
-                                </relocation>
-                            </relocations>
-                            <artifactSet>
-                                <includes>
-                                    <include>net.bytebuddy:byte-buddy</include>
-                                </includes>
-                            </artifactSet>
-                            <filters>
-                                <filter>
-                                    <artifact>net.bytebuddy:byte-buddy</artifact>
-                                    <excludes>
-                                        <exclude>META-INF/**</exclude>
-                                    </excludes>
-                                </filter>
-                            </filters>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
 </project>
index 651dfbd57fba48caf0f7f52fafd75c1eb13ebf16..8d0685a46a1190ed0be1c4bc8d1efb5bd5a6dad1 100644 (file)
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
+            <dependency>
+                <groupId>net.bytebuddy</groupId>
+                <artifactId>byte-buddy</artifactId>
+                <version>1.12.8</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 </project>
index 4ab8a2b3f5ceda1589a23c65e8e2753e98ed9cc1..4ac7e90bd13654d1d0b37ce7f09c1d96db426d90 100644 (file)
@@ -33,7 +33,7 @@
             </dependency>
             <dependency>
                 <groupId>org.opendaylight.mdsal</groupId>
-                <artifactId>mdsal-artifacts</artifactId>
+                <artifactId>dom-parent</artifactId>
                 <version>10.0.0-SNAPSHOT</version>
                 <type>pom</type>
                 <scope>import</scope>
index f4458b9acf016263b65354f37792271f340c3061..9c72a664f69437987f87391ef45a3b82cd12d6ba 100644 (file)
             <type>xml</type>
         </dependency>
 
+        <!-- ByteBuddy -->
+        <dependency>
+            <groupId>org.opendaylight.mdsal</groupId>
+            <artifactId>odl-mdsal-bytebuddy</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+        </dependency>
+
         <!-- Common -->
         <dependency>
             <groupId>org.opendaylight.mdsal</groupId>
index 75fcc3a1462cb82c96c9c8e9825405dcd8b82786..6b807d774ae8b0fbfcffd1e4c2feca0612017853 100644 (file)
     <description>MD-SAL Java Binding runtime</description>
 
     <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.mdsal</groupId>
+            <artifactId>odl-mdsal-bytebuddy</artifactId>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
         <dependency>
             <groupId>org.opendaylight.mdsal</groupId>
             <artifactId>odl-mdsal-dom-runtime</artifactId>
         <dependency>
             <groupId>org.opendaylight.mdsal</groupId>
             <artifactId>mdsal-binding-dom-codec</artifactId>
-            <exclusions>
-                <exclusion>
-                    <!-- This dependency is shaded, but the build reactor
-                         still sees it, hence we need to explicitly exclude it -->
-                    <groupId>net.bytebuddy</groupId>
-                    <artifactId>byte-buddy</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.mdsal</groupId>
diff --git a/features/odl-mdsal-bytebuddy/pom.xml b/features/odl-mdsal-bytebuddy/pom.xml
new file mode 100644 (file)
index 0000000..1fb29a7
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2016, 2017 Red Hat, Inc. and others.  All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+ -->
+<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>
+    <parent>
+        <groupId>org.opendaylight.mdsal</groupId>
+        <artifactId>feature-parent</artifactId>
+        <version>10.0.0-SNAPSHOT</version>
+        <relativePath>../feature-parent</relativePath>
+    </parent>
+
+    <artifactId>odl-mdsal-bytebuddy</artifactId>
+    <packaging>feature</packaging>
+    <name>OpenDaylight :: MD-SAL :: ByteBuddy</name>
+    <description>byte-buddy</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>net.bytebuddy</groupId>
+            <artifactId>byte-buddy</artifactId>
+        </dependency>
+    </dependencies>
+</project>
index ed2deec6500cdc111942d0e2781586eeacb7752a..c5bf43075f8f632ce4fa6cda59005fc2a0e66169 100644 (file)
@@ -35,6 +35,9 @@
         <module>odl-mdsal-binding-runtime</module>
         <module>odl-mdsal-binding-runtime-api</module>
 
+        <!-- ByteBuddy -->
+        <module>odl-mdsal-bytebuddy</module>
+
         <!-- Common -->
         <module>odl-mdsal-common</module>