che-server/dashboard/pom.xml

168 lines
7.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2015-2017 Codenvy, S.A.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Contributors:
Codenvy, S.A. - initial API and implementation
-->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>che-parent</artifactId>
<groupId>org.eclipse.che</groupId>
<version>5.3.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.eclipse.che.dashboard</groupId>
<artifactId>che-dashboard-war</artifactId>
<version>5.3.0</version>
<packaging>war</packaging>
<name>Che Dashboard :: Web App</name>
<inceptionYear>2015</inceptionYear>
<dependencies>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-commons-j2ee</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<finalName>dashboard-war</finalName>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/bower_components</directory>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>${basedir}/node_modules</directory>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>${basedir}/dist</directory>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- Download NPM dependencies -->
<exec dir="${basedir}" executable="npm" failonerror="true">
<arg value="install" />
</exec>
<!-- Change base HREF of the application that will be hosted on /dashboard -->
<replace file="${basedir}/dist/index.html">
<replacetoken><![CDATA[<base href="/">]]></replacetoken>
<replacevalue><![CDATA[<base href="/dashboard/">]]></replacevalue>
</replace>
</target>
</configuration>
</execution>
<execution>
<id>compilation</id>
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target unless="skipTests">
<!-- Run unit tests -->
<exec dir="${basedir}" executable="gulp" failonerror="true">
<arg value="test" />
</exec>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>dist</directory>
</resource>
</webResources>
<webXml>${basedir}/src/webapp/WEB-INF/web.xml</webXml>
<packagingExcludes>/webapp/</packagingExcludes>
</configuration>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<useDefaultExcludes>false</useDefaultExcludes>
<excludes>
<exclude>**/.idea/**</exclude>
<exclude>**/*.styl</exclude>
<exclude>**/*.html</exclude>
<exclude>**/*.ico</exclude>
<exclude>**/*.ttf</exclude>
<exclude>**/*.eot</exclude>
<exclude>**/*.css</exclude>
<exclude>**/*.woff</exclude>
<exclude>src/app/colors/che-output-colors.constant.ts</exclude>
<exclude>src/app/proxy/proxy-settings.constant.ts</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>qa</id>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>compilation</id>
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- Run unit tests -->
<exec dir="${basedir}" executable="gulp" failonerror="true">
<arg value="test" />
</exec>
<!-- Run e2e tests in dist mode-->
<exec dir="${basedir}" executable="gulp" failonerror="true">
<arg value="protractor:dist" />
</exec>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<enable-tests>true</enable-tests>
</properties>
</profile>
</profiles>
</project>