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