e394920bc3280d39e56752262df9800e27ab3b06
[ccsdk/features.git] / features / installer / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ~ ============LICENSE_START=======================================================
4   ~ ONAP : ccsdk features
5   ~ ================================================================================
6   ~ Copyright (C) 2018 Bell Canada Intellectual Property. All rights reserved.
7   ~ ================================================================================
8   ~ Update Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
9   ~ ================================================================================
10   ~ Licensed under the Apache License, Version 2.0 (the "License");
11   ~ you may not use this file except in compliance with the License.
12   ~ You may obtain a copy of the License at
13   ~
14   ~     http://www.apache.org/licenses/LICENSE-2.0
15   ~
16   ~ Unless required by applicable law or agreed to in writing, software
17   ~ distributed under the License is distributed on an "AS IS" BASIS,
18   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19   ~ See the License for the specific language governing permissions and
20   ~ limitations under the License.
21   ~ ============LICENSE_END=======================================================
22   ~
23   -->
24
25 <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">
26     <modelVersion>4.0.0</modelVersion>
27
28     <parent>
29         <groupId>org.onap.ccsdk.parent</groupId>
30         <artifactId>odlparent-lite</artifactId>
31         <version>1.5.5-SNAPSHOT</version>
32         <relativePath/>
33     </parent>
34
35     <groupId>org.onap.ccsdk.features</groupId>
36     <artifactId>features-installer</artifactId>
37     <version>0.7.5-SNAPSHOT</version>
38     <packaging>pom</packaging>
39
40     <name>ccsdk-features :: features :: ${project.artifactId}</name>
41
42     <properties>
43         <application.name>ccsdk-features-all</application.name>
44         <features.boot>${application.name}</features.boot>
45         <features.repositories>mvn:org.onap.ccsdk.features/${features.boot}/${project.version}/xml/features
46         </features.repositories>
47         <include.transitive.dependencies>false</include.transitive.dependencies>
48     </properties>
49
50     <dependencies>
51
52         <dependency>
53             <groupId>org.onap.ccsdk.features</groupId>
54             <artifactId>${application.name}</artifactId>
55             <version>${project.version}</version>
56             <type>xml</type>
57             <classifier>features</classifier>
58             <exclusions>
59                 <exclusion>
60                     <groupId>*</groupId>
61                     <artifactId>*</artifactId>
62                 </exclusion>
63             </exclusions>
64         </dependency>
65
66     </dependencies>
67
68     <build>
69         <plugins>
70             <plugin>
71                 <artifactId>maven-assembly-plugin</artifactId>
72                 <executions>
73                     <execution>
74                         <id>maven-repo-zip</id>
75                         <goals>
76                             <goal>single</goal>
77                         </goals>
78                         <phase>package</phase>
79                         <configuration>
80                             <attach>true</attach>
81                             <finalName>stage/${application.name}-${project.version}</finalName>
82                             <descriptors>
83                                 <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
84                             </descriptors>
85                             <appendAssemblyId>true</appendAssemblyId>
86                         </configuration>
87                     </execution>
88                     <execution>
89                         <id>installer-zip</id>
90                         <goals>
91                             <goal>single</goal>
92                         </goals>
93                         <phase>package</phase>
94                         <configuration>
95                             <attach>true</attach>
96                             <finalName>${application.name}-${project.version}-installer</finalName>
97                             <descriptors>
98                                 <descriptor>src/assembly/assemble_installer_zip.xml</descriptor>
99                             </descriptors>
100                             <appendAssemblyId>false</appendAssemblyId>
101                         </configuration>
102                     </execution>
103                 </executions>
104             </plugin>
105             <plugin>
106                 <groupId>org.apache.maven.plugins</groupId>
107                 <artifactId>maven-dependency-plugin</artifactId>
108                 <executions>
109                     <execution>
110                         <id>copy-dependencies</id>
111                         <goals>
112                             <goal>copy-dependencies</goal>
113                         </goals>
114                         <phase>prepare-package</phase>
115                         <configuration>
116                             <transitive>false</transitive>
117                             <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
118                             <overWriteReleases>false</overWriteReleases>
119                             <overWriteSnapshots>true</overWriteSnapshots>
120                             <overWriteIfNewer>true</overWriteIfNewer>
121                             <useRepositoryLayout>true</useRepositoryLayout>
122                             <addParentPoms>false</addParentPoms>
123                             <copyPom>false</copyPom>
124                             <includeGroupIds>org.onap.ccsdk.features</includeGroupIds>
125                             <scope>provided</scope>
126                         </configuration>
127                     </execution>
128                 </executions>
129             </plugin>
130             <plugin>
131                 <artifactId>maven-resources-plugin</artifactId>
132                 <version>2.6</version>
133                 <executions>
134                     <execution>
135                         <id>copy-version</id>
136                         <goals>
137                             <goal>copy-resources</goal>
138                         </goals><!-- here the phase you need -->
139                         <phase>validate</phase>
140                         <configuration>
141                             <outputDirectory>${basedir}/target/stage</outputDirectory>
142                             <resources>
143                                 <resource>
144                                     <directory>src/main/resources/scripts</directory>
145                                     <includes>
146                                         <include>install-feature.sh</include>
147                                     </includes>
148                                     <filtering>true</filtering>
149                                 </resource>
150                             </resources>
151                         </configuration>
152                     </execution>
153
154                 </executions>
155             </plugin>
156
157         </plugins>
158     </build>
159 </project>