Bundle all jars with distro
[integration/distribution.git] / distributions / extra / karaf / 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       <groupId>org.opendaylight.integration</groupId>
6       <artifactId>root</artifactId>
7       <version>0.2.0-SNAPSHOT</version>
8       <relativePath>../../../</relativePath>
9    </parent>
10   <artifactId>distribution-karaf</artifactId>
11   <packaging>pom</packaging>
12   <prerequisites>
13     <maven>3.0</maven>
14   </prerequisites>
15   <properties>
16     <branding.version>1.0.0-SNAPSHOT</branding.version>
17     <karaf.resources.version>1.4.2-SNAPSHOT</karaf.resources.version>
18   </properties>
19
20   <dependencies>
21     <dependency>
22       <!-- scope is compile so all features (there is only one) are installed
23             into startup.properties and the feature repo itself is not installed -->
24       <groupId>org.apache.karaf.features</groupId>
25       <artifactId>framework</artifactId>
26       <version>${karaf.version}</version>
27       <type>kar</type>
28     </dependency>
29     <!-- scope is runtime so the feature repo is listed in the features
30       service config file, and features may be installed using the
31       karaf-maven-plugin configuration -->
32     <dependency>
33       <groupId>org.apache.karaf.features</groupId>
34       <artifactId>standard</artifactId>
35       <version>${karaf.version}</version>
36       <classifier>features</classifier>
37       <type>xml</type>
38       <scope>runtime</scope>
39     </dependency>
40
41     <!-- ODL Branding -->
42     <dependency>
43       <groupId>org.opendaylight.controller</groupId>
44       <artifactId>karaf.branding</artifactId>
45       <version>${branding.version}</version>
46       <scope>compile</scope>
47     </dependency>
48
49     <!-- Resources needed -->
50     <dependency>
51       <groupId>org.opendaylight.controller</groupId>
52       <artifactId>opendaylight-karaf-resources</artifactId>
53       <version>${karaf.resources.version}</version>
54     </dependency>
55
56     <!-- integration feature -->
57     <dependency>
58       <artifactId>features-integration</artifactId>
59       <groupId>org.opendaylight.integration</groupId>
60       <version>${project.version}</version>
61       <classifier>features</classifier>
62       <type>xml</type>
63       <scope>runtime</scope>
64     </dependency>
65   </dependencies>
66
67   <build>
68     <pluginManagement>
69       <plugins>
70         <plugin>
71           <groupId>org.eclipse.m2e</groupId>
72           <artifactId>lifecycle-mapping</artifactId>
73           <version>1.0.0</version>
74           <configuration>
75             <lifecycleMappingMetadata>
76               <pluginExecutions>
77                 <pluginExecution>
78                   <pluginExecutionFilter>
79                     <groupId>org.apache.felix</groupId>
80                     <artifactId>maven-bundle-plugin</artifactId>
81                     <versionRange>[0,)</versionRange>
82                     <goals>
83                       <goal>cleanVersions</goal>
84                     </goals>
85                   </pluginExecutionFilter>
86                   <action>
87                     <ignore></ignore>
88                   </action>
89                 </pluginExecution>
90                 <pluginExecution>
91                   <pluginExecutionFilter>
92                     <groupId>org.apache.maven.plugins</groupId>
93                     <artifactId>maven-dependency-plugin</artifactId>
94                     <versionRange>[0,)</versionRange>
95                     <goals>
96                       <goal>copy</goal>
97                       <goal>unpack</goal>
98                     </goals>
99                   </pluginExecutionFilter>
100                   <action>
101                     <ignore></ignore>
102                   </action>
103                 </pluginExecution>
104                 <pluginExecution>
105                   <pluginExecutionFilter>
106                     <groupId>org.apache.karaf.tooling</groupId>
107                     <artifactId>karaf-maven-plugin</artifactId>
108                     <versionRange>[0,)</versionRange>
109                     <goals>
110                       <goal>commands-generate-help</goal>
111                     </goals>
112                   </pluginExecutionFilter>
113                   <action>
114                     <ignore></ignore>
115                   </action>
116                 </pluginExecution>
117                 <pluginExecution>
118                   <pluginExecutionFilter>
119                     <groupId>org.fusesource.scalate</groupId>
120                     <artifactId>maven-scalate-plugin</artifactId>
121                     <versionRange>[0,)</versionRange>
122                     <goals>
123                       <goal>sitegen</goal>
124                     </goals>
125                   </pluginExecutionFilter>
126                   <action>
127                     <ignore></ignore>
128                   </action>
129                 </pluginExecution>
130                 <pluginExecution>
131                   <pluginExecutionFilter>
132                     <groupId>org.apache.servicemix.tooling</groupId>
133                     <artifactId>depends-maven-plugin</artifactId>
134                     <versionRange>[0,)</versionRange>
135                     <goals>
136                       <goal>generate-depends-file</goal>
137                     </goals>
138                   </pluginExecutionFilter>
139                   <action>
140                     <ignore></ignore>
141                   </action>
142                 </pluginExecution>
143               </pluginExecutions>
144             </lifecycleMappingMetadata>
145           </configuration>
146         </plugin>
147       </plugins>
148     </pluginManagement>
149     <plugins>
150       <plugin>
151         <groupId>org.apache.karaf.tooling</groupId>
152         <artifactId>karaf-maven-plugin</artifactId>
153         <version>${karaf.version}</version>
154         <extensions>true</extensions>
155         <configuration>
156           <!-- no startupFeatures -->
157           <bootFeatures>
158             <feature>standard</feature>
159           </bootFeatures>
160           <!-- no installedFeatures -->
161         </configuration>
162         <executions>
163           <execution>
164             <id>process-resources</id>
165             <goals>
166               <goal>install-kars</goal>
167             </goals>
168             <phase>process-resources</phase>
169           </execution>
170           <execution>
171             <id>package</id>
172             <goals>
173               <goal>instance-create-archive</goal>
174             </goals>
175           </execution>
176         </executions>
177       </plugin>
178       <plugin>
179         <groupId>org.apache.maven.plugins</groupId>
180         <artifactId>maven-checkstyle-plugin</artifactId>
181         <version>${checkstyle.version}</version>
182         <configuration>
183           <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
184         </configuration>
185       </plugin>
186       <plugin>
187         <groupId>org.apache.maven.plugins</groupId>
188         <artifactId>maven-dependency-plugin</artifactId>
189         <version>2.6</version>
190         <executions>
191           <execution>
192             <id>copy</id>
193             <goals>
194               <goal>copy</goal>
195             </goals>
196             <!-- here the phase you need -->
197             <phase>generate-resources</phase>
198             <configuration>
199               <artifactItems>
200                 <artifactItem>
201                   <groupId>org.opendaylight.controller</groupId>
202                   <artifactId>karaf.branding</artifactId>
203                   <version>${karaf.branding.version}</version>
204                   <outputDirectory>target/assembly/lib</outputDirectory>
205                   <destFileName>karaf.branding-${branding.version}.jar</destFileName>
206                 </artifactItem>
207               </artifactItems>
208             </configuration>
209           </execution>
210           <execution>
211             <id>unpack-karaf-resources</id>
212             <goals>
213               <goal>unpack-dependencies</goal>
214             </goals>
215             <phase>prepare-package</phase>
216             <configuration>
217              <outputDirectory>${project.build.directory}/assembly</outputDirectory>
218              <groupId>org.opendaylight.controller</groupId>
219              <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
220              <excludes>META-INF\/**</excludes>
221              <excludeTransitive>true</excludeTransitive>
222              <ignorePermissions>false</ignorePermissions>
223             </configuration>
224           </execution>
225           <execution>
226             <id>copy-dependencies</id>
227             <phase>prepare-package</phase>
228             <goals>
229               <goal>copy-dependencies</goal>
230             </goals>
231             <configuration>
232               <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
233               <overWriteReleases>false</overWriteReleases>
234               <overWriteSnapshots>true</overWriteSnapshots>
235               <overWriteIfNewer>true</overWriteIfNewer>
236               <useRepositoryLayout>true</useRepositoryLayout>
237               <addParentPoms>true</addParentPoms>
238               <copyPom>true</copyPom>
239             </configuration>
240           </execution>
241         </executions>
242       </plugin>
243       <plugin>
244         <groupId>org.apache.maven.plugins</groupId>
245         <artifactId>maven-antrun-plugin</artifactId>
246         <executions>
247             <execution>
248                 <phase>prepare-package</phase>
249                 <goals>
250                     <goal>run</goal>
251                 </goals>
252                 <configuration>
253                   <tasks>
254                     <chmod perm="755">
255                         <fileset dir="${project.build.directory}/assembly/bin">
256                           <include name="karaf"/>
257                           <include name="instance"/>
258                           <include name="start"/>
259                           <include name="stop"/>
260                           <include name="status"/>
261                           <include name="client"/>
262                           <include name="shell"/>
263                         </fileset>
264                     </chmod>
265                   </tasks>
266                 </configuration>
267             </execution>
268         </executions>
269       </plugin>
270     </plugins>
271   </build>
272   <scm>
273     <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
274     <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
275     <tag>HEAD</tag>
276     <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main</url>
277   </scm>
278 </project>