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>
<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>
<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>
<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>
</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>
<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>
<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>
--- /dev/null
+<?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>
<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>