Add a Dockerfile for docker-making
[holmes/rule-management.git] / rulemgt-standalone / pom.xml
1 <?xml version="1.0"?>
2 <!--
3
4     Copyright 2017 ZTE Corporation.
5
6     Licensed under the Apache License, Version 2.0 (the "License");
7     you may not use this file except in compliance with the License.
8     You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12     Unless required by applicable law or agreed to in writing, software
13     distributed under the License is distributed on an "AS IS" BASIS,
14     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15     See the License for the specific language governing permissions and
16     limitations under the License.
17
18 -->
19 <project xmlns="http://maven.apache.org/POM/4.0.0"
20     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22     <parent>
23         <groupId>org.onap.holmes.rule-management</groupId>
24         <artifactId>holmes-rulemgt-parent</artifactId>
25         <version>1.0.0-SNAPSHOT</version>
26     </parent>
27
28     <artifactId>holmes-rulemgt-standalone</artifactId>
29     <modelVersion>4.0.0</modelVersion>
30     <name>holmes-rulemgt/holmes-rulemgt-standalone</name>
31     <packaging>pom</packaging>
32
33     <build>
34         <plugins>
35             <plugin>
36                 <artifactId>maven-resources-plugin</artifactId>
37                 <executions>
38                     <execution>
39                         <id>copy-resources-${linux64id}</id>
40                         <phase>process-resources</phase>
41                         <goals>
42                             <goal>copy-resources</goal>
43                         </goals>
44                         <configuration>
45                             <outputDirectory>${linux64outputdir}</outputDirectory>
46                             <resources>
47                                 <resource>
48                                     <directory>src/main/assembly/</directory>
49                                     <filtering>false</filtering>
50                                     <includes>
51                                         <include>**/*</include>
52                                     </includes>
53                                     <excludes>
54                                         <exclude>**/*.bat</exclude>
55                                         <exclude>Dockerfile</exclude>
56                                     </excludes>
57                                 </resource>
58                             </resources>
59                             <overwrite>true</overwrite>
60                         </configuration>
61                     </execution>
62                     <execution>
63                         <id>copy-resources-${win64id}</id>
64                         <phase>process-resources</phase>
65                         <goals>
66                             <goal>copy-resources</goal>
67                         </goals>
68                         <configuration>
69                             <outputDirectory>${win64outputdir}</outputDirectory>
70                             <resources>
71                                 <resource>
72                                     <directory>src/main/assembly/</directory>
73                                     <filtering>false</filtering>
74                                     <includes>
75                                         <include>**/*</include>
76                                     </includes>
77                                     <excludes>
78                                         <exclude>**/*.sh</exclude>
79                                         <exclude>Dockerfile</exclude>
80                                     </excludes>
81                                 </resource>
82                             </resources>
83                             <overwrite>true</overwrite>
84                         </configuration>
85                     </execution>
86                     <execution>
87                         <id>copy-dockerfile</id>
88                         <phase>process-resources</phase>
89                         <goals>
90                             <goal>copy-resources</goal>
91                         </goals>
92                         <configuration>
93                             <outputDirectory>target/version</outputDirectory>
94                             <resources>
95                                 <resource>
96                                     <directory>src/main/assembly/</directory>
97                                     <filtering>false</filtering>
98                                     <includes>
99                                         <include>Dockerfile</include>
100                                     </includes>
101                                 </resource>
102                             </resources>
103                             <overwrite>true</overwrite>
104                         </configuration>
105                     </execution>
106                 </executions>
107             </plugin>
108             <plugin>
109                 <groupId>org.apache.maven.plugins</groupId>
110                 <artifactId>maven-dependency-plugin</artifactId>
111                 <executions>
112                     <execution>
113                         <id>copy-jar-${linux64id}</id>
114                         <goals>
115                             <goal>copy</goal>
116                         </goals>
117                         <phase>prepare-package</phase>
118                         <configuration>
119                             <artifactItems>
120                                 <artifactItem>
121                                     <groupId>org.onap.holmes.rule-management</groupId>
122                                     <artifactId>holmes-rulemgt</artifactId>
123                                     <type>jar</type>
124                                     <overWrite>true</overWrite>
125                                     <outputDirectory>${linux64outputdir}</outputDirectory>
126                                     <destFileName>holmes-rulemgt.jar</destFileName>
127                                 </artifactItem>
128                             </artifactItems>
129                         </configuration>
130                     </execution>
131                     <execution>
132                         <id>copy-jar-${win64id}</id>
133                         <goals>
134                             <goal>copy</goal>
135                         </goals>
136                         <phase>prepare-package</phase>
137                         <configuration>
138                             <artifactItems>
139                                 <artifactItem>
140                                     <groupId>org.onap.holmes.rule-management</groupId>
141                                     <artifactId>holmes-rulemgt</artifactId>
142                                     <type>jar</type>
143                                     <overWrite>true</overWrite>
144                                     <outputDirectory>${win64outputdir}</outputDirectory>
145                                     <destFileName>holmes-rulemgt.jar</destFileName>
146                                 </artifactItem>
147                             </artifactItems>
148                         </configuration>
149                     </execution>
150                 </executions>
151             </plugin>
152             <plugin>
153                 <groupId>org.apache.maven.plugins</groupId>
154                 <artifactId>maven-assembly-plugin</artifactId>
155                 <executions>
156                     <execution>
157                         <id>linux64</id>
158                         <configuration>
159                             <descriptors>
160                                 <descriptor>linux64-assembly.xml</descriptor>
161                             </descriptors>
162                             <appendAssemblyId>true</appendAssemblyId>
163                             <outputDirectory>target/version</outputDirectory>
164                         </configuration>
165                         <phase>package</phase>
166                         <goals>
167                             <goal>attached</goal>
168                         </goals>
169                     </execution>
170                     <execution>
171                         <id>win64</id>
172                         <configuration>
173                             <descriptors>
174                                 <descriptor>win64-assembly.xml</descriptor>
175                             </descriptors>
176                             <appendAssemblyId>true</appendAssemblyId>
177                             <outputDirectory>target/version</outputDirectory>
178                         </configuration>
179                         <phase>package</phase>
180                         <goals>
181                             <goal>attached</goal>
182                         </goals>
183                     </execution>
184                 </executions>
185             </plugin>
186         </plugins>
187     </build>
188
189     <profiles>
190         <profile>
191             <id>docker</id>
192             <build>
193                 <plugins>
194                     <plugin>
195                         <groupId>io.fabric8</groupId>
196                         <artifactId>docker-maven-plugin</artifactId>
197                         <version>0.16.5</version>
198                         <inherited>false</inherited>
199                         <configuration>
200                             <images>
201                                 <image>
202                                     <name>onap/holmes/rule-management</name>
203                                     <build>
204                                         <cleanup>try</cleanup>
205                                         <dockerFileDir>${basedir}/target/version/</dockerFileDir>
206                                         <dockerFile>${basedir}/target/version/Dockerfile</dockerFile>
207                                         <tags>
208                                             <tag>${project.version}-STAGING-latest</tag>
209                                         </tags>
210                                     </build>
211                                 </image>
212                             </images>
213                         </configuration>
214                         <executions>
215                             <execution>
216                                 <id>generate-images</id>
217                                 <phase>package</phase>
218                                 <goals>
219                                     <goal>build</goal>
220                                 </goals>
221                             </execution>
222
223                             <execution>
224                                 <id>push-images</id>
225                                 <phase>deploy</phase>
226                                 <goals>
227                                     <goal>build</goal>
228                                     <goal>push</goal>
229                                 </goals>
230                             </execution>
231                         </executions>
232                     </plugin>
233                 </plugins>
234             </build>
235         </profile>
236     </profiles>
237
238     <dependencies>
239         <dependency>
240             <groupId>org.onap.holmes.rule-management</groupId>
241             <artifactId>holmes-rulemgt</artifactId>
242             <version>${project.version}</version>
243         </dependency>
244     </dependencies>
245 </project>