Modify maven for angular build
[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>com.att.appc</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     </properties>
37
38
39     <!-- ================================================================================== -->
40     <!-- The SCM repository we are using -->
41     <!-- ================================================================================== -->
42     <scm>
43         <connection>scm:git:ssh://codecloud.web.att.com:7999/st_ac/app-c.git</connection>
44         <developerConnection>scm:git:ssh://codecloud.web.att.com:7999/st_ac/app-c.git</developerConnection>
45         <url>ssh://codecloud.web.att.com:7999/st_ac/app-c.git</url>
46         <tag>appc-1.4.17</tag>
47     </scm>
48
49     <!-- ================================================================================== -->
50     <!-- Maven Central Repository Information -->
51     <!-- ================================================================================== -->
52     <distributionManagement>
53         <repository>
54             <id>nexus</id>
55             <name>att-repository-releases</name>
56             <url>http://mavencentral.it.att.com:8084/nexus/content/repositories/att-repository-releases</url>
57         </repository>
58         <snapshotRepository>
59             <id>nexus</id>
60             <name>att-repository-snapshots</name>
61             <url>http://mavencentral.it.att.com:8084/nexus/content/repositories/att-repository-snapshots</url>
62         </snapshotRepository>
63     </distributionManagement>
64
65     <!-- ================================================================================== -->
66     <!-- Define additional repositories -->
67     <!-- ================================================================================== -->
68     <repositories>
69
70     </repositories>
71
72
73     <dependencies>
74         <dependency>
75             <groupId>junit</groupId>
76             <artifactId>junit</artifactId>
77             <version>3.8.1</version>
78             <scope>test</scope>
79         </dependency>
80     </dependencies>
81
82     <build>
83         <plugins>
84             <!--  <plugin>
85                 <groupId>org.codehaus.mojo</groupId>
86                 <artifactId>exec-maven-plugin</artifactId>
87                 <version>1.5.0</version>
88                 <executions>
89                     <execution>
90                         <id>npminstall</id>
91                         <phase>process-resources</phase>
92                         <configuration>
93                             <executable>${npm.executable}</executable>
94                             <arguments>
95                                 <argument>install</argument>
96
97                             </arguments>
98                         </configuration>
99                         <goals>
100                             <goal>exec</goal>
101                         </goals>
102                     </execution>
103                     <execution>
104                         <id>npmrun</id>
105                         <phase>process-resources</phase>
106                         <configuration>
107                             <executable>${npm.executable}</executable>
108                             <arguments>
109                                 <argument>run</argument>
110                                 <argument>build</argument>
111                             </arguments>
112                         </configuration>
113                         <goals>
114                             <goal>exec</goal>
115                         </goals>
116                     </execution>
117                 </executions>
118             </plugin> -->
119             <plugin>
120                 <groupId>com.github.eirslett</groupId>
121                 <artifactId>frontend-maven-plugin</artifactId>
122                 <!-- Use the latest released version: https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->
123                 <version>1.3</version>
124                 <configuration>
125                     <nodeVersion>v7.7.4</nodeVersion>
126                     <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
127                     <npmDownloadRoot>https://nodejs.org/dist/npm/</npmDownloadRoot>
128                     <installDirectory>./</installDirectory>
129                 </configuration>
130                 <executions>
131                     <execution>
132                         <id>install node and npm</id>
133                         <goals>
134                             <goal>install-node-and-npm</goal>
135                         </goals>
136                         <phase>generate-resources</phase>
137                     </execution>
138
139                     <execution>
140                         <id>npm install</id>
141                         <goals>
142                             <goal>npm</goal>
143                         </goals>
144
145                         <phase>generate-resources</phase>
146
147                         <configuration>
148                             <arguments>install</arguments>
149                         </configuration>
150                     </execution>
151
152                     <execution>
153                         <id>npm build</id>
154                         <goals>
155                             <goal>npm</goal>
156                         </goals>
157
158                         <phase>generate-resources</phase>
159
160                         <configuration>
161                             <arguments>run build</arguments>
162                         </configuration>
163                     </execution>
164
165                 </executions>
166             </plugin>
167
168       <plugin>
169         <artifactId>maven-assembly-plugin</artifactId>
170         <executions>
171           <execution>
172             <id>maven-repo-zip</id>
173             <goals>
174               <goal>single</goal>
175             </goals>
176             <phase>package</phase>
177             <configuration>
178               <appendAssemblyId>false</appendAssemblyId>
179               <attach>false</attach>
180               <finalName>${project.artifactId}-${project.version}</finalName>
181               <descriptors>
182                 <descriptor>assemble_dist_zip.xml</descriptor>
183               </descriptors>
184             </configuration>
185           </execution>
186         </executions>
187       </plugin>
188
189         </plugins>
190     </build>
191     <profiles>
192         <profile>
193             <id>platform-windows</id>
194             <activation>
195                 <os>
196                     <family>windows</family>
197                 </os>
198             </activation>
199             <properties>
200                 <!-- Override the executable names for Windows -->
201                 <npm.executable>npm.cmd</npm.executable>
202                 <grunt.executable>grunt.cmd</grunt.executable>
203                 <bower.executable>bower.cmd</bower.executable>
204             </properties>
205         </profile>
206     </profiles>
207
208 </project>