5da897689e0c2bb9c52688285b97c664b51aa4bc
[sdnc/oam.git] / installation / sdnc-web / 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-sdnc-web</artifactId>
13     <version>2.2.0-SNAPSHOT</version>
14     <packaging>pom</packaging>
15
16     <name>sdnc-oam :: installation :: ${project.artifactId}</name>
17     <description>Creates SDN Controller WebUI Docker container</description>
18
19     <properties>
20         <base.image.repo>docker.io/bitnami/nginx:1.16-debian-9</base.image.repo>
21         <image.name>onap/sdnc-web-image</image.name>
22         <sdnc.project.version>${project.version}</sdnc.project.version>
23         <sdnc.build.timestamp>${maven.build.timestamp}</sdnc.build.timestamp>
24         <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
25         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
26         <docker.push.phase>deploy</docker.push.phase>
27         <docker.verbose>true</docker.verbose>
28     </properties>
29
30     <dependencies>
31         <dependency>
32             <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
33             <artifactId>sdnr-wt-odlux-installer</artifactId>
34             <version>${ccsdk.features.version}</version>
35             <type>zip</type>
36             <classifier>repo</classifier>
37         </dependency>
38     </dependencies>
39
40     <build>
41         <plugins>
42             <plugin>
43                 <groupId>org.codehaus.groovy.maven</groupId>
44                 <artifactId>gmaven-plugin</artifactId>
45                 <version>1.0</version>
46                 <executions>
47                     <execution>
48                         <phase>validate</phase>
49                         <goals>
50                             <goal>execute</goal>
51                         </goals>
52                         <configuration>
53                             <source>${basedir}/../TagVersion.groovy</source>
54                         </configuration>
55                     </execution>
56                 </executions>
57             </plugin>
58             <plugin>
59                 <artifactId>maven-resources-plugin</artifactId>
60                 <version>2.6</version>
61                 <executions>
62                     <execution>
63                         <id>copy-dockerfile</id>
64                         <goals>
65                             <goal>copy-resources</goal>
66                         </goals>                        <!-- here the phase you need -->
67                         <phase>validate</phase>
68                         <configuration>
69                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
70                             <resources>
71                                 <resource>
72                                     <directory>src/main/docker</directory>
73                                     <includes>
74                                         <include>Dockerfile</include>
75                                     </includes>
76                                     <filtering>true</filtering>
77                                 </resource>
78                             </resources>
79                         </configuration>
80                     </execution>
81                     <execution>
82                         <id>copy-siteconf</id>
83                         <goals>
84                             <goal>copy-resources</goal>
85                         </goals>                        <!-- here the phase you need -->
86                         <phase>validate</phase>
87                         <configuration>
88                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
89                             <resources>
90                                 <resource>
91                                     <directory>src/main/resources</directory>
92                                     <includes>
93                                         <include>*.conf</include>
94                                     </includes>
95                                     <filtering>true</filtering>
96                                 </resource>
97                             </resources>
98                         </configuration>
99                     </execution>
100
101                     <execution>
102                         <id>copy-scripts</id>
103                         <goals>
104                             <goal>copy-resources</goal>
105                         </goals>                        <!-- here the phase you need -->
106                         <phase>validate</phase>
107                         <configuration>
108                             <outputDirectory>${basedir}/target/docker-stage/bin</outputDirectory>
109                             <resources>
110                                 <resource>
111                                     <directory>src/main/scripts</directory>
112                                     <includes>
113                                         <include>*.sh</include>
114                                     </includes>
115                                     <filtering>true</filtering>
116                                 </resource>
117                             </resources>
118                         </configuration>
119                     </execution>
120                 </executions>
121             </plugin>
122             <plugin>
123                 <groupId>org.apache.maven.plugins</groupId>
124                 <artifactId>maven-dependency-plugin</artifactId>
125                 <executions>
126                     <execution>
127                         <id>unpack features</id>
128                         <phase>generate-sources</phase>
129                         <goals>
130                             <goal>unpack-dependencies</goal>
131                         </goals>
132                         <configuration>
133                             <outputDirectory>${basedir}/target/docker-stage/html</outputDirectory>
134                             <excludeTransitive>true</excludeTransitive>
135                             <overWriteReleases>false</overWriteReleases>
136                             <overWriteSnapshots>true</overWriteSnapshots>
137                             <overWriteIfNewer>true</overWriteIfNewer>
138                         </configuration>
139                     </execution>
140                 </executions>
141             </plugin>
142             <plugin>
143                 <groupId>io.fabric8</groupId>
144                 <artifactId>docker-maven-plugin</artifactId>
145                 <version>0.16.5</version>
146                 <inherited>false</inherited>
147                 <configuration>
148                     <images>
149                         <image>
150                             <name>${image.name}</name>
151                             <build>
152                                 <cleanup>try</cleanup>
153                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
154                                 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
155                                 <tags>
156                                     <tag>${project.docker.latestminortag.version}</tag>
157                                     <tag>${project.docker.latestfulltag.version}</tag>
158                                     <tag>${project.docker.latesttagtimestamp.version}</tag>
159                                 </tags>
160                             </build>
161                         </image>
162                     </images>
163                 </configuration>
164                 <executions>
165                     <execution>
166                         <id>generate-images</id>
167                         <phase>package</phase>
168                         <goals>
169                             <goal>build</goal>
170                         </goals>
171                     </execution>
172                     <execution>
173                         <id>push-images</id>
174                         <phase>${docker.push.phase}</phase>
175                         <goals>
176                             <goal>build</goal>
177                             <goal>push</goal>
178                         </goals>
179                     </execution>
180                 </executions>
181             </plugin>
182         </plugins>
183     </build>
184 </project>