blob: 7f513eb001f95f96b8fc1c02f9b48460347b4154 [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>
AndyWalshe389cbad2019-04-09 14:05:08 +0000131 <executable>openssl</executable>
Szabolcs Hutvagner0c394102019-04-05 18:42:15 +0100132 <arguments>
AndyWalshe389cbad2019-04-09 14:05:08 +0000133 <argument>cms</argument>
134 <argument>-sign</argument>
135 <argument>-binary</argument>
136 <argument>-nocerts</argument>
137 <argument>-outform</argument>
138 <argument>pem</argument>
139 <argument>-signer</argument>
140 <argument>${project.basedir}/src/main/resources/securityContent/sample-pnf.cert</argument>
141 <argument>-inkey</argument>
142 <argument>${project.basedir}/src/main/resources/securityContent/sample-pnf-private-key.pem</argument>
143 <argument>-in</argument>
Szabolcs Hutvagner0c394102019-04-05 18:42:15 +0100144 <argument>${project.build.directory}/signed-csar/${csar.name}.csar</argument>
AndyWalshe389cbad2019-04-09 14:05:08 +0000145 <argument>-out</argument>
Szabolcs Hutvagner0c394102019-04-05 18:42:15 +0100146 <argument>${project.build.directory}/signed-csar/${csar.name}.cms</argument>
147 </arguments>
148 </configuration>
149 </plugin>
150 <plugin>
151 <artifactId>maven-assembly-plugin</artifactId>
152 <version>3.1.0</version>
153 <executions>
154 <execution>
155 <id>make-signed-csar-zip-file</id>
156 <phase>package</phase>
157 <goals>
158 <goal>single</goal>
159 </goals>
160 <configuration>
161 <finalName>${signed.csar.name}</finalName>
162 <attach>false</attach>
163 <appendAssemblyId>false</appendAssemblyId>
164 <descriptors>
165 <descriptor>src/main/assembly/signedZip.xml</descriptor>
166 </descriptors>
167 </configuration>
168 </execution>
169 </executions>
170 </plugin>
171 <plugin>
172 <groupId>org.jacoco</groupId>
173 <artifactId>jacoco-maven-plugin</artifactId>
174 <executions>
175 <execution>
176 <id>pre-unit-test</id>
177 <phase>none</phase>
178 </execution>
179 <execution>
180 <id>post-unit-test</id>
181 <phase>none</phase>
182 </execution>
183 <execution>
184 <id>pre-integration-test</id>
185 <phase>none</phase>
186 </execution>
187 <execution>
188 <id>post-integration-test</id>
189 <phase>none</phase>
190 </execution>
191 </executions>
192 </plugin>
193 <plugin>
194 <groupId>org.apache.maven.plugins</groupId>
195 <artifactId>maven-checkstyle-plugin</artifactId>
196 <executions>
197 <execution>
198 <id>onap-java-style</id>
199 <phase>none</phase>
200 </execution>
201 <execution>
202 <id>onap-license</id>
203 <phase>none</phase>
204 </execution>
205 </executions>
206 </plugin>
207 <plugin>
208 <groupId>org.apache.maven.plugins</groupId>
209 <artifactId>maven-failsafe-plugin</artifactId>
210 <executions>
211 <execution>
212 <id>integration-tests</id>
213 <phase>none</phase>
214 </execution>
215 </executions>
216 </plugin>
217 </plugins>
218 </build>
219</project>