Merge "Address comment in gerrit 17266"
[controller.git] / opendaylight / archetypes / opendaylight-karaf-distro-archetype / src / main / resources / archetype-resources / 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   <!--
5     Necessary TODO: Hookup your parent pom here, else you will not get necessary versions,
6     maven repos etc.  If you run this archetype in a subdirectory of your project, it
7     will pick the pom.xml from the parent directory as the parent pom, which may or may
8     not be correct.
9   -->
10   <artifactId>${artifactId}</artifactId>
11   <groupId>${groupId}</groupId>
12   <!-- Optional TODO: Uncomment version if you are not using a parent pom.xml
13   <version>${version}</version>
14   -->
15   <packaging>pom</packaging>
16   <prerequisites>
17     <maven>3.0</maven>
18   </prerequisites>
19   <properties>
20     <!-- Optional TODO: Move these properties to your parent pom and possibly
21             DependencyManagement section of your parent pom -->
22     <branding.version>1.1.0-SNAPSHOT</branding.version>
23     <karaf.resources.version>1.5.0-SNAPSHOT</karaf.resources.version>
24     <karaf.version>3.0.3</karaf.version>
25   </properties>
26
27   <dependencies>
28     <!-- Basic Karaf dependencies -->
29     <dependency>
30       <groupId>org.apache.karaf.features</groupId>
31       <artifactId>framework</artifactId>
32       <version>${karaf.version}</version>
33       <type>kar</type>
34     </dependency>
35     <dependency>
36       <groupId>org.apache.karaf.features</groupId>
37       <artifactId>standard</artifactId>
38       <version>${karaf.version}</version>
39       <classifier>features</classifier>
40       <type>xml</type>
41       <scope>runtime</scope>
42     </dependency>
43
44     <!-- ODL Branding -->
45     <dependency>
46       <groupId>org.opendaylight.controller</groupId>
47       <artifactId>karaf.branding</artifactId>
48       <version>${branding.version}</version>
49       <scope>compile</scope>
50     </dependency>
51
52     <!-- ODL Resources needed for karaf -->
53     <dependency>
54       <groupId>org.opendaylight.controller</groupId>
55       <artifactId>opendaylight-karaf-resources</artifactId>
56       <version>${karaf.resources.version}</version>
57     </dependency>
58
59     <!-- Project local feautures -->
60     <!--
61       Necessary TODO put your features here.
62
63       Note: they will need to be <type>xml</xml>
64       and <classifier>features</classifier>.
65
66       Note: they must be <scope>runtime</scope>
67
68       Note: usually you would only need to depend
69       on your own feature file here for your local distro,
70       and possible the features-mdsal for odl-restconf
71       (although, strange situations do exist :) )
72
73       Example:
74       <dependency>
75         <groupId>org.opendaylight.controller</groupId>
76         <artifactId>features-mdsal</artifactId>
77         <classifier>features</classifier>
78         <type>xml</type>
79         <scope>runtime</scope>
80       </dependency>
81       <dependency>
82         <groupId>org.opendaylight.openflowplugin</groupId>
83         <artifactId>features-openflowplugin</artifactId>
84         <version>0.1.0-SNAPSHOT</version>
85         <classifier>features</classifier>
86         <type>xml</type>
87         <scope>runtime</scope>
88       </dependency>
89     -->
90   </dependencies>
91
92   <build>
93     <pluginManagement>
94       <plugins>
95         <plugin>
96           <groupId>org.eclipse.m2e</groupId>
97           <artifactId>lifecycle-mapping</artifactId>
98           <version>1.0.0</version>
99           <configuration>
100             <lifecycleMappingMetadata>
101               <pluginExecutions>
102                 <pluginExecution>
103                   <pluginExecutionFilter>
104                     <groupId>org.apache.felix</groupId>
105                     <artifactId>maven-bundle-plugin</artifactId>
106                     <versionRange>[0,)</versionRange>
107                     <goals>
108                       <goal>cleanVersions</goal>
109                     </goals>
110                   </pluginExecutionFilter>
111                   <action>
112                     <ignore></ignore>
113                   </action>
114                 </pluginExecution>
115                 <pluginExecution>
116                   <pluginExecutionFilter>
117                     <groupId>org.apache.maven.plugins</groupId>
118                     <artifactId>maven-dependency-plugin</artifactId>
119                     <versionRange>[0,)</versionRange>
120                     <goals>
121                       <goal>copy</goal>
122                       <goal>unpack</goal>
123                     </goals>
124                   </pluginExecutionFilter>
125                   <action>
126                     <ignore></ignore>
127                   </action>
128                 </pluginExecution>
129                 <pluginExecution>
130                   <pluginExecutionFilter>
131                     <groupId>org.apache.karaf.tooling</groupId>
132                     <artifactId>karaf-maven-plugin</artifactId>
133                     <versionRange>[0,)</versionRange>
134                     <goals>
135                       <goal>commands-generate-help</goal>
136                     </goals>
137                   </pluginExecutionFilter>
138                   <action>
139                     <ignore></ignore>
140                   </action>
141                 </pluginExecution>
142                 <pluginExecution>
143                   <pluginExecutionFilter>
144                     <groupId>org.fusesource.scalate</groupId>
145                     <artifactId>maven-scalate-plugin</artifactId>
146                     <versionRange>[0,)</versionRange>
147                     <goals>
148                       <goal>sitegen</goal>
149                     </goals>
150                   </pluginExecutionFilter>
151                   <action>
152                     <ignore></ignore>
153                   </action>
154                 </pluginExecution>
155                 <pluginExecution>
156                   <pluginExecutionFilter>
157                     <groupId>org.apache.servicemix.tooling</groupId>
158                     <artifactId>depends-maven-plugin</artifactId>
159                     <versionRange>[0,)</versionRange>
160                     <goals>
161                       <goal>generate-depends-file</goal>
162                     </goals>
163                   </pluginExecutionFilter>
164                   <action>
165                     <ignore></ignore>
166                   </action>
167                 </pluginExecution>
168               </pluginExecutions>
169             </lifecycleMappingMetadata>
170           </configuration>
171         </plugin>
172       </plugins>
173     </pluginManagement>
174     <plugins>
175       <plugin>
176         <groupId>org.apache.karaf.tooling</groupId>
177         <artifactId>karaf-maven-plugin</artifactId>
178         <version>${karaf.version}</version>
179         <extensions>true</extensions>
180         <configuration>
181           <bootFeatures>
182             <feature>standard</feature>
183             <!--
184               Optional TODO: Add entries here for the features you want in your local distro
185               Note: odl-restconf is a separate feature from odl-mdsal-broker.  If you want
186               restconf, you need to list it here explicitely.
187               Examples:
188               <feature>odl-openflowplugin-flow-services</feature>
189               <feature>odl-restconf</feature>
190             -->
191             <!-- Final TODO: Remove TODO Comments ;) -->
192           </bootFeatures>
193         </configuration>
194         <executions>
195           <execution>
196             <id>process-resources</id>
197             <goals>
198               <goal>install-kars</goal>
199             </goals>
200             <phase>process-resources</phase>
201           </execution>
202           <execution>
203             <id>package</id>
204             <goals>
205               <goal>instance-create-archive</goal>
206             </goals>
207           </execution>
208         </executions>
209       </plugin>
210       <plugin>
211         <groupId>org.apache.maven.plugins</groupId>
212         <artifactId>maven-dependency-plugin</artifactId>
213         <version>2.6</version>
214         <executions>
215           <execution>
216             <id>copy</id>
217             <goals>
218               <goal>copy</goal>
219             </goals>
220             <phase>generate-resources</phase>
221             <configuration>
222               <artifactItems>
223                 <artifactItem>
224                   <groupId>org.opendaylight.controller</groupId>
225                   <artifactId>karaf.branding</artifactId>
226                   <version>${karaf.branding.version}</version>
227                   <outputDirectory>target/assembly/lib</outputDirectory>
228                   <destFileName>karaf.branding-${branding.version}.jar</destFileName>
229                 </artifactItem>
230               </artifactItems>
231             </configuration>
232           </execution>
233           <execution>
234             <id>unpack-karaf-resources</id>
235             <goals>
236               <goal>unpack-dependencies</goal>
237             </goals>
238             <phase>prepare-package</phase>
239             <configuration>
240              <outputDirectory>${project.build.directory}/assembly</outputDirectory>
241              <groupId>org.opendaylight.controller</groupId>
242              <includeArtifactIds>opendaylight-karaf-resources</includeArtifactIds>
243              <excludes>META-INF\/**</excludes>
244              <excludeTransitive>true</excludeTransitive>
245              <ignorePermissions>false</ignorePermissions>
246             </configuration>
247           </execution>
248           <execution>
249             <id>copy-dependencies</id>
250             <phase>prepare-package</phase>
251             <goals>
252               <goal>copy-dependencies</goal>
253             </goals>
254             <configuration>
255               <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
256               <overWriteReleases>false</overWriteReleases>
257               <overWriteSnapshots>true</overWriteSnapshots>
258               <overWriteIfNewer>true</overWriteIfNewer>
259               <useRepositoryLayout>true</useRepositoryLayout>
260               <addParentPoms>true</addParentPoms>
261               <copyPom>true</copyPom>
262             </configuration>
263           </execution>
264         </executions>
265       </plugin>
266       <plugin>
267         <groupId>org.apache.maven.plugins</groupId>
268         <artifactId>maven-antrun-plugin</artifactId>
269         <executions>
270             <execution>
271                 <phase>prepare-package</phase>
272                 <goals>
273                     <goal>run</goal>
274                 </goals>
275                 <configuration>
276                   <tasks>
277                     <chmod perm="755">
278                         <fileset dir="${project.build.directory}/assembly/bin">
279                           <include name="karaf" />
280                           <include name="instance" />
281                           <include name="start"/>
282                           <include name="stop"/>
283                           <include name="status"/>
284                           <include name="client"/>
285                           <include name="shell"/>
286                         </fileset>
287                     </chmod>
288                   </tasks>
289                 </configuration>
290             </execution>
291         </executions>
292       </plugin>
293     </plugins>
294   </build>
295   <scm>
296     <connection>scm:git:ssh://git.opendaylight.org:29418/${repoName}.git</connection>
297     <developerConnection>scm:git:ssh://git.opendaylight.org:29418/${repoName}.git</developerConnection>
298     <tag>HEAD</tag>
299     <url>https://git.opendaylight.org/gerrit/gitweb?p=${repoName}.git;a=summary</url>
300   </scm>
301 </project>