1 <?xml version="1.0" encoding="UTF-8"?>
3 ~ Copyright (c) 2016 Cisco and/or its affiliates.
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:
9 ~ http://www.apache.org/licenses/LICENSE-2.0
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.
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">
21 <groupId>io.fd.honeycomb.common</groupId>
22 <artifactId>impl-parent</artifactId>
23 <version>1.17.07-SNAPSHOT</version>
24 <relativePath>../impl-parent</relativePath>
27 <modelVersion>4.0.0</modelVersion>
28 <artifactId>minimal-distribution-parent</artifactId>
29 <name>${project.artifactId}</name>
30 <version>1.17.07-SNAPSHOT</version>
31 <packaging>pom</packaging>
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>
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
46 <random.seed.file>/dev/./urandom</random.seed.file>
49 <dependencyManagement>
51 <!-- Jersey + Jetty for RESTCONF -->
53 <groupId>org.eclipse.jetty</groupId>
54 <artifactId>jetty-server</artifactId>
55 <version>${jetty.version}</version>
58 <groupId>javax.servlet</groupId>
59 <artifactId>javax.servlet-api</artifactId>
60 <version>${servlet.version}</version>
63 <groupId>org.eclipse.jetty</groupId>
64 <artifactId>jetty-webapp</artifactId>
65 <version>${jetty.version}</version>
68 <groupId>org.eclipse.jetty</groupId>
69 <artifactId>jetty-servlets</artifactId>
70 <version>${jetty.version}</version>
73 <groupId>com.sun.jersey</groupId>
74 <artifactId>jersey-server</artifactId>
75 <version>${jersey.version}</version>
78 <groupId>com.sun.jersey</groupId>
79 <artifactId>jersey-core</artifactId>
80 <version>${jersey.version}</version>
83 <groupId>com.sun.jersey</groupId>
84 <artifactId>jersey-servlet</artifactId>
85 <version>${jersey.version}</version>
87 <!-- OSGI Even tough not running in OSGI, dependency needs to be here since some deprecated MD-SAL APIs rely on osgi core -->
89 <groupId>org.osgi</groupId>
90 <artifactId>org.osgi.core</artifactId>
91 <version>${osgi.core.version}</version>
94 </dependencyManagement>
96 <!-- Generate executable shell script -->
101 <groupId>org.apache.maven.plugins</groupId>
102 <artifactId>maven-jar-plugin</artifactId>
103 <version>2.6</version>
107 <mainClass>${main.class}</mainClass>
108 <addClasspath>true</addClasspath>
109 <classpathPrefix>lib/</classpathPrefix>
110 <useUniqueVersions>false</useUniqueVersions>
111 <classpathMavenRepositoryLayout>true</classpathMavenRepositoryLayout>
114 <Class-Path>config/ cert/ modules/</Class-Path>
120 <!-- Copy all dependencies -->
122 <groupId>org.apache.maven.plugins</groupId>
123 <artifactId>maven-dependency-plugin</artifactId>
124 <version>2.10</version>
127 <id>copy-dependencies</id>
128 <phase>package</phase>
130 <goal>copy-dependencies</goal>
133 <outputDirectory>${project.build.directory}/lib</outputDirectory>
134 <useBaseVersion>true</useBaseVersion>
135 <useRepositoryLayout>true</useRepositoryLayout>
136 <excludeArtifactIds>yang-jmx-generator</excludeArtifactIds>
140 <id>unpack-configuration</id>
141 <phase>prepare-package</phase>
143 <goal>unpack-dependencies</goal>
146 <includes>**/honeycomb-minimal-resources/</includes>
147 <outputDirectory>${project.build.outputDirectory}/</outputDirectory>
153 <!-- Generate shell script -->
154 <!-- Extract modules started by distribution -->
156 <groupId>org.codehaus.gmaven</groupId>
157 <artifactId>groovy-maven-plugin</artifactId>
160 <id>start-scripts-generation</id>
161 <phase>package</phase>
167 io.fd.honeycomb.common.scripts.StartupScriptGenerator.generate(project, properties, log)
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>
181 io.fd.honeycomb.common.scripts.ModulesListGenerator.generate(project, properties, log)
188 <groupId>io.fd.honeycomb.common</groupId>
189 <artifactId>common-scripts</artifactId>
190 <version>1.17.07-SNAPSHOT</version>
195 <!-- Build archives -->
197 <artifactId>maven-assembly-plugin</artifactId>
198 <version>2.5.3</version>
201 <groupId>io.fd.honeycomb.common</groupId>
202 <artifactId>minimal-assembly-descriptor</artifactId>
203 <version>1.17.07-SNAPSHOT</version>
208 <id>create-archive</id>
209 <phase>package</phase>
215 <descriptorRef>honeycomb-minimal</descriptorRef>
223 <artifactId>maven-surefire-plugin</artifactId>
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>
233 <groupId>org.codehaus.gmaven</groupId>
234 <artifactId>groovy-maven-plugin</artifactId>
237 <groupId>org.apache.maven.plugins</groupId>
238 <artifactId>maven-jar-plugin</artifactId>
241 <groupId>org.apache.maven.plugins</groupId>
242 <artifactId>maven-dependency-plugin</artifactId>
245 <artifactId>maven-assembly-plugin</artifactId>