5a64d67404
- use `frontend-maven-plugin` to pull node/npm automatically - tie `npm install` to relevant lifecycle (`mvn wildfly:deploy` automatically builds and includes build products into WAR) - extern keycloak and product database base url, use `--env=war` to build a war colocated with keycloak and database app Issues/Todos: - when testing with `ng serve` will have to disable browser web security (product-database doesn’t allow cross-origin requests) - no unit / e2e / arquillian tests for now - `src/main/frontend/node_modules` is included in distribution build, this is a portability debt
101 lines
4 KiB
XML
101 lines
4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
~ and other contributors as indicated by the @author tags.
|
|
~
|
|
~ 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/maven-v4_0_0.xsd">
|
|
<parent>
|
|
<artifactId>keycloak-examples-demo-parent</artifactId>
|
|
<groupId>org.keycloak</groupId>
|
|
<version>3.0.0.CR1-SNAPSHOT</version>
|
|
</parent>
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<groupId>org.keycloak.example.demo</groupId>
|
|
<artifactId>angular2-product-example</artifactId>
|
|
<packaging>war</packaging>
|
|
<name>Angular2 Product Portal JS</name>
|
|
<description/>
|
|
|
|
<build>
|
|
<finalName>angular2-product</finalName>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.jboss.as.plugins</groupId>
|
|
<artifactId>jboss-as-maven-plugin</artifactId>
|
|
<configuration>
|
|
<skip>false</skip>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.wildfly.plugins</groupId>
|
|
<artifactId>wildfly-maven-plugin</artifactId>
|
|
<configuration>
|
|
<skip>false</skip>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-war-plugin</artifactId>
|
|
<configuration>
|
|
<webResources>
|
|
<resource>
|
|
<!-- this is relative to the pom.xml directory -->
|
|
<directory>src/main/frontend/dist</directory>
|
|
</resource>
|
|
</webResources>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.github.eirslett</groupId>
|
|
<artifactId>frontend-maven-plugin</artifactId>
|
|
<version>1.3</version>
|
|
<configuration>
|
|
<nodeVersion>v6.10.0</nodeVersion>
|
|
<workingDirectory>src/main/frontend</workingDirectory>
|
|
<installDirectory>target</installDirectory>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>install node and npm</id>
|
|
<goals>
|
|
<goal>install-node-and-npm</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>npm install</id>
|
|
<goals>
|
|
<goal>npm</goal>
|
|
</goals>
|
|
<configuration>
|
|
<arguments>install</arguments>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>npm run build</id>
|
|
<goals>
|
|
<goal>npm</goal>
|
|
</goals>
|
|
<configuration>
|
|
<arguments>run ng -- build --base-href /angular2-product/ --env=war</arguments>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project>
|