Do not include byte-buddy META-INF in shade
[mdsal.git] / binding / mdsal-binding-dom-codec / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- vi: set et smarttab sw=4 tabstop=4: -->
3 <!--
4  Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
5
6  This program and the accompanying materials are made available under the
7  terms of the Eclipse Public License v1.0 which accompanies this distribution,
8  and is available at http://www.eclipse.org/legal/epl-v10.html
9 -->
10 <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">
11     <modelVersion>4.0.0</modelVersion>
12     <parent>
13         <groupId>org.opendaylight.mdsal</groupId>
14         <artifactId>dom-parent</artifactId>
15         <version>5.0.0-SNAPSHOT</version>
16         <relativePath>../../dom/dom-parent</relativePath>
17     </parent>
18
19     <artifactId>mdsal-binding-dom-codec</artifactId>
20     <packaging>bundle</packaging>
21
22     <properties>
23         <shade.source>net.bytebuddy</shade.source>
24         <shade.target>org.opendaylight.mdsal.binding.dom.codec.jar.bytebuddy</shade.target>
25     </properties>
26
27     <dependencies>
28         <dependency>
29             <!-- We are going to shade this -->
30             <groupId>net.bytebuddy</groupId>
31             <artifactId>byte-buddy</artifactId>
32             <version>1.9.14</version>
33         </dependency>
34         <dependency>
35             <groupId>org.opendaylight.mdsal</groupId>
36             <artifactId>mdsal-binding-generator-impl</artifactId>
37         </dependency>
38         <dependency>
39             <groupId>org.opendaylight.yangtools</groupId>
40             <artifactId>yang-data-impl</artifactId>
41         </dependency>
42         <dependency>
43             <groupId>org.opendaylight.mdsal</groupId>
44             <artifactId>mdsal-binding-generator-api</artifactId>
45         </dependency>
46         <dependency>
47             <groupId>org.opendaylight.mdsal</groupId>
48             <artifactId>mdsal-binding-test-model</artifactId>
49         </dependency>
50
51         <dependency>
52             <groupId>com.google.guava</groupId>
53             <artifactId>guava</artifactId>
54         </dependency>
55         <dependency>
56             <groupId>org.opendaylight.yangtools</groupId>
57             <artifactId>mockito-configuration</artifactId>
58         </dependency>
59     </dependencies>
60
61     <build>
62         <plugins>
63             <plugin>
64                 <groupId>org.apache.felix</groupId>
65                 <artifactId>maven-bundle-plugin</artifactId>
66                 <extensions>true</extensions>
67                 <configuration>
68                     <instructions>
69                         <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
70                         <Export-Package>
71                             org.opendaylight.mdsal.binding.dom.codec.*,
72                             ;-split-package:=error
73                         </Export-Package>
74                         <Private-Package>
75                             org.opendaylight.mdsal.binding.dom.codec.loader,
76                         </Private-Package>
77                         <Import-Package>
78                             !net.bytebuddy.*,
79                             *
80                         </Import-Package>
81                     </instructions>
82                 </configuration>
83             </plugin>
84
85             <!-- Shade Byte-Buddy -->
86             <plugin>
87                 <groupId>org.apache.maven.plugins</groupId>
88                 <artifactId>maven-shade-plugin</artifactId>
89                 <executions>
90                     <execution>
91                         <phase>package</phase>
92                         <goals>
93                             <goal>shade</goal>
94                         </goals>
95                         <configuration>
96                             <shadedArtifactAttached>false</shadedArtifactAttached>
97                             <createDependencyReducedPom>true</createDependencyReducedPom>
98                             <createSourcesJar>true</createSourcesJar>
99                             <shadeSourcesContent>true</shadeSourcesContent>
100                             <minimizeJar>true</minimizeJar>
101                             <relocations>
102                                 <relocation>
103                                     <pattern>${shade.source}</pattern>
104                                     <shadedPattern>${shade.target}</shadedPattern>
105                                 </relocation>
106                             </relocations>
107                             <artifactSet>
108                                 <includes>
109                                     <include>net.bytebuddy:byte-buddy</include>
110                                 </includes>
111                             </artifactSet>
112                             <filters>
113                                 <filter>
114                                     <artifact>net.bytebuddy:byte-buddy</artifact>
115                                     <excludes>
116                                         <exclude>META-INF/**</exclude>
117                                     </excludes>
118                                 </filter>
119                             </filters>
120                         </configuration>
121                     </execution>
122                 </executions>
123             </plugin>
124
125             <plugin>
126                 <groupId>org.apache.maven.plugins</groupId>
127                 <artifactId>maven-checkstyle-plugin</artifactId>
128                 <configuration>
129                     <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
130                 </configuration>
131             </plugin>
132             <plugin>
133                 <groupId>com.github.spotbugs</groupId>
134                 <artifactId>spotbugs-maven-plugin</artifactId>
135                 <configuration>
136                     <failOnError>true</failOnError>
137                 </configuration>
138             </plugin>
139         </plugins>
140     </build>
141 </project>