fc24024bcf92ac5da3353cfb405f9323af4d6e0b
[dcaegen2/platform.git] / mod / designtool / designtool-web / pom.xml
1 <?xml version="1.0"?>
2 <!--
3 ================================================================================
4 Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
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 ============LICENSE_END=========================================================
18
19 -->
20 <project xmlns="http://maven.apache.org/POM/4.0.0"
21   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23   <modelVersion>4.0.0</modelVersion>
24   <parent>
25     <groupId>org.onap.dcaegen2.platform.mod</groupId>
26     <artifactId>designtool</artifactId>
27     <version>1.0.1-SNAPSHOT</version>
28   </parent>
29   <artifactId>designtool-web</artifactId>
30   <version>1.0.2-SNAPSHOT</version>
31   <packaging>war</packaging>
32   <name>dcaegen2-platform-mod-designtool-web</name>
33   <properties>
34     <canvas.filter>canvas-min.properties</canvas.filter>
35   </properties>
36   <repositories>
37     <repository>
38       <id>jcenter</id>
39       <url>https://jcenter.bintray.com</url>
40       <snapshots>
41         <enabled>false</enabled>
42       </snapshots>
43       <releases>
44         <enabled>true</enabled>
45       </releases>
46     </repository>
47   </repositories>
48   <dependencies>
49     <dependency>
50       <groupId>org.apache.nifi</groupId>
51       <artifactId>nifi-framework-cluster</artifactId>
52       <version>${nifi.version}</version>
53       <scope>provided</scope>
54     </dependency>
55     <dependency>
56       <groupId>org.apache.nifi</groupId>
57       <artifactId>nifi-ui-extension</artifactId>
58       <version>${nifi.version}</version>
59       <scope>provided</scope>
60     </dependency>
61     <dependency>
62       <groupId>org.apache.nifi</groupId>
63       <artifactId>nifi-jetty</artifactId>
64       <version>${nifi.version}</version>
65       <scope>provided</scope>
66     </dependency>
67     <dependency>
68       <groupId>org.apache.nifi</groupId>
69       <artifactId>nifi-documentation</artifactId>
70       <version>${nifi.version}</version>
71       <scope>provided</scope>
72     </dependency>
73     <dependency>
74       <groupId>org.apache.nifi</groupId>
75       <artifactId>nifi-web-content-access</artifactId>
76       <version>${nifi.version}</version>
77       <scope>provided</scope>
78     </dependency>
79     <dependency>
80       <groupId>org.slf4j</groupId>
81       <artifactId>jul-to-slf4j</artifactId>
82       <version>${org.slf4j.version}</version>
83       <scope>provided</scope>
84     </dependency>
85     <dependency>
86       <groupId>org.onap.dcaegen2.platform.mod</groupId>
87       <artifactId>nifi-war-to-jar</artifactId>
88       <version>1.0.1-SNAPSHOT</version>
89       <scope>provided</scope>
90     </dependency>
91     <dependency>
92       <groupId>org.eclipse.jetty</groupId>
93       <artifactId>jetty-server</artifactId>
94       <version>${jetty.version}</version>
95       <scope>provided</scope>
96     </dependency>
97     <dependency>
98       <groupId>org.eclipse.jetty</groupId>
99       <artifactId>jetty-annotations</artifactId>
100       <version>${jetty.version}</version>
101       <scope>provided</scope>
102     </dependency>
103     <dependency>
104       <groupId>org.eclipse.jetty</groupId>
105       <artifactId>jetty-deploy</artifactId>
106       <version>${jetty.version}</version>
107       <scope>provided</scope>
108     </dependency>
109   </dependencies>
110   <build>
111     <filters>
112       <filter>src/main/resources/filters/${canvas.filter}</filter>
113     </filters>
114     <plugins>
115       <plugin>
116         <groupId>org.eclipse.jetty</groupId>
117         <artifactId>jetty-jspc-maven-plugin</artifactId>
118         <version>${jetty.version}</version>
119         <executions>
120           <execution>
121             <goals>
122               <goal>jspc</goal>
123             </goals>
124             <configuration>
125               <keepSources>true</keepSources>
126               <useProvidedScope>true</useProvidedScope>
127               <excludes>
128                 **/canvas.jsp
129               </excludes>
130             </configuration>
131           </execution>
132         </executions>
133       </plugin>
134       <plugin>
135         <groupId>net.alchim31.maven</groupId>
136         <artifactId>yuicompressor-maven-plugin</artifactId>
137         <version>1.5.1</version>
138         <executions>
139           <execution>
140             <goals>
141               <goal>compress</goal>
142             </goals>
143             <configuration>
144               <sourceDirectory>src/main/webapp</sourceDirectory>
145               <outputDirectory>${staging.dir}</outputDirectory>
146               <nomunge>false</nomunge>
147               <jswarn>false</jswarn>
148               <nosuffix>true</nosuffix>
149               <gzip>true</gzip>
150               <aggregations>
151                 <aggregation>
152                   <insertNewLine>true</insertNewLine>
153                   <output>${project.build.directory}/${project.build.finalName}//nf-ng-canvas-global-menu-controller-min.js</output>
154                   <includes>
155                     <include>${staging.dir}/js/nf/canvas/controllers/nf-ng-canvas-global-menu-controller.js</include>
156                   </includes>
157                 </aggregation>
158                 <aggregation>
159                   <insertNewLine>true</insertNewLine>
160                   <output>${project.build.directory}/${project.build.finalName}//nf-ng-breadcrumbs-controller-min.js</output>
161                   <includes>
162                     <include>${staging.dir}/js/nf/canvas/controllers/nf-ng-breadcrumbs-controller.js</include>
163                   </includes>
164                 </aggregation>
165                 <aggregation>
166                   <insertNewLine>true</insertNewLine>
167                   <output>${project.build.directory}/${project.build.finalName}//nf-ng-processor-component-min.js</output>
168                   <includes>
169                     <include>${staging.dir}/js/nf/canvas/header/components/nf-ng-processor-component.js</include>
170                   </includes>
171                 </aggregation>
172                 <aggregation>
173                   <insertNewLine>true</insertNewLine>
174                   <output>${project.build.directory}/${project.build.finalName}//nf-connection-configuration-min.js</output>
175                   <includes>
176                     <include>${staging.dir}/js/nf/canvas/nf-connection-configuration.js</include>
177                   </includes>
178                 </aggregation>
179                 <aggregation>
180                   <insertNewLine>true</insertNewLine>
181                   <output>${project.build.directory}/${project.build.finalName}//nf-flow-version-min.js</output>
182                   <includes>
183                     <include>${staging.dir}/js/nf/canvas/nf-flow-version.js</include>
184                   </includes>
185                 </aggregation>
186                 <aggregation>
187                   <insertNewLine>true</insertNewLine>
188                   <output>${project.build.directory}/${project.build.finalName}//nf-process-group-min.js</output>
189                   <includes>
190                     <include>${staging.dir}/js/nf/canvas/nf-process-group.js</include>
191                   </includes>
192                 </aggregation>
193                 <aggregation>
194                   <insertNewLine>true</insertNewLine>
195                   <output>${project.build.directory}/${project.build.finalName}//nf-settings-min.js</output>
196                   <includes>
197                     <include>${staging.dir}/js/nf/canvas/nf-settings.js</include>
198                   </includes>
199                 </aggregation>
200                 <aggregation>
201                   <insertNewLine>true</insertNewLine>
202                   <output>${project.build.directory}/${project.build.finalName}/navigation-min.css</output>
203                   <includes>
204                     <include>${staging.dir}/css/navigation.css</include>
205                   </includes>
206                 </aggregation>
207               </aggregations>
208             </configuration>
209           </execution>
210         </executions>
211       </plugin>
212       <plugin>
213         <groupId>org.apache.maven.plugins</groupId>
214         <artifactId>maven-war-plugin</artifactId>
215         <version>3.2.1</version>
216         <configuration>
217           <webResources>
218             <resource>
219               <directory>src/main/webapp/WEB-INF/pages</directory>
220               <targetPath>WEB-INF/pages</targetPath>
221               <includes>
222                 <include>canvas.jsp</include>
223               </includes>
224               <filtering>true</filtering>
225             </resource>
226           </webResources>
227         </configuration>
228       </plugin>
229       <plugin>
230         <groupId>io.fabric8</groupId>
231         <artifactId>docker-maven-plugin</artifactId>
232         <version>${docker.fabric.version}</version>
233         <configuration>
234           <verbose>true</verbose>
235           <pullRegistry>${docker.pull.registry}</pullRegistry>
236           <pushRegistry>${docker.push.registry}</pushRegistry>
237           <images>
238             <image>
239               <name>onap/${project.groupId}.${project.artifactId}</name>
240               <registry>${onap.nexus.dockerregistry.daily}</registry>
241               <build>
242                 <contextDir>${project.basedir}</contextDir>
243                 <tags>
244                   <tag>latest</tag>
245                   <tag>${project.version}</tag>
246                   <tag>${project.version}-${maven.build.timestamp}Z</tag>
247                 </tags>
248               </build>
249             </image>
250           </images>
251         </configuration>
252         <executions>
253           <execution>
254             <goals>
255               <goal>build</goal>
256               <goal>push</goal>
257             </goals>
258           </execution>
259         </executions>
260       </plugin>
261     </plugins>
262   </build>
263 </project>