aboutsummaryrefslogtreecommitdiffstats
path: root/pom.xml
diff options
context:
space:
mode:
authorPatrick Brady <pb071s@att.com>2018-03-02 17:49:54 -0500
committerPatrick Brady <pb071s@att.com>2018-03-04 21:03:11 -0800
commit868767d2aaefb579d58f443581f557056c49683c (patch)
treee714d0f1a6bfdd7717e33d8565ebf90fbad5cd29 /pom.xml
parent2c977e2b66ced314a4f51121801f62fe5c3c05e4 (diff)
Modify maven for angular build
Using the same plugin that portal has been using to perform angular cli builds in jenkins. Also modifed maven assembly plugin to package the generated angular javascript code into a deployable zip file. Change-Id: Ib26801ca6b4d8dd5195b570bc694d37efe421684 Signed-off-by: Patrick Brady <pb071s@att.com> Issue-ID: APPC-627
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml101
1 files changed, 58 insertions, 43 deletions
diff --git a/pom.xml b/pom.xml
index 8ec1088..dd06451 100644
--- a/pom.xml
+++ b/pom.xml
@@ -117,60 +117,75 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property.
</executions>
</plugin> -->
<plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.5.3</version>
+ <groupId>com.github.eirslett</groupId>
+ <artifactId>frontend-maven-plugin</artifactId>
+ <!-- Use the latest released version: https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->
+ <version>1.3</version>
<configuration>
- <descriptors>
- <descriptor>src/main/assembly/assembly.xml</descriptor>
- </descriptors>
+ <nodeVersion>v7.7.4</nodeVersion>
+ <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
+ <npmDownloadRoot>https://nodejs.org/dist/npm/</npmDownloadRoot>
+ <installDirectory>./</installDirectory>
</configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>1.12</version>
<executions>
<execution>
- <id>attach-artifacts</id>
- <phase>package</phase>
+ <id>install node and npm</id>
+ <goals>
+ <goal>install-node-and-npm</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ </execution>
+
+ <execution>
+ <id>npm install</id>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+
+ <phase>generate-resources</phase>
+
+ <configuration>
+ <arguments>install</arguments>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>npm build</id>
<goals>
- <goal>attach-artifact</goal>
+ <goal>npm</goal>
</goals>
+
+ <phase>generate-resources</phase>
+
<configuration>
- <artifacts>
- <artifact>
- <file>target/${project.artifactId}-${project.version}-zip.zip</file>
- <type>zip</type>
- </artifact>
- </artifacts>
+ <arguments>run build</arguments>
</configuration>
</execution>
+
</executions>
</plugin>
- <!-- <plugin> -->
- <!-- <groupId>org.apache.maven.plugins</groupId> -->
- <!-- <artifactId>maven-resources-plugin</artifactId> -->
- <!-- <version>2.4.2</version> -->
- <!-- <executions> -->
- <!-- <execution> -->
- <!-- <id>default-copy-resources</id> -->
- <!-- <phase>process-resources</phase> -->
- <!-- <goals> -->
- <!-- <goal>copy-resources</goal> -->
- <!-- </goals> -->
- <!-- <configuration> -->
- <!-- <format>zip</format> -->
- <!-- <overwrite>true</overwrite> -->
- <!-- <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}/</outputDirectory> -->
- <!-- <resources> -->
- <!-- <resource> -->
- <!-- <directory>${project.basedir}/dist</directory> -->
- <!-- </resource> -->
- <!-- </resources> -->
- <!-- </configuration> -->
- <!-- </execution> -->
- <!-- </executions> -->
- <!-- </plugin> -->
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>maven-repo-zip</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <attach>false</attach>
+ <finalName>${project.artifactId}-${project.version}</finalName>
+ <descriptors>
+ <descriptor>assemble_dist_zip.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>
<profiles>