blob: e9b057d6fee1c1552943584b60287dd14fb1bf22 [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>
Szabolcs Hutvagnerc85fd282019-04-17 14:07:00 +010022 <signed.csar.name.cms.includes.cert>sample-signed-pnf-cms-includes-cert-${version}</signed.csar.name.cms.includes.cert>
Szabolcs Hutvagner0c394102019-04-05 18:42:15 +010023 </properties>
24
25 <build>
26 <plugins>
27 <plugin>
28 <groupId>org.apache.maven.plugins</groupId>
29 <artifactId>maven-resources-plugin</artifactId>
30 <version>3.1.0</version>
31 <executions>
32 <execution>
33 <id>aggregate-csar-resources</id>
34 <phase>process-resources</phase>
35 <goals>
36 <goal>copy-resources</goal>
37 </goals>
38 <configuration>
39 <outputDirectory>${project.build.directory}/csar</outputDirectory>
40 <resources>
41 <resource>
42 <directory>src/main/resources/csarContent</directory>
43 <filtering>true</filtering>
44 <includes>
45 <include>**/*</include>
46 </includes>
47 </resource>
48 </resources>
49 </configuration>
50 </execution>
51 </executions>
52 </plugin>
53 <plugin>
54 <artifactId>maven-assembly-plugin</artifactId>
55 <version>3.1.0</version>
56 <executions>
57 <execution>
58 <id>make-csar-zip-file</id>
59 <phase>prepare-package</phase>
60 <goals>
61 <goal>single</goal>
62 </goals>
63 <configuration>
64 <finalName>${csar.name}</finalName>
65 <attach>false</attach>
66 <appendAssemblyId>false</appendAssemblyId>
67 <descriptors>
68 <descriptor>src/main/assembly/zip.xml</descriptor>
69 </descriptors>
70 </configuration>
71 </execution>
72 </executions>
73 </plugin>
74 <plugin>
75 <groupId>com.coderplus.maven.plugins</groupId>
76 <artifactId>copy-rename-maven-plugin</artifactId>
77 <version>1.0</version>
78 <executions>
79 <execution>
80 <id>rename-zip-to-csar</id>
81 <phase>prepare-package</phase>
82 <goals>
83 <goal>rename</goal>
84 </goals>
85 <configuration>
86 <sourceFile>${project.build.directory}/${csar.name}.zip</sourceFile>
87 <destinationFile>${project.build.directory}/${csar.name}.csar</destinationFile>
88 </configuration>
89 </execution>
Szabolcs Hutvagner0c394102019-04-05 18:42:15 +010090 <execution>
Szabolcs Hutvagnerc85fd282019-04-17 14:07:00 +010091 <id>copy-csar-and-cert-to-signed-csar-dirs</id>
Szabolcs Hutvagner0c394102019-04-05 18:42:15 +010092 <phase>prepare-package</phase>
93 <goals>
94 <goal>copy</goal>
95 </goals>
96 <configuration>
97 <fileSets>
98 <fileSet>
99 <sourceFile>src/main/resources/securityContent/sample-pnf.cert</sourceFile>
100 <destinationFile>${project.build.directory}/signed-csar/${csar.name}.cert</destinationFile>
101 </fileSet>
102 <fileSet>
103 <sourceFile>${project.build.directory}/${csar.name}.csar</sourceFile>
104 <destinationFile>${project.build.directory}/signed-csar/${csar.name}.csar</destinationFile>
105 </fileSet>
Szabolcs Hutvagnerc85fd282019-04-17 14:07:00 +0100106 <fileSet>
107 <sourceFile>${project.build.directory}/${csar.name}.csar</sourceFile>
108 <destinationFile>${project.build.directory}/signed-csar-cms-includes-cert/${csar.name}.csar</destinationFile>
109 </fileSet>
Szabolcs Hutvagner0c394102019-04-05 18:42:15 +0100110 </fileSets>
111 </configuration>
112 </execution>
113 </executions>
114 </plugin>
115 <plugin>
116 <groupId>org.codehaus.mojo</groupId>
117 <artifactId>exec-maven-plugin</artifactId>
Szabolcs Hutvagnerc85fd282019-04-17 14:07:00 +0100118 <version>1.3.2</version>
Szabolcs Hutvagner0c394102019-04-05 18:42:15 +0100119 <executions>
120 <execution>
121 <id>generate-signature</id>
122 <phase>prepare-package</phase>
123 <goals>
124 <goal>exec</goal>
125 </goals>
Szabolcs Hutvagnerc85fd282019-04-17 14:07:00 +0100126 <configuration>
127 <executable>openssl</executable>
128 <arguments>
129 <argument>cms</argument>
130 <argument>-sign</argument>
131 <argument>-binary</argument>
132 <argument>-nocerts</argument>
133 <argument>-outform</argument>
134 <argument>pem</argument>
135 <argument>-signer</argument>
136 <argument>${project.basedir}/src/main/resources/securityContent/sample-pnf.cert</argument>
137 <argument>-inkey</argument>
138 <argument>${project.basedir}/src/main/resources/securityContent/sample-pnf-private-key.pem</argument>
139 <argument>-in</argument>
140 <argument>${project.build.directory}/signed-csar/${csar.name}.csar</argument>
141 <argument>-out</argument>
142 <argument>${project.build.directory}/signed-csar/${csar.name}.cms</argument>
143 </arguments>
144 </configuration>
145 </execution>
146 <execution>
147 <id>generate-signature-cms-includes-cert</id>
148 <phase>prepare-package</phase>
149 <goals>
150 <goal>exec</goal>
151 </goals>
152 <configuration>
153 <executable>openssl</executable>
154 <arguments>
155 <argument>cms</argument>
156 <argument>-sign</argument>
157 <argument>-binary</argument>
158 <argument>-outform</argument>
159 <argument>pem</argument>
160 <argument>-signer</argument>
161 <argument>${project.basedir}/src/main/resources/securityContent/sample-pnf.cert</argument>
162 <argument>-inkey</argument>
163 <argument>${project.basedir}/src/main/resources/securityContent/sample-pnf-private-key.pem</argument>
164 <argument>-in</argument>
165 <argument>${project.build.directory}/signed-csar-cms-includes-cert/${csar.name}.csar</argument>
166 <argument>-out</argument>
167 <argument>${project.build.directory}/signed-csar-cms-includes-cert/${csar.name}.cms</argument>
168 </arguments>
169 </configuration>
Szabolcs Hutvagner0c394102019-04-05 18:42:15 +0100170 </execution>
171 </executions>
Szabolcs Hutvagner0c394102019-04-05 18:42:15 +0100172 </plugin>
173 <plugin>
174 <artifactId>maven-assembly-plugin</artifactId>
175 <version>3.1.0</version>
176 <executions>
177 <execution>
178 <id>make-signed-csar-zip-file</id>
179 <phase>package</phase>
180 <goals>
181 <goal>single</goal>
182 </goals>
183 <configuration>
184 <finalName>${signed.csar.name}</finalName>
185 <attach>false</attach>
186 <appendAssemblyId>false</appendAssemblyId>
187 <descriptors>
188 <descriptor>src/main/assembly/signedZip.xml</descriptor>
189 </descriptors>
190 </configuration>
191 </execution>
Szabolcs Hutvagnerc85fd282019-04-17 14:07:00 +0100192 <execution>
193 <id>make-signed-csar-zip-file-cms-includes-cert</id>
194 <phase>package</phase>
195 <goals>
196 <goal>single</goal>
197 </goals>
198 <configuration>
199 <finalName>${signed.csar.name.cms.includes.cert}</finalName>
200 <attach>false</attach>
201 <appendAssemblyId>false</appendAssemblyId>
202 <descriptors>
203 <descriptor>src/main/assembly/signedZipCmsIncludesCert.xml</descriptor>
204 </descriptors>
205 </configuration>
206 </execution>
Szabolcs Hutvagner0c394102019-04-05 18:42:15 +0100207 </executions>
208 </plugin>
209 <plugin>
210 <groupId>org.jacoco</groupId>
211 <artifactId>jacoco-maven-plugin</artifactId>
212 <executions>
213 <execution>
214 <id>pre-unit-test</id>
215 <phase>none</phase>
216 </execution>
217 <execution>
218 <id>post-unit-test</id>
219 <phase>none</phase>
220 </execution>
221 <execution>
222 <id>pre-integration-test</id>
223 <phase>none</phase>
224 </execution>
225 <execution>
226 <id>post-integration-test</id>
227 <phase>none</phase>
228 </execution>
229 </executions>
230 </plugin>
231 <plugin>
232 <groupId>org.apache.maven.plugins</groupId>
233 <artifactId>maven-checkstyle-plugin</artifactId>
234 <executions>
235 <execution>
236 <id>onap-java-style</id>
237 <phase>none</phase>
238 </execution>
239 <execution>
240 <id>onap-license</id>
241 <phase>none</phase>
242 </execution>
243 </executions>
244 </plugin>
245 <plugin>
246 <groupId>org.apache.maven.plugins</groupId>
247 <artifactId>maven-failsafe-plugin</artifactId>
248 <executions>
249 <execution>
250 <id>integration-tests</id>
251 <phase>none</phase>
252 </execution>
253 </executions>
254 </plugin>
255 </plugins>
256 </build>
257</project>