Set honeycomb version to 17.01 to allign with vpp release
[honeycomb.git] / common / minimal-distribution-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ~ Copyright (c) 2016 Cisco and/or its affiliates.
4   ~
5   ~ Licensed under the Apache License, Version 2.0 (the "License");
6   ~ you may not use this file except in compliance with the License.
7   ~ You may obtain a copy of the License at:
8   ~
9   ~     http://www.apache.org/licenses/LICENSE-2.0
10   ~
11   ~ Unless required by applicable law or agreed to in writing, software
12   ~ distributed under the License is distributed on an "AS IS" BASIS,
13   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   ~ See the License for the specific language governing permissions and
15   ~ limitations under the License.
16   -->
17 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
18          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
19
20     <parent>
21         <groupId>io.fd.honeycomb.common</groupId>
22         <artifactId>impl-parent</artifactId>
23         <version>1.17.01-SNAPSHOT</version>
24         <relativePath>../impl-parent</relativePath>
25     </parent>
26
27     <modelVersion>4.0.0</modelVersion>
28     <artifactId>minimal-distribution-parent</artifactId>
29     <name>${project.artifactId}</name>
30     <version>1.17.01-SNAPSHOT</version>
31     <packaging>pom</packaging>
32
33     <properties>
34         <exec.parameters>-Xms32m -Xmx128m -XX:MetaspaceSize=32m -XX:MaxMetaspaceSize=128m</exec.parameters>
35         <exec.parameters.minimal>-client -Xms20m -Xmx32m -XX:MetaspaceSize=5m -XX:MaxMetaspaceSize=32m -XX:MaxMetaspaceExpansion=1m -Xss512k -XX:+UseSerialGC -Djava.compiler=NONE -Xverify:none -noverify</exec.parameters.minimal>
36
37         <!-- Jersey versions to run RESTCONF-->
38         <jersey.version>1.19.1</jersey.version>
39         <jetty.version>9.3.11.v20160721</jetty.version>
40         <servlet.version>3.1.0</servlet.version>
41         <!-- Used by mdsal as provided/runtime dependency-->
42         <osgi.core.version>5.0.0</osgi.core.version>
43         <!-- Use /dev/urandom instead of /dev/random during tests to speed up execution
44             http://stackoverflow.com/questions/137212/how-to-solve-performance-problem-with-java-securerandom
45         -->
46         <random.seed.file>/dev/./urandom</random.seed.file>
47     </properties>
48
49     <dependencyManagement>
50         <dependencies>
51             <!-- Jersey + Jetty for RESTCONF -->
52             <dependency>
53                 <groupId>org.eclipse.jetty</groupId>
54                 <artifactId>jetty-server</artifactId>
55                 <version>${jetty.version}</version>
56             </dependency>
57             <dependency>
58                 <groupId>javax.servlet</groupId>
59                 <artifactId>javax.servlet-api</artifactId>
60                 <version>${servlet.version}</version>
61             </dependency>
62             <dependency>
63                 <groupId>org.eclipse.jetty</groupId>
64                 <artifactId>jetty-webapp</artifactId>
65                 <version>${jetty.version}</version>
66             </dependency>
67             <dependency>
68                 <groupId>org.eclipse.jetty</groupId>
69                 <artifactId>jetty-servlets</artifactId>
70                 <version>${jetty.version}</version>
71             </dependency>
72             <dependency>
73                 <groupId>com.sun.jersey</groupId>
74                 <artifactId>jersey-server</artifactId>
75                 <version>${jersey.version}</version>
76             </dependency>
77             <dependency>
78                 <groupId>com.sun.jersey</groupId>
79                 <artifactId>jersey-core</artifactId>
80                 <version>${jersey.version}</version>
81             </dependency>
82             <dependency>
83                 <groupId>com.sun.jersey</groupId>
84                 <artifactId>jersey-servlet</artifactId>
85                 <version>${jersey.version}</version>
86             </dependency>
87             <!-- OSGI Even tough not running in OSGI, dependency needs to be here since some deprecated MD-SAL APIs rely on osgi core -->
88             <dependency>
89                 <groupId>org.osgi</groupId>
90                 <artifactId>org.osgi.core</artifactId>
91                 <version>${osgi.core.version}</version>
92             </dependency>
93         </dependencies>
94     </dependencyManagement>
95
96     <!-- Generate executable shell script -->
97     <build>
98         <pluginManagement>
99             <plugins>
100                 <plugin>
101                     <groupId>org.apache.maven.plugins</groupId>
102                     <artifactId>maven-jar-plugin</artifactId>
103                     <version>2.6</version>
104                     <configuration>
105                         <archive>
106                             <manifest>
107                                 <mainClass>${main.class}</mainClass>
108                                 <addClasspath>true</addClasspath>
109                                 <classpathPrefix>lib/</classpathPrefix>
110                                 <useUniqueVersions>false</useUniqueVersions>
111                                 <classpathMavenRepositoryLayout>true</classpathMavenRepositoryLayout>
112                             </manifest>
113                             <manifestEntries>
114                                 <Class-Path>config/ cert/ modules/</Class-Path>
115                             </manifestEntries>
116                         </archive>
117                     </configuration>
118                 </plugin>
119
120                 <!-- Copy all dependencies -->
121                 <plugin>
122                     <groupId>org.apache.maven.plugins</groupId>
123                     <artifactId>maven-dependency-plugin</artifactId>
124                     <version>2.10</version>
125                     <executions>
126                         <execution>
127                             <id>copy-dependencies</id>
128                             <phase>package</phase>
129                             <goals>
130                                 <goal>copy-dependencies</goal>
131                             </goals>
132                             <configuration>
133                                 <outputDirectory>${project.build.directory}/lib</outputDirectory>
134                                 <useBaseVersion>true</useBaseVersion>
135                                 <useRepositoryLayout>true</useRepositoryLayout>
136                                 <excludeArtifactIds>yang-jmx-generator</excludeArtifactIds>
137                             </configuration>
138                         </execution>
139                         <execution>
140                             <id>unpack-configuration</id>
141                             <phase>prepare-package</phase>
142                             <goals>
143                                 <goal>unpack-dependencies</goal>
144                             </goals>
145                             <configuration>
146                                 <includes>**/honeycomb-minimal-resources/</includes>
147                                 <outputDirectory>${project.build.outputDirectory}/</outputDirectory>
148                             </configuration>
149                         </execution>
150                     </executions>
151                 </plugin>
152
153                 <!-- Generate shell script -->
154                 <!-- Extract modules started by distribution -->
155                 <plugin>
156                     <groupId>org.codehaus.gmaven</groupId>
157                     <artifactId>groovy-maven-plugin</artifactId>
158                     <executions>
159                         <execution>
160                             <id>start-scripts-generation</id>
161                             <phase>package</phase>
162                             <goals>
163                                 <goal>execute</goal>
164                             </goals>
165                             <configuration>
166                                 <source>
167                                     io.fd.honeycomb.common.scripts.StartupScriptGenerator.generate(project, properties, log)
168                                 </source>
169                             </configuration>
170                         </execution>
171                         <execution>
172                             <id>distribution-module-assembly</id>
173                             <!-- phase changed from package to earlier phase to generate module descriptor before distribution jar is created,
174                              to include descriptor in the jar,to be accessible to children distributions-->
175                             <phase>prepare-package</phase>
176                             <goals>
177                                 <goal>execute</goal>
178                             </goals>
179                             <configuration>
180                                 <source>
181                                     io.fd.honeycomb.common.scripts.ModulesListGenerator.generate(project, properties, log)
182                                 </source>
183                             </configuration>
184                         </execution>
185                     </executions>
186                     <dependencies>
187                         <dependency>
188                             <groupId>io.fd.honeycomb.common</groupId>
189                             <artifactId>common-scripts</artifactId>
190                             <version>1.17.01-SNAPSHOT</version>
191                         </dependency>
192                     </dependencies>
193                 </plugin>
194
195                 <!-- Build archives -->
196                 <plugin>
197                     <artifactId>maven-assembly-plugin</artifactId>
198                     <version>2.5.3</version>
199                     <dependencies>
200                         <dependency>
201                             <groupId>io.fd.honeycomb.common</groupId>
202                             <artifactId>minimal-assembly-descriptor</artifactId>
203                             <version>1.17.01-SNAPSHOT</version>
204                         </dependency>
205                     </dependencies>
206                     <executions>
207                         <execution>
208                             <id>create-archive</id>
209                             <phase>package</phase>
210                             <goals>
211                                 <goal>single</goal>
212                             </goals>
213                             <configuration>
214                                 <descriptorRefs>
215                                     <descriptorRef>honeycomb-minimal</descriptorRef>
216                                 </descriptorRefs>
217                             </configuration>
218                         </execution>
219                     </executions>
220                 </plugin>
221
222                 <plugin>
223                     <artifactId>maven-surefire-plugin</artifactId>
224                     <configuration>
225                         <!--http://stackoverflow.com/questions/18107375/getting-skipping-jacoco-execution-due-to-missing-execution-data-file-upon-exec-->
226                         <argLine>${argLine} -Djava.security.egd=file:${random.seed.file}</argLine>
227                     </configuration>
228                 </plugin>
229             </plugins>
230         </pluginManagement>
231         <plugins>
232             <plugin>
233                 <groupId>org.codehaus.gmaven</groupId>
234                 <artifactId>groovy-maven-plugin</artifactId>
235             </plugin>
236             <plugin>
237                 <groupId>org.apache.maven.plugins</groupId>
238                 <artifactId>maven-jar-plugin</artifactId>
239             </plugin>
240             <plugin>
241                 <groupId>org.apache.maven.plugins</groupId>
242                 <artifactId>maven-dependency-plugin</artifactId>
243             </plugin>
244             <plugin>
245                 <artifactId>maven-assembly-plugin</artifactId>
246             </plugin>
247         </plugins>
248     </build>
249 </project>