blob: 569d1e2e49984dd720f6bdd20c3977c9df283032 [file] [log] [blame]
Szabolcs Hutvagner0c394102019-04-05 18:42:15 +01001<?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">
3 <modelVersion>4.0.0</modelVersion>
4
5 <parent>
6 <groupId>org.onap.oparent</groupId>
7 <artifactId>oparent</artifactId>
8 <version>1.2.3</version>
9 </parent>
10
11 <groupId>org.onap.pnf-onboarding</groupId>
12 <artifactId>pnf-onboarding-test-csar</artifactId>
13 <version>1.0.1-SNAPSHOT</version>
14 <packaging>pom</packaging>
15
16 <properties>
17 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
18 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
19 <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
20 <csar.name>sample-pnf-${version}</csar.name>
21 <signed.csar.name>sample-signed-pnf-${version}</signed.csar.name>
22 </properties>
23
24 <build>
25 <plugins>
26 <plugin>
27 <groupId>org.apache.maven.plugins</groupId>
28 <artifactId>maven-resources-plugin</artifactId>
29 <version>3.1.0</version>
30 <executions>
31 <execution>
32 <id>aggregate-csar-resources</id>
33 <phase>process-resources</phase>
34 <goals>
35 <goal>copy-resources</goal>
36 </goals>
37 <configuration>
38 <outputDirectory>${project.build.directory}/csar</outputDirectory>
39 <resources>
40 <resource>
41 <directory>src/main/resources/csarContent</directory>
42 <filtering>true</filtering>
43 <includes>
44 <include>**/*</include>
45 </includes>
46 </resource>
47 </resources>
48 </configuration>
49 </execution>
50 </executions>
51 </plugin>
52 <plugin>
53 <artifactId>maven-assembly-plugin</artifactId>
54 <version>3.1.0</version>
55 <executions>
56 <execution>
57 <id>make-csar-zip-file</id>
58 <phase>prepare-package</phase>
59 <goals>
60 <goal>single</goal>
61 </goals>
62 <configuration>
63 <finalName>${csar.name}</finalName>
64 <attach>false</attach>
65 <appendAssemblyId>false</appendAssemblyId>
66 <descriptors>
67 <descriptor>src/main/assembly/zip.xml</descriptor>
68 </descriptors>
69 </configuration>
70 </execution>
71 </executions>
72 </plugin>
73 <plugin>
74 <groupId>com.coderplus.maven.plugins</groupId>
75 <artifactId>copy-rename-maven-plugin</artifactId>
76 <version>1.0</version>
77 <executions>
78 <execution>
79 <id>rename-zip-to-csar</id>
80 <phase>prepare-package</phase>
81 <goals>
82 <goal>rename</goal>
83 </goals>
84 <configuration>
85 <sourceFile>${project.build.directory}/${csar.name}.zip</sourceFile>
86 <destinationFile>${project.build.directory}/${csar.name}.csar</destinationFile>
87 </configuration>
88 </execution>
89 </executions>
90 </plugin>
91 <plugin>
92 <groupId>com.coderplus.maven.plugins</groupId>
93 <artifactId>copy-rename-maven-plugin</artifactId>
94 <version>1.0</version>
95 <executions>
96 <execution>
97 <id>copy-csar-and-cert-to-signed-csar-dir</id>
98 <phase>prepare-package</phase>
99 <goals>
100 <goal>copy</goal>
101 </goals>
102 <configuration>
103 <fileSets>
104 <fileSet>
105 <sourceFile>src/main/resources/securityContent/sample-pnf.cert</sourceFile>
106 <destinationFile>${project.build.directory}/signed-csar/${csar.name}.cert</destinationFile>
107 </fileSet>
108 <fileSet>
109 <sourceFile>${project.build.directory}/${csar.name}.csar</sourceFile>
110 <destinationFile>${project.build.directory}/signed-csar/${csar.name}.csar</destinationFile>
111 </fileSet>
112 </fileSets>
113 </configuration>
114 </execution>
115 </executions>
116 </plugin>
117 <plugin>
118 <groupId>org.codehaus.mojo</groupId>
119 <artifactId>exec-maven-plugin</artifactId>
120 <version>1.3.2</version> <!-- Check version -->
121 <executions>
122 <execution>
123 <id>generate-signature</id>
124 <phase>prepare-package</phase>
125 <goals>
126 <goal>exec</goal>
127 </goals>
128 </execution>
129 </executions>
130 <configuration>
131 <executable>src/main/scripts/generate-signature.sh</executable>
132 <arguments>
133 <argument>src/main/resources/securityContent/sample-pnf.cert</argument>
134 <argument>src/main/resources/securityContent/sample-pnf-private-key.pem</argument>
135 <argument>${project.build.directory}/signed-csar/${csar.name}.csar</argument>
136 <argument>${project.build.directory}/signed-csar/${csar.name}.cms</argument>
137 </arguments>
138 </configuration>
139 </plugin>
140 <plugin>
141 <artifactId>maven-assembly-plugin</artifactId>
142 <version>3.1.0</version>
143 <executions>
144 <execution>
145 <id>make-signed-csar-zip-file</id>
146 <phase>package</phase>
147 <goals>
148 <goal>single</goal>
149 </goals>
150 <configuration>
151 <finalName>${signed.csar.name}</finalName>
152 <attach>false</attach>
153 <appendAssemblyId>false</appendAssemblyId>
154 <descriptors>
155 <descriptor>src/main/assembly/signedZip.xml</descriptor>
156 </descriptors>
157 </configuration>
158 </execution>
159 </executions>
160 </plugin>
161 <plugin>
162 <groupId>org.jacoco</groupId>
163 <artifactId>jacoco-maven-plugin</artifactId>
164 <executions>
165 <execution>
166 <id>pre-unit-test</id>
167 <phase>none</phase>
168 </execution>
169 <execution>
170 <id>post-unit-test</id>
171 <phase>none</phase>
172 </execution>
173 <execution>
174 <id>pre-integration-test</id>
175 <phase>none</phase>
176 </execution>
177 <execution>
178 <id>post-integration-test</id>
179 <phase>none</phase>
180 </execution>
181 </executions>
182 </plugin>
183 <plugin>
184 <groupId>org.apache.maven.plugins</groupId>
185 <artifactId>maven-checkstyle-plugin</artifactId>
186 <executions>
187 <execution>
188 <id>onap-java-style</id>
189 <phase>none</phase>
190 </execution>
191 <execution>
192 <id>onap-license</id>
193 <phase>none</phase>
194 </execution>
195 </executions>
196 </plugin>
197 <plugin>
198 <groupId>org.apache.maven.plugins</groupId>
199 <artifactId>maven-failsafe-plugin</artifactId>
200 <executions>
201 <execution>
202 <id>integration-tests</id>
203 <phase>none</phase>
204 </execution>
205 </executions>
206 </plugin>
207 </plugins>
208 </build>
209</project>