blob: 46c2453620f73334c23c6e8276235af8a21358d6 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright © 2016-2018 European Support Limited
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<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">
<modelVersion>4.0.0</modelVersion>
<artifactId>workflow-designer-ui</artifactId>
<packaging>war</packaging>
<parent>
<groupId>org.onap.sdc.sdc-workflow-designer</groupId>
<artifactId>workflow-designer-parent</artifactId>
<version>1.4.0-SNAPSHOT</version>
</parent>
<properties>
<jest.command />
</properties>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-proxy</artifactId>
<version>9.4.11.v20180605</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.6</version>
<configuration>
<workingDirectory>src/main/frontend</workingDirectory>
<installDirectory>target</installDirectory>
</configuration>
<executions>
<execution>
<id>install node and yarn</id>
<goals>
<goal>install-node-and-yarn</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<nodeVersion>v8.11.4</nodeVersion>
<yarnVersion>v1.9.4</yarnVersion>
</configuration>
</execution>
<execution>
<id>yarn install</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>yarn run webpack build</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
<arguments>build</arguments>
</configuration>
</execution>
<execution>
<id>ui test</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
<arguments>test-build ${jest.command}</arguments>
<skip>${skipTests}</skip>
</configuration>
<phase>test</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<webResources>
<resource>
<directory>src/main/frontend/dist</directory>
<includes>
<include>*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/frontend/external-resources/ping/</directory>
<filtering>true</filtering>
<includes>
<include>ping</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>jest-windows-profile</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<jest.command>--runInBand</jest.command>
</properties>
</profile>
<profile>
<id>docker</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<name>onap/workflow-frontend</name>
<build>
<tags>
<tag>${project.version}</tag>
</tags>
<from>jetty:9.4.11-alpine</from>
<user>root</user>
<assembly>
<descriptorRef>artifact</descriptorRef>
<targetDir>/var/lib/jetty/webapps</targetDir>
</assembly>
<entryPoint>
java -DproxyTo=$BACKEND $JAVA_OPTIONS -jar $JETTY_HOME/start.jar
</entryPoint>
</build>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>