1 <?xml version="1.0" encoding="UTF-8"?>
2 <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">
5 <groupId>io.fd.honeycomb.common</groupId>
6 <artifactId>minimal-distribution-parent</artifactId>
7 <version>1.17.07</version>
10 <modelVersion>4.0.0</modelVersion>
11 <groupId>org.onap.demo.vnf.vlb</groupId>
12 <artifactId>vlb-vnf-onap-distribution</artifactId>
13 <version>1.2.0</version>
16 <nexusproxy>http://nexus.fd.io/content</nexusproxy>
17 <start.script.template>
20 </start.script.template>
22 <exec.parameters>-Xms128m -Xmx128m</exec.parameters>
23 <main.class>io.fd.honeycomb.infra.distro.Main</main.class>
24 <interfaces.mapping.version>1.17.07</interfaces.mapping.version>
25 <honeycomb.min.distro.version>1.17.07</honeycomb.min.distro.version>
27 Defines list of specific modules provided by the distribution
28 (adds them to base modules like NetconfModule and RestconfModule).
30 Module configuration is placed in 'modules' subdir of the target distro folder.
31 Modules can be disabled by commenting them out in the pom.xml
32 or modules configuration file.
34 <distribution.modules>
35 org.onap.vnf.vlb.Module
36 org.onap.vnf.health.Module
37 </distribution.modules>
43 <groupId>org.apache.maven.plugins</groupId>
44 <artifactId>maven-compiler-plugin</artifactId>
45 <version>3.3</version>
47 <!-- Use google's error-prone static analysis-->
48 <compilerId>javac-with-errorprone</compilerId>
49 <forceJavacCompilerUse>true</forceJavacCompilerUse>
50 <showWarnings>true</showWarnings>
56 <groupId>org.codehaus.plexus</groupId>
57 <artifactId>plexus-compiler-javac-errorprone</artifactId>
58 <version>2.5</version>
60 <!-- override plexus-compiler-javac-errorprone's dependency on
61 Error Prone with the latest version -->
63 <groupId>com.google.errorprone</groupId>
64 <artifactId>error_prone_core</artifactId>
65 <version>2.0.9</version>
70 <groupId>org.apache.maven.plugins</groupId>
71 <artifactId>maven-jar-plugin</artifactId>
75 <mainClass>${main.class}</mainClass>
76 <addClasspath>true</addClasspath>
77 <classpathPrefix>lib/</classpathPrefix>
78 <useUniqueVersions>false</useUniqueVersions>
79 <classpathMavenRepositoryLayout>true</classpathMavenRepositoryLayout>
82 <Class-Path>config/ cert/ modules/ yang-mapping/</Class-Path>
88 <groupId>org.apache.maven.plugins</groupId>
89 <artifactId>maven-dependency-plugin</artifactId>
92 <id>copy-dependencies</id>
93 <phase>package</phase>
95 <goal>copy-dependencies</goal>
98 <outputDirectory>${project.build.directory}/lib</outputDirectory>
99 <useBaseVersion>true</useBaseVersion>
100 <useRepositoryLayout>true</useRepositoryLayout>
101 <excludeArtifactIds>yang-jmx-generator</excludeArtifactIds>
105 <id>unpack-configuration</id>
106 <phase>prepare-package</phase>
108 <goal>unpack-dependencies</goal>
111 <includes>**/honeycomb-minimal-resources/</includes>
112 <outputDirectory>${project.build.outputDirectory}/</outputDirectory>
118 <!-- Generate shell script -->
120 <groupId>org.codehaus.gmaven</groupId>
121 <artifactId>groovy-maven-plugin</artifactId>
122 <version>2.0</version>
125 <phase>package</phase>
131 import java.nio.file.Paths
133 log.info "Generating shell exec script"
134 def scriptTemplate = properties.getOrDefault("start.script.template", "")
135 def args = properties.getOrDefault("exec.parameters", "")
136 log.debug "Additional shell exec script properties: ${args}"
137 def javaArgs = "${args} -jar \$(dirname \$0)/${project.artifactId}-${project.version}.jar"
138 def scriptParent = Paths.get(project.build.outputDirectory, "honeycomb-minimal-resources")
139 scriptParent.toFile().mkdirs()
140 def scriptContent = "java " + javaArgs
141 log.info "Generating shell exec script as ${scriptContent}"
142 def scriptPath = Paths.get(scriptParent.toString(), "honeycomb")
143 log.info "Writing shell exec script to ${scriptPath}"
144 scriptPath.toFile().text = String.format(scriptTemplate, scriptContent)
145 scriptPath.toFile().setExecutable(true)
147 scriptPath = Paths.get(scriptParent.toString(), "honeycomb-start")
148 log.info "Writing shell exec script to ${scriptPath}"
149 scriptPath.toFile().text = "\$(dirname \$0)/honeycomb &"
150 scriptPath.toFile().setExecutable(true)
152 def debug_args = properties.getOrDefault("debug.parameters", "")
153 def debugScriptContent = "java" + " ${debug_args} " + javaArgs
154 log.info "Generating shell debug script as ${debugScriptContent}"
155 scriptPath = Paths.get(scriptParent.toString(), "honeycomb-debug")
156 log.info "Writing shell debug script to ${scriptPath}"
157 scriptPath.toFile().text = String.format(scriptTemplate, debugScriptContent)
158 scriptPath.toFile().setExecutable(true)
165 <artifactId>maven-assembly-plugin</artifactId>
168 <groupId>io.fd.honeycomb.common</groupId>
169 <artifactId>minimal-assembly-descriptor</artifactId>
170 <version>1.17.07</version>
175 <id>create-archive</id>
176 <phase>package</phase>
182 <descriptorRef>honeycomb-minimal</descriptorRef>
189 <groupId>org.apache.maven.plugins</groupId>
190 <artifactId>maven-deploy-plugin</artifactId>
196 <groupId>org.apache.maven.plugins</groupId>
197 <artifactId>maven-install-plugin</artifactId>
203 <groupId>org.codehaus.mojo</groupId>
204 <artifactId>exec-maven-plugin</artifactId>
215 <artifactId>maven-checkstyle-plugin</artifactId>
224 <!-- Dependency on sample plugin -->
226 <groupId>org.onap.demo.vnf.vlb</groupId>
227 <artifactId>vlb-business-vnf-onap-plugin-impl</artifactId>
228 <version>${interfaces.mapping.version}</version>
231 <groupId>org.onap.demo.vnf.health</groupId>
232 <artifactId>health-vnf-onap-plugin-impl</artifactId>
233 <version>${interfaces.mapping.version}</version>
235 <!-- Dependency on distribution base -->
237 <groupId>io.fd.honeycomb</groupId>
238 <artifactId>minimal-distribution</artifactId>
239 <version>${honeycomb.min.distro.version}</version>