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