Chore: Add gerrit maven verify GHA workflow
[sdnc/oam.git] / installation / admportal / pom.xml
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">
3     <modelVersion>4.0.0</modelVersion>
4
5     <parent>
6         <groupId>org.onap.sdnc.oam</groupId>
7         <artifactId>installation</artifactId>
8         <version>2.2.0-SNAPSHOT</version>
9     </parent>
10
11     <groupId>org.onap.sdnc.oam</groupId>
12     <artifactId>installation-admportal</artifactId>
13     <version>2.2.0-SNAPSHOT</version>
14     <packaging>pom</packaging>
15
16     <name>sdnc-oam :: installation :: ${project.artifactId}</name>
17     <description>Creates admportal Docker container</description>
18     <organization>
19         <name>openECOMP</name>
20     </organization>
21
22     <properties>
23         <image.name>onap/admportal-sdnc-image</image.name>
24         <sdnc.project.version>${project.version}</sdnc.project.version>
25         <sdnc.build.timestamp>${maven.build.timestamp}</sdnc.build.timestamp>
26         <ccsdk.docker.version>${ccsdk.docker.ubuntu.version}</ccsdk.docker.version>
27         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
28     </properties>
29
30     <build>
31         <plugins>
32
33             <plugin>
34                 <groupId>org.codehaus.gmaven</groupId>
35                 <artifactId>groovy-maven-plugin</artifactId>
36                 <version>2.1.1</version>
37                 <executions>
38                     <execution>
39                         <phase>validate</phase>
40                         <goals>
41                             <goal>execute</goal>
42                         </goals>
43                         <configuration>
44                             <source>${basedir}/../TagVersion.groovy</source>
45                         </configuration>
46                     </execution>
47                 </executions>
48             </plugin>
49             <plugin>
50                 <groupId>io.fabric8</groupId>
51                 <artifactId>docker-maven-plugin</artifactId>
52                 <version>0.28.0</version>
53                 <inherited>false</inherited>
54                 <configuration>
55
56                     <images>
57                         <image>
58                             <name>${image.name}</name>
59                             <build>
60                                 <cleanup>try</cleanup>
61                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
62                                 <dockerFile>Dockerfile</dockerFile>
63                                 <tags>
64                                     <tag>${project.docker.latestminortag.version}</tag>
65                                     <tag>${project.docker.latestfulltag.version}</tag>
66                                     <tag>${project.docker.latesttagtimestamp.version}</tag>
67                                 </tags>
68                             </build>
69                         </image>
70                     </images>
71                 </configuration>
72                 <executions>
73                     <execution>
74                         <id>generate-images</id>
75                         <phase>process-sources</phase>
76                         <goals>
77                             <goal>build</goal>
78                         </goals>
79                     </execution>
80
81                     <execution>
82                         <id>push-images</id>
83                         <phase>deploy</phase>
84                         <goals>
85                             <goal>build</goal>
86                             <goal>push</goal>
87                         </goals>
88                     </execution>
89                 </executions>
90             </plugin>
91
92             <plugin>
93                 <artifactId>maven-resources-plugin</artifactId>
94                 <version>2.6</version>
95                 <executions>
96                     <execution>
97                         <id>copy-dockerfile</id>
98                         <goals>
99                             <goal>copy-resources</goal>
100                         </goals><!-- here the phase you need -->
101                         <phase>validate</phase>
102                         <configuration>
103                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
104                             <resources>
105                                 <resource>
106                                     <directory>src/main/docker</directory>
107                                     <includes>
108                                         <include>Dockerfile</include>
109                                     </includes>
110                                     <filtering>true</filtering>
111                                 </resource>
112                             </resources>
113                         </configuration>
114                     </execution>
115                     <execution>
116                         <id>copy-properties</id>
117                         <goals>
118                             <goal>copy-resources</goal>
119                         </goals><!-- here the phase you need -->
120                         <phase>validate</phase>
121                         <configuration>
122                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
123                             <resources>
124                                 <resource>
125                                     <directory>../src/main/properties</directory>
126                                     <includes>
127                                         <include>*.properties</include>
128                                         <include>*.properties.sdnctldb01</include>
129                                     </includes>
130                                     <filtering>false</filtering>
131                                 </resource>
132                             </resources>
133                         </configuration>
134                     </execution>
135                     <execution>
136                         <id>copy-keystores</id>
137                         <goals>
138                             <goal>copy-resources</goal>
139                         </goals><!-- here the phase you need -->
140                         <phase>validate</phase>
141                         <configuration>
142                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/stores</outputDirectory>
143                             <resources>
144                                 <resource>
145                                     <directory>../src/main/stores</directory>
146                                     <includes>
147                                         <include>*.p12</include>
148                                     </includes>
149                                     <filtering>false</filtering>
150                                 </resource>
151                             </resources>
152                         </configuration>
153                     </execution>
154                 </executions>
155             </plugin>
156             <plugin>
157                 <groupId>org.codehaus.mojo</groupId>
158                 <artifactId>exec-maven-plugin</artifactId>
159                 <version>1.5.0</version>
160                 <executions>
161                     <execution>
162                         <id>Unzip admportal</id>
163                         <phase>generate-sources</phase>
164                         <goals>
165                             <goal>exec</goal>
166                         </goals>
167                         <configuration>
168                             <executable>/usr/bin/unzip</executable>
169                             <arguments>
170                                 <argument>-d</argument>
171                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
172                                 <argument>../../admportal/target/*.zip</argument>
173                             </arguments>
174                         </configuration>
175                     </execution>
176
177                     <execution>
178                         <id>Copy admportal config</id>
179                         <phase>generate-sources</phase>
180                         <goals>
181                             <goal>exec</goal>
182                         </goals>
183                         <configuration>
184                             <executable>/bin/cp</executable>
185                             <arguments>
186                                 <argument>../../admportal/config/admportal.json</argument>
187                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</argument>
188                             </arguments>
189                         </configuration>
190                     </execution>
191
192                     <execution>
193                         <id>Copy admportal config1</id>
194                         <phase>generate-sources</phase>
195                         <goals>
196                             <goal>exec</goal>
197                         </goals>
198                         <configuration>
199                             <executable>/bin/cp</executable>
200                             <arguments>
201                                 <argument>../../admportal/config/admportal.log4js.json</argument>
202                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</argument>
203                             </arguments>
204                         </configuration>
205                     </execution>
206
207
208                     <execution>
209                         <id>change shell permissions</id>
210                         <phase>process-sources</phase>
211                         <goals>
212                             <goal>exec</goal>
213                         </goals>
214                         <configuration>
215                             <executable>/usr/bin/find</executable>
216                             <arguments>
217                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
218                                 <argument>-name</argument>
219                                 <argument>*.sh</argument>
220                                 <argument>-exec</argument>
221                                 <argument>chmod</argument>
222                                 <argument>+x</argument>
223                                 <argument>{}</argument>
224                                 <argument>;</argument>
225                             </arguments>
226                         </configuration>
227                     </execution>
228                 </executions>
229             </plugin>
230
231
232         </plugins>
233     </build>
234 </project>