056c5e5a32494aa46b3e7dcb9e09615f7d67b272
[integration/distribution.git] / features-test / pom.xml
1 <?xml version="1.0"?>
2 <!-- vi: set et smarttab sw=4 tabstop=4: -->
3 <!--
4  Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
5
6  This program and the accompanying materials are made available under the
7  terms of the Eclipse Public License v1.0 which accompanies this distribution,
8  and is available at http://www.eclipse.org/legal/epl-v10.html
9 -->
10 <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">
11     <modelVersion>4.0.0</modelVersion>
12     <parent>
13         <groupId>org.opendaylight.integration</groupId>
14         <artifactId>root</artifactId>
15         <version>0.6.0-SNAPSHOT</version>
16         <relativePath>../</relativePath>
17     </parent>
18     <artifactId>features-integration-test</artifactId>
19     <packaging>jar</packaging>
20     <name>distribution:${project.artifactId}</name>
21     <description>Sub-project building aggregate features used for feature compatibility testing.</description>
22     <url>https://wiki.opendaylight.org/view/Integration/Distribution</url>
23     <licenses>
24         <license>
25             <name>Eclipse Public License v1.0</name>
26             <url>http://www.eclipse.org/legal/epl-v10.html</url>
27         </license>
28     </licenses>
29     <!-- FIXME: Add developers section -->
30     <scm>
31         <connection>scm:git:https://git.opendaylight.org/gerrit/integration/distribution.git</connection>
32         <developerConnection>scm:git:ssh://git.opendaylight.org:29418/integration/distribution.git</developerConnection>
33         <url>https://git.opendaylight.org/gerrit/gitweb?p=integration/distribution.git;a=tree;f=features-test;hb=HEAD</url>
34         <tag>HEAD</tag>
35     </scm>
36     <properties>
37         <features.file>features.xml</features.file>
38     </properties>
39     <dependencies>
40         <!-- dependencies on feature repos -->
41         <dependency>
42             <groupId>org.opendaylight.integration</groupId>
43             <artifactId>features-integration-index</artifactId>
44             <version>${project.version}</version>
45             <classifier>features</classifier>
46             <type>xml</type>
47         </dependency>
48         <!-- ****************************************************************************************
49                 *** DO NOT ADD a <dependency> to org.opendaylight.odlparent:features-test here! ***
50                Since the introduction of the bundles-test, this lead to very weird following error:
51                java.lang.NoClassDefFoundError: Could not initialize class org.opendaylight.odlparent.featuretest.SingleFeatureTest
52                The features-test (and the bundles-test through a transitive dependency from it)
53                are already on the classpath transitively from the previous dependency above,
54                so it works without repeating it here.  Why repeating it here, which should
55                have no effect in Maven, leads to the NoClassDefFoundError, is one of the
56                currently unsolved mysteries of the universe.
57              **************************************************************************************** -->
58         <!-- dependency for opendaylight-karaf-empty for use by testing -->
59         <dependency>
60             <groupId>org.opendaylight.odlparent</groupId>
61             <artifactId>opendaylight-karaf-empty</artifactId>
62             <version>${feature.odlparent.version}</version>
63             <type>zip</type>
64             <scope>test</scope>
65         </dependency>
66     </dependencies>
67     <build>
68         <resources>
69             <resource>
70                 <directory>src/main/resources</directory>
71                 <filtering>true</filtering>
72             </resource>
73         </resources>
74         <plugins>
75             <plugin>
76                 <!-- This generates the META-INF/maven/dependencies.properties file
77                      which is required by the versionAsInProject() used in SingleFeatureTest -->
78                 <groupId>org.ops4j.pax.exam</groupId>
79                 <artifactId>maven-paxexam-plugin</artifactId>
80                 <executions>
81                   <execution>
82                    <id>generate-dependencies.properties-file</id>
83                    <goals>
84                      <goal>generate-depends-file</goal>
85                    </goals>
86                   </execution>
87                 </executions>
88             </plugin>
89             <plugin>
90                 <groupId>org.apache.karaf.tooling</groupId>
91                 <artifactId>karaf-maven-plugin</artifactId>
92                 <extensions>true</extensions>
93                 <executions>
94                     <execution>
95                         <id>features-create-kar</id>
96                         <goals>
97                             <goal>features-create-kar</goal>
98                         </goals>
99                         <configuration>
100                             <featuresFile>${project.build.directory}/classes/${features.file}</featuresFile>
101                         </configuration>
102                     </execution>
103                 </executions>
104                 <!-- There is no useful configuration for the kar mojo. The features-generate-descriptor mojo configuration may be useful -->
105             </plugin>
106             <plugin>
107                 <groupId>org.apache.maven.plugins</groupId>
108                 <artifactId>maven-resources-plugin</artifactId>
109                 <executions>
110                     <execution>
111                         <id>filter</id>
112                         <phase>generate-resources</phase>
113                         <goals>
114                             <goal>resources</goal>
115                         </goals>
116                     </execution>
117                 </executions>
118             </plugin>
119             <plugin>
120                 <groupId>org.codehaus.mojo</groupId>
121                 <artifactId>build-helper-maven-plugin</artifactId>
122                 <executions>
123                     <execution>
124                         <id>attach-artifacts</id>
125                         <phase>package</phase>
126                         <goals>
127                             <goal>attach-artifact</goal>
128                         </goals>
129                         <configuration>
130                             <artifacts>
131                                 <artifact>
132                                     <file>${project.build.directory}/classes/${features.file}</file>
133                                     <type>xml</type>
134                                     <classifier>features</classifier>
135                                 </artifact>
136                             </artifacts>
137                         </configuration>
138                     </execution>
139                 </executions>
140             </plugin>
141             <plugin>
142                 <groupId>org.apache.maven.plugins</groupId>
143                 <artifactId>maven-surefire-plugin</artifactId>
144                 <configuration>
145                     <systemPropertyVariables>
146                         <karaf.distro.groupId>org.opendaylight.odlparent</karaf.distro.groupId>
147                         <karaf.distro.artifactId>opendaylight-karaf-empty</karaf.distro.artifactId>
148                         <karaf.distro.version>${feature.odlparent.version}</karaf.distro.version>
149                     </systemPropertyVariables>
150                     <dependenciesToScan>
151                         <dependency>org.opendaylight.odlparent:features-test</dependency>
152                     </dependenciesToScan>
153                 </configuration>
154             </plugin>
155         </plugins>
156     </build>
157 </project>