[VERSION] Roll back to snapshot
[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"
3     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4
5     <parent>
6         <groupId>org.openecomp.sdnc.oam</groupId>
7         <artifactId>installation</artifactId>
8         <version>1.0.0-SNAPSHOT</version>
9     </parent>
10
11     <modelVersion>4.0.0</modelVersion>
12     <packaging>pom</packaging>
13     <groupId>org.openecomp.sdnc.oam</groupId>
14     <artifactId>installation-admportal</artifactId>
15     <version>1.0.0-SNAPSHOT</version>
16
17     <name>Installation - admportal</name>
18     <description>Creates admportal Docker container</description>
19
20     <properties>
21         <image.name>ecomp/admportal-sdnc-image</image.name>
22     </properties>
23
24
25     <build>
26         <plugins>
27
28
29             <plugin>
30                 <groupId>io.fabric8</groupId>
31                 <artifactId>docker-maven-plugin</artifactId>
32                 <version>0.16.5</version>
33                 <inherited>false</inherited>
34                 <configuration>
35
36                     <images>
37                         <image>
38                             <name>${image.name}</name>
39                             <build>
40                                 <cleanup>try</cleanup>
41                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
42                                 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
43                                 <tags>
44                                 <tag>${project.version}</tag>
45                                 <tag>latest</tag>
46                                 </tags>
47                             </build>
48                         </image>
49                     </images>
50                 </configuration>
51                 <executions>
52                     <execution>
53                         <id>generate-images</id>
54                         <phase>generate-sources</phase>
55                         <goals>
56                             <goal>build</goal>
57                         </goals>
58                     </execution>
59
60                     <execution>
61                         <id>push-images</id>
62                         <phase>deploy</phase>
63                         <goals>
64                             <goal>build</goal>
65                             <goal>push</goal>
66                         </goals>
67                     </execution>
68                 </executions>
69             </plugin>
70
71             <plugin>
72                 <artifactId>maven-resources-plugin</artifactId>
73                 <version>2.6</version>
74                 <executions>
75                     <execution>
76                         <id>copy-dockerfile</id>
77                         <goals>
78                             <goal>copy-resources</goal>
79                         </goals><!-- here the phase you need -->
80                         <phase>validate</phase>
81                         <configuration>
82                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
83                             <resources>
84                                 <resource>
85                                     <directory>src/main/docker</directory>
86                                     <includes>
87                                         <include>Dockerfile</include>
88                                     </includes>
89                                     <filtering>true</filtering>
90                                 </resource>
91                             </resources>
92                         </configuration>
93                     </execution>
94                     <execution>
95                         <id>copy-properties</id>
96                         <goals>
97                             <goal>copy-resources</goal>
98                         </goals><!-- here the phase you need -->
99                         <phase>validate</phase>
100                         <configuration>
101                             <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</outputDirectory>
102                             <resources>
103                                 <resource>
104                                     <directory>../src/main/properties</directory>
105                                     <includes>
106                                         <include>*.properties</include>
107                                         <include>*.properties.sdnctldb01</include>
108                                     </includes>
109                                     <filtering>false</filtering>
110                                 </resource>
111                             </resources>
112                         </configuration>
113                     </execution>
114                 </executions>
115             </plugin>
116             <plugin>
117                 <artifactId>exec-maven-plugin</artifactId>
118                 <groupId>org.codehaus.mojo</groupId>
119                 <executions>
120                     <execution>
121                         <id>Unzip admportal</id>
122                         <phase>generate-sources</phase>
123                         <goals>
124                             <goal>exec</goal>
125                         </goals>
126                         <configuration>
127                             <executable>/usr/bin/unzip</executable>
128                             <arguments>
129                                 <argument>-d</argument>
130                                 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
131                                 <argument>../../admportal/target/*.zip</argument>
132                             </arguments>
133                         </configuration>
134                     </execution>
135
136                     <execution>
137                         <id>Copy admportal config</id>
138                         <phase>generate-sources</phase>
139                         <goals>
140                             <goal>exec</goal>
141                         </goals>
142                         <configuration>
143                             <executable>/bin/cp</executable>
144                             <arguments>
145                                 <argument>../../admportal/config/admportal.json</argument>
146                                 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</argument>
147                             </arguments>
148                         </configuration>
149                     </execution>
150
151                     <execution>
152                         <id>Copy admportal config1</id>
153                         <phase>generate-sources</phase>
154                         <goals>
155                             <goal>exec</goal>
156                         </goals>
157                         <configuration>
158                             <executable>/bin/cp</executable>
159                             <arguments>
160                                 <argument>../../admportal/config/admportal.log4js.json</argument>
161                                 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</argument>
162                             </arguments>
163                         </configuration>
164                     </execution>
165
166
167                     <execution>
168                         <id>change shell permissions</id>
169                         <phase>process-sources</phase>
170                         <goals>
171                             <goal>exec</goal>
172                         </goals>
173                         <configuration>
174                             <executable>/usr/bin/find</executable>
175                             <arguments>
176                                 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
177                                 <argument>-name</argument>
178                                 <argument>*.sh</argument>
179                                 <argument>-exec</argument>
180                                 <argument>chmod</argument>
181                                 <argument>+x</argument>
182                                 <argument>{}</argument>
183                                 <argument>;</argument>
184                             </arguments>
185                         </configuration>
186                     </execution>
187                 </executions>
188             </plugin>
189
190
191         </plugins>
192
193     </build>
194     <organization>
195         <name>openECOMP</name>
196     </organization>
197 </project>