aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/pom.xml
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/pom.xml')
-rw-r--r--catalog-ui/pom.xml386
1 files changed, 210 insertions, 176 deletions
diff --git a/catalog-ui/pom.xml b/catalog-ui/pom.xml
index 1825fd3f2c..9923a6bfa5 100644
--- a/catalog-ui/pom.xml
+++ b/catalog-ui/pom.xml
@@ -5,7 +5,7 @@
<groupId>org.openecomp.sdc</groupId>
<artifactId>catalog-ui</artifactId>
- <packaging>pom</packaging>
+ <packaging>pom</packaging>
<parent>
@@ -25,166 +25,36 @@
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.6.1</version>
- <executions>
- <execution>
- <id>clean.fe.webapp.folder</id>
- <phase>initialize</phase>
- <goals>
- <goal>clean</goal>
- </goals>
- <configuration>
+ <executions>
+ <execution>
+ <id>clean.fe.webapp.folder</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ <configuration>
- <filesets>
- <fileset>
- <directory>${project.parent.basedir}/catalog-fe/src/main/webapp</directory>
- <includes>
- <include>**/*</include>
- <include>*</include>
- </includes>
- <excludes>
- <exclude>META-INF/*</exclude>
- <exclude>WEB-INF/*</exclude>
- </excludes>
- <followSymlinks>false</followSymlinks>
- </fileset>
- </filesets>
- </configuration>
- </execution>
- </executions>
+ <filesets>
+ <fileset>
+ <directory>${project.parent.basedir}/catalog-fe/src/main/webapp</directory>
+ <includes>
+ <include>**/*</include>
+ <include>*</include>
+ </includes>
+ <excludes>
+ <exclude>META-INF/*</exclude>
+ <exclude>WEB-INF/*</exclude>
+ </excludes>
+ <followSymlinks>false</followSymlinks>
+ </fileset>
+ </filesets>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
<plugin>
- <groupId>io.wcm.maven.plugins</groupId>
- <artifactId>nodejs-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>compile</phase>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <tasks>
- <npmInstallTask>
- <workingDirectory>${project.basedir}</workingDirectory>
- </npmInstallTask>
- <nodeJsTask>
- <workingDirectory>${project.basedir}</workingDirectory>
- <moduleName>bower</moduleName>
- <arguments>
- <argument>install</argument>
- </arguments>
- </nodeJsTask>
- <nodeJsTask>
- <workingDirectory>${project.basedir}</workingDirectory>
- <moduleName>grunt</moduleName>
- <arguments>
- <argument>build</argument>
- </arguments>
- </nodeJsTask>
- <!-- <npmInstallTask>
- <workingDirectory>${project.basedir}</workingDirectory>
- </npmInstallTask>
- <nodeJsTask>
- <workingDirectory>${project.basedir}</workingDirectory>
- <moduleName>gulp</moduleName>
- <arguments>
- <argument>build</argument>
- </arguments>
- </nodeJsTask> -->
- </tasks>
- </configuration>
- </plugin>
-
-
- <!-- <plugin>
- <groupId>com.github.eirslett</groupId>
- <artifactId>frontend-maven-plugin</artifactId>
- <version>1.3</version>
- <configuration>
- <nodeVersion>v7.5.0</nodeVersion>
- <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
- <npmDownloadRoot>https://nodejs.org/dist/npm/</npmDownloadRoot>
- <installDirectory>./</installDirectory>
- </configuration>
- <executions>
- <execution>
- <id>install node and npm</id>
- <goals>
- <goal>install-node-and-npm</goal>
- </goals>
- <phase>generate-resources</phase>
- </execution>
-
- <execution>
- <id>npm install bower</id>
- <goals>
- <goal>npm</goal>
- </goals>
-
- <phase>generate-resources</phase>
-
- <configuration>
- <arguments>install bower</arguments>
- </configuration>
- </execution>
-
- <execution>
- <id>npm install grunt-cli</id>
- <goals>
- <goal>npm</goal>
- </goals>
-
- <phase>generate-resources</phase>
-
- <configuration>
- <arguments>install grunt-cli</arguments>
- </configuration>
- </execution>
-
- <execution>
- <id>npm install</id>
- <goals>
- <goal>npm</goal>
- </goals>
-
- <phase>generate-resources</phase>
-
- <configuration>
- <arguments>install</arguments>
- </configuration>
- </execution>
-
- <execution>
- <id>bower install</id>
- <goals>
- <goal>bower</goal>
- </goals>
-
- <configuration>
- <arguments>install</arguments>
- </configuration>
- </execution>
-
- <execution>
- <id>grunt build</id>
- <goals>
- <goal>grunt</goal>
- </goals>
-
- <phase>generate-resources</phase>
-
- <configuration>
- <arguments>build</arguments>
- </configuration>
- </execution>
-
- </executions>
- </plugin>
- -->
- <plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<executions>
@@ -198,7 +68,7 @@
<outputDirectory>${project.parent.basedir}/catalog-fe/src/main/webapp</outputDirectory>
<resources>
<resource>
- <directory>${project.basedir}/app/dist</directory>
+ <directory>${project.basedir}/dist</directory>
<filtering>false</filtering>
</resource>
</resources>
@@ -206,14 +76,56 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>com.github.eirslett</groupId>
+ <artifactId>frontend-maven-plugin</artifactId>
+ <version>1.4</version>
+
+ <executions>
+
+ <execution>
+ <id>install node and npm</id>
+ <goals>
+ <goal>install-node-and-npm</goal>
+ </goals>
+ <configuration>
+ <!-- See https://nodejs.org/en/download/ for latest node and npm (lts) versions -->
+ <nodeVersion>v6.9.5</nodeVersion>
+ <npmVersion>3.10.10</npmVersion>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>npm install</id>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+ <!-- Optional configuration which provides for running any npm command -->
+ <configuration>
+ <arguments>install</arguments>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>npm run build</id>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+ <configuration>
+ <arguments>run build:prod</arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>
- <profiles>
+ <profiles>
<profile>
- <id>not-minified</id>
+ <id>CI</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
@@ -230,27 +142,12 @@
<goals>
<goal>copy-resources</goal>
</goals>
+
<configuration>
<outputDirectory>${project.parent.basedir}/catalog-fe/src/main/webapp</outputDirectory>
<resources>
<resource>
- <directory>${project.basedir}/app</directory>
- <includes>
- <include>languages/**</include>
- <include>scripts/**</include>
- <include>styles/**</include>
- <include>third-party/**</include>
- <include>index.html</include>
- <include>robots.txt</include>
- <include>favicon.png</include>
- </includes>
- <filtering>false</filtering>
- </resource>
- <resource>
- <directory>${project.basedir}</directory>
- <includes>
- <include>bower_components/**</include>
- </includes>
+ <directory>${project.basedir}/dist</directory>
<filtering>false</filtering>
</resource>
</resources>
@@ -258,9 +155,146 @@
</execution>
</executions>
</plugin>
+
+
+
+ <!-- ============================================= -->
+ <!-- Build the UI module node code -->
+ <!-- ============================================= -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.4.0</version>
+ <executions>
+
+ <!-- Set execution permissions for the build script -->
+ <execution>
+ <id>set.script.permissions</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+
+ <configuration>
+ <workingDirectory>${project.basedir}</workingDirectory>
+ <executable>/bin/chmod</executable>
+ <arguments>
+ <argument>755</argument>
+ <argument>./build_catalog_ui.sh</argument>
+ </arguments>
+ </configuration>
+ </execution>
+
+ <!-- Run the build script -->
+ <execution>
+ <id>execute grant build</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+
+ <configuration>
+ <workingDirectory>${project.basedir}</workingDirectory>
+ <executable>./build_catalog_ui.sh</executable>
+ </configuration>
+ </execution>
+
+ <!-- Undo checkout the build script -->
+ <execution>
+ <id>undo.checkout.script</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+
+ <configuration>
+ <workingDirectory>${project.basedir}</workingDirectory>
+ <executable>/usr/bin/git</executable>
+ <arguments>
+ <argument>checkout</argument>
+ <argument>--</argument>
+ <argument>./build_catalog_ui.sh</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>
+
+
+ <profile>
+ <id>Fortify</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.fortify.ps.maven.plugin</groupId>
+ <artifactId>sca-maven-plugin</artifactId>
+ <version>4.30</version>
+ <configuration>
+ <source>1.8</source>
+ <buildId>${project.parent.artifactId}</buildId>
+ <toplevelArtifactId>${project.parent.artifactId}</toplevelArtifactId>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>not-minified</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.7</version>
+ <executions>
+ <execution>
+ <id>copy-resources</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.parent.basedir}/catalog-fe/src/main/webapp</outputDirectory>
+ <resources>
+ <resource>
+ <directory>${project.basedir}/app</directory>
+ <includes>
+ <include>languages/**</include>
+ <include>scripts/**</include>
+ <include>styles/**</include>
+ <include>third-party/**</include>
+ <include>index.html</include>
+ <include>robots.txt</include>
+ <include>favicon.png</include>
+ </includes>
+ <filtering>false</filtering>
+ </resource>
+ <resource>
+ <directory>${project.basedir}</directory>
+ <includes>
+ <include>bower_components/**</include>
+ </includes>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>