Simplify esr-server project level.
[aai/esr-server.git] / standalone / pom.xml
1 <?xml version="1.0"?>
2 <!--
3
4     Copyright 2016-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" 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">
20     <parent>
21                 <groupId>org.onap.aai.esr-server</groupId>
22                 <artifactId>aai-esr-server-parent</artifactId>
23                 <version>1.0.0-SNAPSHOT</version>
24         </parent>
25
26     <modelVersion>4.0.0</modelVersion>
27     <artifactId>standalone</artifactId>
28     <name>esr-server/standalone</name>
29     <packaging>pom</packaging>
30
31     <properties>
32         <packagename>esr-server</packagename>
33         <linux64id>linux64</linux64id>
34         <win64id>win64</win64id>
35         <linux64outputdir>target/assembly/${linux64id}</linux64outputdir>
36         <win64outputdir>target/assembly/${win64id}</win64outputdir>
37         <version.output>target/version</version.output>
38     </properties>
39
40     <build>
41         <plugins>
42             <plugin>
43                 <artifactId>maven-resources-plugin</artifactId>
44                 <executions>
45                     <execution>
46                         <id>copy-resources-${linux64id}</id>
47                         <phase>process-resources</phase>
48                         <goals>
49                             <goal>copy-resources</goal>
50                         </goals>
51                         <configuration>
52                             <outputDirectory>${linux64outputdir}</outputDirectory>
53                             <resources>
54                                 <resource>
55                                     <directory>src/main/assembly/</directory>
56                                     <filtering>false</filtering>
57                                     <includes>
58                                         <include>**/*</include>
59                                     </includes>
60                                     <excludes>
61                                         <exclude>**/*.bat</exclude>
62                                     </excludes>
63                                 </resource>
64                             </resources>
65                             <overwrite>true</overwrite>
66                         </configuration>
67                     </execution>
68                     <execution>
69                         <id>copy-resources-${win64id}</id>
70                         <phase>process-resources</phase>
71                         <goals>
72                             <goal>copy-resources</goal>
73                         </goals>
74                         <configuration>
75                             <outputDirectory>${win64outputdir}</outputDirectory>
76                             <resources>
77                                 <resource>
78                                     <directory>src/main/assembly/</directory>
79                                     <filtering>false</filtering>
80                                     <includes>
81                                         <include>**/*</include>
82                                     </includes>
83                                     <excludes>
84                                         <exclude>**/*.sh</exclude>
85                                     </excludes>
86                                 </resource>
87                             </resources>
88                             <overwrite>true</overwrite>
89                         </configuration>
90                     </execution>
91                 </executions>
92             </plugin>
93             <plugin>
94                 <groupId>org.apache.maven.plugins</groupId>
95                 <artifactId>maven-dependency-plugin</artifactId>
96                 <executions>
97                     <execution>
98                         <id>copy-jar-${linux64id}</id>
99                         <goals>
100                             <goal>copy</goal>
101                         </goals>
102                         <phase>prepare-package</phase>
103                         <configuration>
104                             <artifactItems>
105                                 <artifactItem>
106                                     <groupId>org.onap.aai.esr-server</groupId>
107                                     <artifactId>esr-mgr</artifactId>
108                                     <type>jar</type>
109                                     <overWrite>true</overWrite>
110                                     <outputDirectory>${linux64outputdir}</outputDirectory>
111                                     <destFileName>esr-service.jar</destFileName>
112                                 </artifactItem>
113                             </artifactItems>
114                         </configuration>
115                     </execution>
116                     <execution>
117                         <id>copy-jar-${win64id}</id>
118                         <goals>
119                             <goal>copy</goal>
120                         </goals>
121                         <phase>prepare-package</phase>
122                         <configuration>
123                             <artifactItems>
124                                 <artifactItem>
125                                     <groupId>org.onap.aai.esr-server</groupId>
126                                     <artifactId>esr-mgr</artifactId>
127                                     <type>jar</type>
128                                     <overWrite>true</overWrite>
129                                     <outputDirectory>${win64outputdir}</outputDirectory>
130                                     <destFileName>esr-service.jar</destFileName>
131                                 </artifactItem>
132                             </artifactItems>
133                         </configuration>
134                     </execution>
135                 </executions>
136             </plugin>
137             <plugin>
138                 <groupId>org.apache.maven.plugins</groupId>
139                 <artifactId>maven-antrun-plugin</artifactId>
140                 <executions>
141                     <execution>
142                         <id>distribution</id>
143                         <phase>package</phase>
144                         <goals>
145                             <goal>run</goal>
146                         </goals>
147                         <configuration>
148                             <target name="distribution">
149                                 <tar destfile="${version.output}/${packagename}-${project.version}-linux64.tar.gz" longfile="posix" compression="gzip">
150                                     <tarfileset dir="target/assembly/linux64" filemode="0644" dirmode="0755">
151                                         <exclude name="**/*.sh"/>
152                                     </tarfileset>
153                                     <tarfileset dir="target/assembly/linux64" filemode="0755" dirmode="0755">
154                                         <include name="**/*.sh"/>
155                                     </tarfileset>
156                                 </tar>
157                                 <attachartifact file="${version.output}/${packagename}-${project.version}-linux64.tar.gz" classifier="linux64" type="tar.gz"/>
158                                 <zip destfile="${version.output}/${packagename}-${project.version}-win64.zip" update="true">
159                                     <zipfileset dir="target/assembly/win64" includes="**"/>
160                                 </zip>
161                                 <attachartifact file="${version.output}/${packagename}-${project.version}-win64.zip" classifier="win64" type="zip"/>
162                             </target>
163                         </configuration>
164                     </execution>
165                 </executions>
166             </plugin>
167         </plugins>
168     </build>
169
170     <dependencies>
171         <dependency>
172             <groupId>org.onap.aai.esr-server</groupId>
173             <artifactId>esr-mgr</artifactId>
174             <version>${project.version}</version>
175         </dependency>
176     </dependencies>  
177 </project>