NETVIRT-1126: avoid shipping the MySQL connector
[netvirt.git] / karaf / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
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 INTERNAL
8 -->
9 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
11
12     <parent>
13         <groupId>org.opendaylight.odlparent</groupId>
14         <artifactId>karaf4-parent</artifactId>
15         <version>3.0.2</version>
16         <relativePath/>
17     </parent>
18
19     <groupId>org.opendaylight.netvirt</groupId>
20     <artifactId>karaf</artifactId>
21     <version>0.7.0-SNAPSHOT</version>
22     <name>ODL :: netvirt :: ${project.artifactId}</name>
23     <modelVersion>4.0.0</modelVersion>
24
25     <properties>
26         <!-- <karaf.localFeature>odl-netvirt-openstack</karaf.localFeature> -->
27     </properties>
28
29     <dependencies>
30         <dependency>
31             <!-- scope is compile so all features (there is only one) are installed
32             into startup.properties and the feature repo itself is not installed -->
33             <groupId>org.apache.karaf.features</groupId>
34             <artifactId>framework</artifactId>
35             <version>${karaf.version}</version>
36             <type>kar</type>
37             <scope>compile</scope>
38         </dependency>
39
40         <dependency>
41             <groupId>${project.groupId}</groupId>
42             <artifactId>netvirt-features</artifactId>
43             <version>${project.version}</version>
44             <classifier>features</classifier>
45             <type>xml</type>
46             <scope>runtime</scope>
47         </dependency>
48
49         <dependency>
50             <!-- This is here just so that we have the respective bundles for this development debug feature
51                  in netvirt's Karaf distribution, and it is easy to do "feature:install odl-mdsal-trace" on
52                  test environments to find memory leaks due to non-closed transactions.  This feature is NOT
53                  intended for production, and not installed as a boot feature by default.  (If we do not do
54                  this, then it's quite a pain/complicated to install this feature onto a non-dev environment
55                  on a test server where an ODL binary was installed e.g. from an RPM package, because as is
56                  we currently cannot easily, by a simple CLI command, add additional features from new remote
57                  repos.)
58              -->
59             <groupId>org.opendaylight.controller</groupId>
60             <artifactId>features-mdsal-trace</artifactId>
61             <version>1.8.0-SNAPSHOT</version>
62             <classifier>features</classifier>
63             <type>xml</type>
64             <scope>runtime</scope>
65         </dependency>
66
67         <dependency>
68             <!-- This ensures we have odl-jolokia in the distribution -->
69             <groupId>org.opendaylight.controller</groupId>
70             <artifactId>features-extras</artifactId>
71             <version>1.11.0-SNAPSHOT</version>
72             <type>xml</type>
73             <classifier>features</classifier>
74             <scope>runtime</scope>
75         </dependency>
76
77         <dependency>
78             <!-- This ensures aaa-cli is available for the copy below -->
79             <groupId>org.opendaylight.aaa</groupId>
80             <artifactId>aaa-cli-jar</artifactId>
81             <version>0.8.0-SNAPSHOT</version>
82             <!-- Use scope test (and not more!) just so we have the dependency for the maven-dependency-plugin below -->
83             <scope>test</scope>
84         </dependency>
85     </dependencies>
86
87     <build>
88         <plugins>
89             <plugin>
90                 <groupId>org.apache.maven.plugins</groupId>
91                 <artifactId>maven-dependency-plugin</artifactId>
92                 <executions>
93                     <execution>
94                         <id>copy-aaa-cli-jar</id>
95                         <phase>prepare-package</phase>
96                         <goals>
97                             <goal>copy</goal>
98                         </goals>
99                         <configuration>
100                             <artifactItems>
101                                 <artifactItem>
102                                     <groupId>org.opendaylight.aaa</groupId>
103                                     <artifactId>aaa-cli-jar</artifactId>
104                                     <version>0.8.0-SNAPSHOT</version>
105                                 </artifactItem>
106                             </artifactItems>
107                             <outputDirectory>${project.build.directory}/assembly/bin</outputDirectory>
108                             <includeArtifactIds>aaa-cli-jar</includeArtifactIds>
109                             <overWriteReleases>true</overWriteReleases>
110                             <overWriteSnapshots>true</overWriteSnapshots>
111                             <overWriteIfNewer>true</overWriteIfNewer>
112                             <excludeTransitive>true</excludeTransitive>
113                             <!-- Do not include version in JAR filename, as external scripts call this utility,
114                                  and they understandly do not want to have to adjust for every ODL release;
115                                  see e.g. https://github.com/dfarrell07/puppet-opendaylight/pull/140 -->
116                             <stripVersion>true</stripVersion>
117                         </configuration>
118                     </execution>
119                 </executions>
120             </plugin>
121             <!-- Temporarily deploy the karaf artifact -->
122             <plugin>
123                 <groupId>org.apache.maven.plugins</groupId>
124                 <artifactId>maven-deploy-plugin</artifactId>
125                 <configuration>
126                     <skip>false</skip>
127                 </configuration>
128             </plugin>
129             <!-- NETVIRT-1126: Heavy-handed workaround to remove mysql dependencies from system -->
130             <plugin>
131                 <groupId>org.apache.maven.plugins</groupId>
132                 <artifactId>maven-antrun-plugin</artifactId>
133                 <executions>
134                     <execution>
135                         <phase>prepare-package</phase>
136                         <goals>
137                             <goal>run</goal>
138                         </goals>
139                         <configuration>
140                             <tasks>
141                                 <delete includeemptydirs="true">
142                                     <fileset dir="${project.build.directory}/assembly/system/mysql"/>
143                                 </delete>
144                             </tasks>
145                         </configuration>
146                     </execution>
147                 </executions>
148             </plugin>
149         </plugins>
150     </build>
151 </project>