Archetypes for karaf support
[controller.git] / opendaylight / archetypes / opendaylight-karaf-features / src / main / resources / archetype-resources / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  Necessary TODO: Put your copyright here.
4
5  This program and the accompanying materials are made available under the
6  terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  and is available at http://www.eclipse.org/legal/epl-v10.html
8 -->
9 <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">
10    <modelVersion>4.0.0</modelVersion>
11    <!--
12     Necessary TODO: Hookup your parent pom here, else you will not get necessary versions,
13     maven repos etc.  If you run this archetype in a subdirectory of your project, it
14     will pick the pom.xml from the parent directory as the parent pom, which may or may
15     not be correct.
16   -->
17    <artifactId>features-${repoName}</artifactId>
18    <groupId>${groupId}</groupId>
19    <!-- Optional TODO: Uncomment version if you are not using a parent pom.xml
20    <version>${version}</version>
21    -->
22    <packaging>jar</packaging>
23    <properties>
24       <features.file>features.xml</features.file>
25       <!-- Optional TODO: Move these properties to your parent pom and possibly
26             DependencyManagement section of your parent pom -->
27       <branding.version>1.0.0-SNAPSHOT</branding.version>
28       <karaf.resources.version>1.4.2-SNAPSHOT</karaf.resources.version>
29       <karaf.version>3.0.1</karaf.version>
30       <feature.test.version>0.6.2-SNAPSHOT</feature.test.version>
31       <karaf.empty.version>1.4.2-SNAPSHOT</karaf.empty.version>
32       <surefire.version>2.16</surefire.version>
33    </properties>
34    <dependencies>
35     <!--
36       Necessary TODO: Put dependencies on any feature repos
37       you use in your features.xml file.
38
39       Note: they will need to be <type>xml</xml>
40       and <classifier>features</classifier>.
41       One other thing to watch for is to make sure they are
42       <scope>compile</compile>, which they should be by default,
43       but be cautious lest they be at a different scope in a parent pom.
44
45       Examples:
46         <dependency>
47           <groupId>org.opendaylight.yangtools</groupId>
48           <artifactId>features-yangtools</artifactId>
49           <version>0.6.2-SNAPSHOT</version>
50           <classifier>features</classifier>
51           <type>xml</type>
52         </dependency>
53         <dependency>
54           <groupId>org.opendaylight.controller</groupId>
55           <artifactId>features-mdsal</artifactId>
56           <version>1.1-SNAPSHOT</version>
57           <classifier>features</classifier>
58           <type>xml</type>
59         </dependency>
60         <dependency>
61           <groupId>org.opendaylight.openflowplugin</groupId>
62           <artifactId>features-openflowplugin</artifactId>
63           <version>0.0.3-SNAPSHOT</version>
64           <classifier>features</classifier>
65           <type>xml</type>
66         </dependency>
67     -->
68
69     <!--
70       Necessary TODO: Put dependencies for bundles directly referenced
71       in your features.xml file.  For every <bundle> reference in your
72       features.xml file, you need a corresponding dependency here.
73
74       Examples:
75       <dependency>
76         <groupId>${groupId}</groupId>
77         <artifactId>${repoName}-provider</artifactId>
78         <version>${project.version}</version>
79       </dependency>
80       <dependency>
81         <groupId>${groupId}</groupId>
82         <artifactId>${repoName}-model</artifactId>
83         <version>${project.version}</version>
84       </dependency>
85     -->
86
87     <!--
88       Necessary TODO: Put dependencies for configfiles directly referenced
89       in your features.xml file.  For every <configfile> reference in your
90       features.xml file, you need a corresponding dependency here.
91
92       Example (presuming here version is coming from the parent pom):
93       <dependency>
94         <groupId>${groupId}</groupId>
95         <artifactId>${repoName}-config</artifactId>
96         <version>${project.version}</version>
97         <type>xml</type>
98         <classifier>config</classifier>
99       </dependency>
100     -->
101
102     <!--
103       Optional TODO: Remove TODO comments.
104     -->
105     <!-- test to validate features.xml -->
106     <dependency>
107       <groupId>org.opendaylight.yangtools</groupId>
108       <artifactId>features-test</artifactId>
109       <version>${feature.test.version}</version>
110       <scope>test</scope>
111     </dependency>
112     <!-- dependency for opendaylight-karaf-empty for use by testing -->
113     <dependency>
114       <groupId>org.opendaylight.controller</groupId>
115       <artifactId>opendaylight-karaf-empty</artifactId>
116       <version>${karaf.empty.version}</version>
117       <type>zip</type>
118     </dependency>
119     <!-- Uncomment this if you get an error : java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;
120     <dependency>
121       <groupId>org.slf4j</groupId>
122       <artifactId>slf4j-simple</artifactId>
123       <version>1.7.2</version>
124     </dependency>
125     -->
126
127    </dependencies>
128    <build>
129       <resources>
130          <resource>
131             <directory>src/main/resources</directory>
132             <filtering>true</filtering>
133          </resource>
134       </resources>
135       <plugins>
136          <plugin>
137             <groupId>org.apache.maven.plugins</groupId>
138             <artifactId>maven-resources-plugin</artifactId>
139             <executions>
140                <execution>
141                   <id>filter</id>
142                   <phase>generate-resources</phase>
143                   <goals>
144                      <goal>resources</goal>
145                   </goals>
146                </execution>
147             </executions>
148          </plugin>
149          <plugin>
150             <groupId>org.codehaus.mojo</groupId>
151             <artifactId>build-helper-maven-plugin</artifactId>
152             <executions>
153                <execution>
154                   <id>attach-artifacts</id>
155                   <phase>package</phase>
156                   <goals>
157                      <goal>attach-artifact</goal>
158                   </goals>
159                   <configuration>
160                      <artifacts>
161                         <artifact>
162                            <file>${project.build.directory}/classes/${features.file}</file>
163                            <type>xml</type>
164                            <classifier>features</classifier>
165                         </artifact>
166                      </artifacts>
167                   </configuration>
168                </execution>
169             </executions>
170          </plugin>
171          <plugin>
172             <groupId>org.apache.maven.plugins</groupId>
173             <artifactId>maven-surefire-plugin</artifactId>
174             <version>${surefire.version}</version>
175             <configuration>
176               <systemPropertyVariables>
177                 <karaf.distro.groupId>org.opendaylight.controller</karaf.distro.groupId>
178                 <karaf.distro.artifactId>opendaylight-karaf-empty</karaf.distro.artifactId>
179                 <karaf.distro.version>${karaf.empty.version}</karaf.distro.version>
180               </systemPropertyVariables>
181               <dependenciesToScan>
182                <dependency>org.opendaylight.yangtools:features-test</dependency>
183               </dependenciesToScan>
184             </configuration>
185           </plugin>
186       </plugins>
187    </build>
188    <scm>
189       <connection>scm:git:ssh://git.opendaylight.org:29418/${repoName}.git</connection>
190       <developerConnection>scm:git:ssh://git.opendaylight.org:29418/${repoName}.git</developerConnection>
191       <tag>HEAD</tag>
192       <url>https://git.opendaylight.org/gerrit/gitweb?p=${repoName}.git;a=summary</url>
193    </scm>
194 </project>