Fix DLUX archetype to reduce generated jar size
[dlux.git] / archetype / src / main / resources / archetype-resources / __rootArtifactId__-bundle / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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">
3     <modelVersion>4.0.0</modelVersion>
4     <parent>
5         <artifactId>${rootArtifactId}</artifactId>
6         <groupId>${groupId}</groupId>
7         <version>${version}</version>
8     </parent>
9     <artifactId>${rootArtifactId}-bundle</artifactId>
10     <packaging>bundle</packaging>
11     <dependencies>
12         <dependency>
13             <groupId>org.osgi</groupId>
14             <artifactId>org.osgi.core</artifactId>
15             <version>${osgi.core.version}</version>
16         </dependency>
17         <dependency>
18             <groupId>org.osgi</groupId>
19             <artifactId>org.osgi.compendium</artifactId>
20             <version>${osgi.core.version}</version>
21         </dependency>
22         <dependency>
23             <groupId>org.apache.felix</groupId>
24             <artifactId>org.osgi.compendium</artifactId>
25             <version>${apache.felix.compendium}</version>
26         </dependency>
27         <dependency>
28             <groupId>org.opendaylight.dlux</groupId>
29             <artifactId>loader</artifactId>
30             <version>${dlux.loader.version}</version>
31         </dependency>
32         <dependency>
33             <groupId>${groupId}</groupId>
34             <artifactId>${rootArtifactId}-module</artifactId>
35             <version>${version}</version>
36             <scope>provided</scope>
37         </dependency>
38     </dependencies>
39     <build>
40         <resources>
41             <resource>
42                 <directory>target/generated-resources</directory>
43             </resource>
44             <resource>
45                 <directory>src/main/resources</directory>
46             </resource>
47         </resources>
48         <plugins>
49             <plugin>
50                 <groupId>org.apache.maven.plugins</groupId>
51                 <artifactId>maven-dependency-plugin</artifactId>
52                 <version>2.6</version>
53                 <executions>
54                     <!--loader Resources-->
55                     <execution>
56                         <id>unpack-loader-resources</id>
57                         <goals>
58                             <goal>unpack-dependencies</goal>
59                         </goals>
60                         <phase>generate-resources</phase>
61                         <configuration>
62                             <outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
63                             <groupId>${groupId}</groupId>
64                             <includeArtifactIds>${rootArtifactId}-module</includeArtifactIds>
65                             <excludes>META-INF\/**,*/node\/**,*/node_modules\/**</excludes>
66                             <excludeTransitive>true</excludeTransitive>
67                             <ignorePermissions>false</ignorePermissions>
68                         </configuration>
69                     </execution>
70                 </executions>
71             </plugin>
72             <plugin>
73                 <groupId>org.apache.felix</groupId>
74                 <artifactId>maven-bundle-plugin</artifactId>
75                 <extensions>true</extensions>
76                 <configuration>
77                     <instructions>
78                         <Import-Package>org.osgi.service.http,
79                             org.osgi.framework;version="1.0.0",
80                             org.opendaylight.dlux.loader
81                         </Import-Package>
82                         <Export-Package></Export-Package>
83                     </instructions>
84                 </configuration>
85             </plugin>
86         </plugins>
87     </build>
88 </project>