Merge "Add Swagger Related Configurations"
[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                                 <resource>
59                                     <directory>../rulemgt/src/main/resources</directory>
60                                     <filtering>false</filtering>
61                                 </resource>
62                             </resources>
63                             <overwrite>true</overwrite>
64                         </configuration>
65                     </execution>
66                     <execution>
67                         <id>copy-resources-${win64id}</id>
68                         <phase>process-resources</phase>
69                         <goals>
70                             <goal>copy-resources</goal>
71                         </goals>
72                         <configuration>
73                             <outputDirectory>${win64outputdir}</outputDirectory>
74                             <resources>
75                                 <resource>
76                                     <directory>src/main/assembly/</directory>
77                                     <filtering>false</filtering>
78                                     <includes>
79                                         <include>**/*</include>
80                                     </includes>
81                                     <excludes>
82                                         <exclude>**/*.sh</exclude>
83                                         <exclude>Dockerfile</exclude>
84                                     </excludes>
85                                 </resource>
86                                 <resource>
87                                     <directory>../rulemgt/src/main/resources</directory>
88                                     <filtering>false</filtering>
89                                 </resource>
90                             </resources>
91                             <overwrite>true</overwrite>
92                         </configuration>
93                     </execution>
94                     <execution>
95                         <id>copy-dockerfile</id>
96                         <phase>process-resources</phase>
97                         <goals>
98                             <goal>copy-resources</goal>
99                         </goals>
100                         <configuration>
101                             <outputDirectory>target/version</outputDirectory>
102                             <resources>
103                                 <resource>
104                                     <directory>src/main/assembly/</directory>
105                                     <filtering>false</filtering>
106                                     <includes>
107                                         <include>Dockerfile</include>
108                                     </includes>
109                                 </resource>
110                             </resources>
111                             <overwrite>true</overwrite>
112                         </configuration>
113                     </execution>
114                 </executions>
115             </plugin>
116             <plugin>
117                 <groupId>org.apache.maven.plugins</groupId>
118                 <artifactId>maven-dependency-plugin</artifactId>
119                 <executions>
120                     <execution>
121                         <id>copy-jar-${linux64id}</id>
122                         <goals>
123                             <goal>copy</goal>
124                         </goals>
125                         <phase>prepare-package</phase>
126                         <configuration>
127                             <artifactItems>
128                                 <artifactItem>
129                                     <groupId>org.onap.holmes.rule-management</groupId>
130                                     <artifactId>holmes-rulemgt</artifactId>
131                                     <type>jar</type>
132                                     <overWrite>true</overWrite>
133                                     <outputDirectory>${linux64outputdir}</outputDirectory>
134                                     <destFileName>holmes-rulemgt.jar</destFileName>
135                                 </artifactItem>
136                             </artifactItems>
137                         </configuration>
138                     </execution>
139                     <execution>
140                         <id>copy-jar-${win64id}</id>
141                         <goals>
142                             <goal>copy</goal>
143                         </goals>
144                         <phase>prepare-package</phase>
145                         <configuration>
146                             <artifactItems>
147                                 <artifactItem>
148                                     <groupId>org.onap.holmes.rule-management</groupId>
149                                     <artifactId>holmes-rulemgt</artifactId>
150                                     <type>jar</type>
151                                     <overWrite>true</overWrite>
152                                     <outputDirectory>${win64outputdir}</outputDirectory>
153                                     <destFileName>holmes-rulemgt.jar</destFileName>
154                                 </artifactItem>
155                             </artifactItems>
156                         </configuration>
157                     </execution>
158                 </executions>
159             </plugin>
160             <plugin>
161                 <groupId>org.apache.maven.plugins</groupId>
162                 <artifactId>maven-assembly-plugin</artifactId>
163                 <executions>
164                     <execution>
165                         <id>linux64</id>
166                         <configuration>
167                             <descriptors>
168                                 <descriptor>linux64-assembly.xml</descriptor>
169                             </descriptors>
170                             <appendAssemblyId>true</appendAssemblyId>
171                             <outputDirectory>target/version</outputDirectory>
172                         </configuration>
173                         <phase>package</phase>
174                         <goals>
175                             <goal>attached</goal>
176                         </goals>
177                     </execution>
178                     <execution>
179                         <id>win64</id>
180                         <configuration>
181                             <descriptors>
182                                 <descriptor>win64-assembly.xml</descriptor>
183                             </descriptors>
184                             <appendAssemblyId>true</appendAssemblyId>
185                             <outputDirectory>target/version</outputDirectory>
186                         </configuration>
187                         <phase>package</phase>
188                         <goals>
189                             <goal>attached</goal>
190                         </goals>
191                     </execution>
192                 </executions>
193             </plugin>
194         </plugins>
195     </build>
196
197     <profiles>
198         <profile>
199             <id>docker</id>
200             <build>
201                 <plugins>
202                     <plugin>
203                         <groupId>io.fabric8</groupId>
204                         <artifactId>docker-maven-plugin</artifactId>
205                         <version>0.16.5</version>
206                         <inherited>false</inherited>
207                         <configuration>
208                             <images>
209                                 <image>
210                                     <name>onap/holmes/rule-management</name>
211                                     <build>
212                                         <cleanup>try</cleanup>
213                                         <dockerFileDir>${basedir}/target/version/</dockerFileDir>
214                                         <dockerFile>${basedir}/target/version/Dockerfile</dockerFile>
215                                         <tags>
216                                             <tag>${project.version}-STAGING-latest</tag>
217                                         </tags>
218                                     </build>
219                                 </image>
220                             </images>
221                         </configuration>
222                         <executions>
223                             <execution>
224                                 <id>generate-images</id>
225                                 <phase>package</phase>
226                                 <goals>
227                                     <goal>build</goal>
228                                 </goals>
229                             </execution>
230
231                             <execution>
232                                 <id>push-images</id>
233                                 <phase>deploy</phase>
234                                 <goals>
235                                     <goal>build</goal>
236                                     <goal>push</goal>
237                                 </goals>
238                             </execution>
239                         </executions>
240                     </plugin>
241                 </plugins>
242             </build>
243         </profile>
244     </profiles>
245
246     <dependencies>
247         <dependency>
248             <groupId>org.onap.holmes.rule-management</groupId>
249             <artifactId>holmes-rulemgt</artifactId>
250             <version>${project.version}</version>
251         </dependency>
252     </dependencies>
253 </project>