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