Add build helper to pom
[appc/cdt.git] / pom.xml
1 <!-- 
2 ============LICENSE_START==========================================
3 ===================================================================
4 Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
5 ===================================================================
6
7 Unless otherwise specified, all software contained herein is licensed
8 under the Apache License, Version 2.0 (the License);
9 you may not use this software except in compliance with the License.
10 You may obtain a copy of the License at
11
12     http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19
20 ECOMP is a trademark and service mark of AT&T Intellectual Property.
21 ============LICENSE_END============================================ -->
22
23 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
25     <modelVersion>4.0.0</modelVersion>
26     <groupId>org.onap.appc.cdt</groupId>
27     <artifactId>config-design-tool</artifactId>
28     <version>1.6.0-SNAPSHOT</version>
29     <packaging>pom</packaging>
30
31     <name>config-design-tool</name>
32
33     <properties>
34         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
35         <npm.executable>npm</npm.executable>
36         <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
37     </properties>
38
39     <!-- ================================================================================== -->
40     <!-- Distribution Management Sites -->
41     <!-- ================================================================================== -->
42     <distributionManagement>        
43         <repository>
44             <id>ecomp-releases</id>
45             <name>openecomp-repository-releases</name>
46             <url>${onap.nexus.url}/content/repositories/releases</url>
47         </repository>
48         <snapshotRepository>
49             <id>ecomp-snapshots</id>
50             <name>openecomp-repository-snapshots</name>
51             <url>${onap.nexus.url}/content/repositories/snapshots</url>
52         </snapshotRepository>
53     </distributionManagement>
54
55     <dependencies>
56         <dependency>
57             <groupId>junit</groupId>
58             <artifactId>junit</artifactId>
59             <version>3.8.1</version>
60             <scope>test</scope>
61         </dependency>
62     </dependencies>
63
64     <build>
65         <plugins>
66             <!--maven staging plugin --> 
67             <plugin> 
68                 <groupId>org.sonatype.plugins</groupId> 
69                 <artifactId>nexus-staging-maven-plugin</artifactId> 
70                 <version>1.6.7</version> 
71                 <extensions>true</extensions> 
72                 <configuration> 
73                     <nexusUrl>${onap.nexus.url}</nexusUrl> 
74                     <stagingProfileId>176c31dfe190a</stagingProfileId> 
75                     <serverId>ecomp-staging</serverId> 
76                 </configuration> 
77             </plugin>
78             <!--  <plugin>
79                 <groupId>org.codehaus.mojo</groupId>
80                 <artifactId>exec-maven-plugin</artifactId>
81                 <version>1.5.0</version>
82                 <executions>
83                     <execution>
84                         <id>npminstall</id>
85                         <phase>process-resources</phase>
86                         <configuration>
87                             <executable>${npm.executable}</executable>
88                             <arguments>
89                                 <argument>install</argument>
90
91                             </arguments>
92                         </configuration>
93                         <goals>
94                             <goal>exec</goal>
95                         </goals>
96                     </execution>
97                     <execution>
98                         <id>npmrun</id>
99                         <phase>process-resources</phase>
100                         <configuration>
101                             <executable>${npm.executable}</executable>
102                             <arguments>
103                                 <argument>run</argument>
104                                 <argument>build</argument>
105                             </arguments>
106                         </configuration>
107                         <goals>
108                             <goal>exec</goal>
109                         </goals>
110                     </execution>
111                 </executions>
112             </plugin> -->
113             <plugin>
114                 <groupId>com.github.eirslett</groupId>
115                 <artifactId>frontend-maven-plugin</artifactId>
116                 <!-- Use the latest released version: https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->
117                 <version>1.3</version>
118                 <configuration>
119                     <nodeVersion>v7.7.4</nodeVersion>
120                     <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
121                     <npmDownloadRoot>https://nodejs.org/dist/npm/</npmDownloadRoot>
122                     <installDirectory>./</installDirectory>
123                 </configuration>
124                 <executions>
125                     <execution>
126                         <id>install node and npm</id>
127                         <goals>
128                             <goal>install-node-and-npm</goal>
129                         </goals>
130                         <phase>generate-resources</phase>
131                     </execution>
132
133                     <execution>
134                         <id>npm install</id>
135                         <goals>
136                             <goal>npm</goal>
137                         </goals>
138
139                         <phase>generate-resources</phase>
140
141                         <configuration>
142                             <arguments>install</arguments>
143                         </configuration>
144                     </execution>
145
146                     <execution>
147                         <id>npm build</id>
148                         <goals>
149                             <goal>npm</goal>
150                         </goals>
151
152                         <phase>generate-resources</phase>
153
154                         <configuration>
155                             <arguments>run build</arguments>
156                         </configuration>
157                     </execution>
158
159                 </executions>
160             </plugin>
161
162             <plugin>
163               <artifactId>maven-assembly-plugin</artifactId>
164               <executions>
165                 <execution>
166                   <id>maven-repo-zip</id>
167                   <goals>
168                     <goal>single</goal>
169                   </goals>
170                   <phase>package</phase>
171                   <configuration>
172                     <appendAssemblyId>false</appendAssemblyId>
173                     <attach>false</attach>
174                     <finalName>${project.artifactId}-${project.version}</finalName>
175                     <descriptors>
176                       <descriptor>assemble_dist_zip.xml</descriptor>
177                     </descriptors>
178                   </configuration>
179                 </execution>
180               </executions>
181             </plugin>
182
183             <plugin>
184                 <groupId>org.codehaus.mojo</groupId>
185                 <artifactId>build-helper-maven-plugin</artifactId>
186                 <version>1.12</version>
187                 <executions>
188                     <execution>
189                         <id>attach-artifacts</id>
190                         <phase>package</phase>
191                         <goals>
192                             <goal>attach-artifact</goal>
193                         </goals>
194                         <configuration>
195                             <artifacts>
196                                 <artifact>
197                                     <file>target/${project.artifactId}-${project.version}.zip</file>
198                                     <type>zip</type>
199                                 </artifact>
200                             </artifacts>
201                         </configuration>
202                     </execution>
203                 </executions>
204             </plugin>
205
206         </plugins>
207     </build>
208
209 </project>