Fix broken local build
[sdc.git] / openecomp-be / dist / sdc-onboard-db-init-docker / pom.xml
1 <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
2          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     <name>openecomp-sdc-docker-db-init</name>
6     <groupId>org.openecomp.sdc</groupId>
7     <artifactId>openecomp-sdc-docker-db-init</artifactId>
8     <packaging>pom</packaging>
9
10     <url>http://maven.apache.org</url>
11
12     <parent>
13         <groupId>org.openecomp.sdc</groupId>
14         <artifactId>openecomp-sdc-docker-dist</artifactId>
15         <version>1.7.2-SNAPSHOT</version>
16     </parent>
17
18
19     <properties>
20         <docker.image.name>sdc-onboard-cassandra-init</docker.image.name>
21         <docker.namespace>onap</docker.namespace>
22         <docker.password>docker</docker.password>
23         <docker.username>docker</docker.username>
24         <docker.registry>nexus3.onap.org:10001</docker.registry>
25     </properties>
26
27     <build>
28         <plugins>
29             <plugin>
30                 <artifactId>maven-resources-plugin</artifactId>
31                 <version>3.0.2</version>
32                 <executions>
33                     <execution>
34                         <id>copy-resources-war</id>
35                         <phase>verify</phase>
36                         <goals>
37                             <goal>copy-resources</goal>
38                         </goals>
39                         <configuration>
40                             <outputDirectory>${project.basedir}/artifacts</outputDirectory>
41                             <resources>
42                                 <resource>
43                                     <directory>
44                                         ${project.parent.basedir}/../../openecomp-be/tools/install/database
45                                     </directory>
46                                     <includes>
47                                         <include>init_keyspaces.cql</include>
48                                         <include>init_schemas.cql</include>
49                                         <include>alter_tables.cql</include>
50                                     </includes>
51                                 </resource>
52                             </resources>
53                         </configuration>
54                     </execution>
55                 </executions>
56             </plugin>
57             <plugin>
58                 <groupId>io.fabric8</groupId>
59                 <artifactId>docker-maven-plugin</artifactId>
60
61                 <configuration>
62                     <apiVersion>${docker.api.version}</apiVersion>
63                     <registry>nexus3.onap.org:10001</registry>
64                     <authConfig>
65                         <pull>
66                             <username>${docker.username}</username>
67                             <password>${docker.password}</password>
68                         </pull>
69                     </authConfig>
70                     <images>
71
72                         <!-- Build backend image -->
73                         <image>
74                             <name>${docker.namespace}/${docker.image.name}</name>
75                             <alias>${docker.image.name}</alias>
76                             <build>
77                                 <cleanup>try</cleanup>
78                                 <dockerFileDir>${project.basedir}/artifacts</dockerFileDir>
79                                 <tags>
80                                     <tag>latest</tag>
81                                     <tag>
82                                         ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest
83                                     </tag>
84                                     <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-${maven.build.timestamp}</tag>
85                                 </tags>
86                             </build>
87                         </image>
88                     </images>
89                 </configuration>
90                 <executions>
91                     <execution>
92                         <id>clean-images</id>
93                         <phase>pre-clean</phase>
94                         <goals>
95                             <goal>remove</goal>
96                         </goals>
97                         <configuration>
98                             <removeAll>true</removeAll>
99                             <image>${docker.namespace}/${docker.image.name}</image>
100                         </configuration>
101                     </execution>
102
103                     <execution>
104                         <id>generate-images</id>
105                         <phase>install</phase>
106                         <goals>
107                             <goal>build</goal>
108                         </goals>
109                     </execution>
110
111                     <execution>
112                         <id>push-images</id>
113                         <phase>deploy</phase>
114                         <goals>
115                             <goal>push</goal>
116                         </goals>
117                         <configuration>
118                             <image>${docker.namespace}/${docker.image.name}</image>
119                         </configuration>
120                     </execution>
121                 </executions>
122             </plugin>
123         </plugins>
124     </build>
125 </project>