Merge "Do not override Karaf version"
[openflowplugin.git] / distribution / 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.openflowplugin</groupId>
6     <artifactId>openflowplugin-parent</artifactId>
7     <version>0.1.0-SNAPSHOT</version>
8     <relativePath>../../parent</relativePath>
9   </parent>
10   <artifactId>openflowplugin-karaf</artifactId>
11   <packaging>pom</packaging>
12   <prerequisites>
13     <maven>3.0</maven>
14   </prerequisites>
15   <properties>
16     <branding.version>1.1.0-SNAPSHOT</branding.version>
17     <karaf.resources.version>1.5.0-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     <!-- openflowplugin feature -->
57     <dependency>
58       <artifactId>features-openflowplugin</artifactId>
59       <groupId>org.opendaylight.openflowplugin</groupId>
60       <classifier>features</classifier>
61       <type>xml</type>
62       <scope>runtime</scope>
63     </dependency>
64     <!-- MD-SAL Related Features -->
65     <dependency>
66       <groupId>org.opendaylight.controller</groupId>
67       <artifactId>features-mdsal</artifactId>
68       <version>${mdsal.version}</version>
69       <classifier>features</classifier>
70       <type>xml</type>
71       <scope>runtime</scope>
72     </dependency>
73     <!-- openflowplugin extension feature -->
74     <dependency>
75       <groupId>org.opendaylight.openflowplugin</groupId>
76       <artifactId>features-openflowplugin-extension</artifactId>
77       <classifier>features</classifier>
78       <type>xml</type>
79       <scope>runtime</scope>
80     </dependency>
81   </dependencies>
82
83   <build>
84     <pluginManagement>
85       <plugins>
86         <plugin>
87           <groupId>org.eclipse.m2e</groupId>
88           <artifactId>lifecycle-mapping</artifactId>
89           <version>1.0.0</version>
90           <configuration>
91             <lifecycleMappingMetadata>
92               <pluginExecutions>
93                 <pluginExecution>
94                   <pluginExecutionFilter>
95                     <groupId>org.apache.felix</groupId>
96                     <artifactId>maven-bundle-plugin</artifactId>
97                     <versionRange>[0,)</versionRange>
98                     <goals>
99                       <goal>cleanVersions</goal>
100                     </goals>
101                   </pluginExecutionFilter>
102                   <action>
103                     <ignore></ignore>
104                   </action>
105                 </pluginExecution>
106                 <pluginExecution>
107                   <pluginExecutionFilter>
108                     <groupId>org.apache.maven.plugins</groupId>
109                     <artifactId>maven-dependency-plugin</artifactId>
110                     <versionRange>[0,)</versionRange>
111                     <goals>
112                       <goal>copy</goal>
113                       <goal>unpack</goal>
114                     </goals>
115                   </pluginExecutionFilter>
116                   <action>
117                     <ignore></ignore>
118                   </action>
119                 </pluginExecution>
120                 <pluginExecution>
121                   <pluginExecutionFilter>
122                     <groupId>org.apache.karaf.tooling</groupId>
123                     <artifactId>karaf-maven-plugin</artifactId>
124                     <versionRange>[0,)</versionRange>
125                     <goals>
126                       <goal>commands-generate-help</goal>
127                     </goals>
128                   </pluginExecutionFilter>
129                   <action>
130                     <ignore></ignore>
131                   </action>
132                 </pluginExecution>
133                 <pluginExecution>
134                   <pluginExecutionFilter>
135                     <groupId>org.fusesource.scalate</groupId>
136                     <artifactId>maven-scalate-plugin</artifactId>
137                     <versionRange>[0,)</versionRange>
138                     <goals>
139                       <goal>sitegen</goal>
140                     </goals>
141                   </pluginExecutionFilter>
142                   <action>
143                     <ignore></ignore>
144                   </action>
145                 </pluginExecution>
146                 <pluginExecution>
147                   <pluginExecutionFilter>
148                     <groupId>org.apache.servicemix.tooling</groupId>
149                     <artifactId>depends-maven-plugin</artifactId>
150                     <versionRange>[0,)</versionRange>
151                     <goals>
152                       <goal>generate-depends-file</goal>
153                     </goals>
154                   </pluginExecutionFilter>
155                   <action>
156                     <ignore></ignore>
157                   </action>
158                 </pluginExecution>
159               </pluginExecutions>
160             </lifecycleMappingMetadata>
161           </configuration>
162         </plugin>
163       </plugins>
164     </pluginManagement>
165     <plugins>
166       <plugin>
167         <groupId>org.apache.karaf.tooling</groupId>
168         <artifactId>karaf-maven-plugin</artifactId>
169         <extensions>true</extensions>
170         <configuration>
171           <!-- no startupFeatures -->
172           <bootFeatures>
173             <feature>standard</feature>
174             <feature>odl-restconf</feature>
175           </bootFeatures>
176           <!-- no installedFeatures -->
177         </configuration>
178         <executions>
179           <execution>
180             <id>process-resources</id>
181             <goals>
182               <goal>install-kars</goal>
183             </goals>
184             <phase>process-resources</phase>
185           </execution>
186         </executions>
187       </plugin>
188       <plugin>
189         <groupId>org.apache.maven.plugins</groupId>
190         <artifactId>maven-checkstyle-plugin</artifactId>
191         <version>${checkstyle.version}</version>
192         <configuration>
193           <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
194         </configuration>
195       </plugin>
196       <plugin>
197         <groupId>org.apache.maven.plugins</groupId>
198         <artifactId>maven-dependency-plugin</artifactId>
199         <version>2.6</version>
200         <executions>
201           <execution>
202             <id>copy</id>
203             <goals>
204               <goal>copy</goal>
205             </goals>
206             <!-- here the phase you need -->
207             <phase>generate-resources</phase>
208             <configuration>
209               <artifactItems>
210                 <artifactItem>
211                   <groupId>org.opendaylight.controller</groupId>
212                   <artifactId>karaf.branding</artifactId>
213                   <version>${karaf.branding.version}</version>
214                   <outputDirectory>target/assembly/lib</outputDirectory>
215                   <destFileName>karaf.branding-${branding.version}.jar</destFileName>
216                 </artifactItem>
217               </artifactItems>
218             </configuration>
219           </execution>
220           <execution>
221             <id>unpack-karaf-resources</id>
222             <goals>
223               <goal>unpack-dependencies</goal>
224             </goals>
225             <phase>prepare-package</phase>
226             <configuration>
227              <outputDirectory>${project.build.directory}/assembly</outputDirectory>
228              <groupId>org.opendaylight.controller</groupId>
229              <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
230              <excludes>META-INF\/**</excludes>
231              <excludeTransitive>true</excludeTransitive>
232              <ignorePermissions>false</ignorePermissions>
233             </configuration>
234           </execution>
235           <execution>
236             <id>copy-dependencies</id>
237             <phase>prepare-package</phase>
238             <goals>
239               <goal>copy-dependencies</goal>
240             </goals>
241             <configuration>
242               <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
243               <overWriteReleases>false</overWriteReleases>
244               <overWriteSnapshots>true</overWriteSnapshots>
245               <overWriteIfNewer>true</overWriteIfNewer>
246               <useRepositoryLayout>true</useRepositoryLayout>
247               <addParentPoms>true</addParentPoms>
248               <copyPom>true</copyPom>
249             </configuration>
250           </execution>
251         </executions>
252       </plugin>
253       <plugin>
254         <groupId>org.apache.maven.plugins</groupId>
255         <artifactId>maven-antrun-plugin</artifactId>
256         <executions>
257             <execution>
258                 <phase>prepare-package</phase>
259                 <goals>
260                     <goal>run</goal>
261                 </goals>
262                 <configuration>
263                   <tasks>
264                     <chmod perm="755">
265                         <fileset dir="${project.build.directory}/assembly/bin">
266                           <include name="karaf"/>
267                           <include name="instance"/>
268                         </fileset>
269                     </chmod>
270                   </tasks>
271                 </configuration>
272             </execution>
273         </executions>
274       </plugin>
275     </plugins>
276   </build>
277
278   <profiles>
279     <profile>
280       <id>create-karaf-archive</id>
281       <build>
282         <plugins>
283           <plugin>
284             <groupId>org.apache.karaf.tooling</groupId>
285             <artifactId>karaf-maven-plugin</artifactId>
286             <extensions>true</extensions>
287             <executions>
288               <execution>
289                 <id>package</id>
290                 <goals>
291                   <goal>instance-create-archive</goal>
292                 </goals>
293               </execution>
294             </executions>
295           </plugin>
296         </plugins>
297       </build>
298     </profile>
299   </profiles>
300
301   <scm>
302     <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
303     <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
304     <tag>HEAD</tag>
305     <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main</url>
306   </scm>
307 </project>