update version
[sdc.git] / openecomp-ui / pom.xml
index 0c37c11..ef78081 100644 (file)
-<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>
-
-       <parent>
-               <groupId>org.openecomp.sdc</groupId>
-               <artifactId>sdc-main</artifactId>
-               <version>1.1.0-SNAPSHOT</version>
-       </parent>
-
-       <groupId>org.openecomp.sdc.onboarding</groupId>
-       <artifactId>onboarding-fe</artifactId>
-       <name>onboarding-ui-war</name>
-       <packaging>pom</packaging>
-
-       <properties>
-               <sonar.skip>true</sonar.skip>
-       </properties>
-
-       <build>
-               <plugins>
-
-
-                       <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>${session.executionRootDirectory}/dox-sequence-diagram-ui</workingDirectory>
-                                               </npmInstallTask>
-                                               <nodeJsTask>
-                                                       <workingDirectory>${session.executionRootDirectory}/dox-sequence-diagram-ui</workingDirectory>
-                                                       <moduleName>webpack</moduleName>
-                                               </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.coderplus.maven.plugins</groupId>
-        <artifactId>copy-rename-maven-plugin</artifactId>
-        <version>1.0</version>
-        <executions>
-          <execution>
-            <id>copy-file</id>
-            <phase>compile</phase>
-            <goals>
-              <goal>copy</goal>
-            </goals>
-            <configuration>
-              <sourceFile>${project.basedir}/dist/onboarding.war</sourceFile>
-              <destinationFile>${project.basedir}/target/onboarding-fe-${project.version}.war</destinationFile>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-       <groupId>org.codehaus.mojo</groupId>
-       <artifactId>build-helper-maven-plugin</artifactId>
-       <version>1.7</version>
-       <executions>
-               <execution>
-                       <id>attach-artifacts</id>
-                       <phase>compile</phase>
-                       <goals>
-                               <goal>attach-artifact</goal>
-                       </goals>
-                       <configuration>
-                               <artifacts>
-                                       <artifact>
-                                               <file>${project.basedir}/target/onboarding-fe-${project.version}.war</file>
-                                               <type>war</type>                           
-                                       </artifact>
-                               </artifacts>
-                       </configuration>
-               </execution>
-       </executions>
-      </plugin>
-
-<!--                   <plugin>
-                               <artifactId>maven-war-plugin</artifactId>
-                               <configuration>
-                                       <webXml>webapp-onboarding\WEB-INF\web.xml</webXml>
-                               </configuration>
-                       </plugin> -->
-               </plugins>
-       </build>
+<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>
+
+    <groupId>org.openecomp.sdc</groupId>
+    <artifactId>onboarding-fe</artifactId>
+    <name>onboarding-ui-war</name>
+    <packaging>war</packaging>
+
+    <parent>
+        <groupId>org.openecomp.sdc</groupId>
+        <artifactId>sdc-onboarding</artifactId>
+        <version>1.1.1-SNAPSHOT</version>
+        <relativePath>../onboarding</relativePath>
+    </parent>
+
+    <properties>
+        <maven.war.plugin.version>3.0.0</maven.war.plugin.version>
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-clean-plugin</artifactId>
+                <version>2.6.1</version>
+                <executions>
+                    <execution>
+                        <id>clean.dist.folder</id>
+                        <phase>clean</phase>
+                        <goals>
+                            <goal>clean</goal>
+                        </goals>
+                        <configuration>
+                            <filesets>
+                                <fileset>
+                                    <directory>${basedir}/dist</directory>
+                                </fileset>
+                                <!--<fileset>-->
+                                    <!--<directory>${basedir}/node_modules</directory>-->
+                                <!--</fileset>-->
+                                <fileset>
+                                    <directory>${basedir}/../dox-sequence-diagram-ui/dist
+                                    </directory>
+                                </fileset>
+                                <!--<fileset>-->
+                                    <!--<directory>${basedir}/../dox-sequence-diagram-ui/node_modules-->
+                                    <!--</directory>-->
+                                <!--</fileset>-->
+                            </filesets>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <!-- ============================================= -->
+            <!-- Build the UI module node code -->
+            <!-- ============================================= -->
+            <plugin>
+                <groupId>com.github.eirslett</groupId>
+                <artifactId>frontend-maven-plugin</artifactId>
+                <version>1.4</version>
+
+                <configuration>
+                    <installDirectory>${project.parent.parent.basedir}</installDirectory>
+                </configuration>
+
+                <executions>
+
+                    <execution>
+                        <id>install node and npm</id>
+                        <goals>
+                            <goal>install-node-and-npm</goal>
+                        </goals>
+                        <configuration>
+                            <nodeVersion>v6.9.5</nodeVersion>
+                            <npmVersion>3.10.10</npmVersion>
+                        </configuration>
+                    </execution>
+
+                    <execution>
+                        <id>npm set progress off</id>
+                        <goals>
+                            <goal>npm</goal>
+                        </goals>
+                        <configuration>
+                            <arguments>set progress=false</arguments>
+                        </configuration>
+                    </execution>
+
+                    <execution>
+                        <id>npm install in dox-sequence-diagram-ui</id>
+                        <goals>
+                            <goal>npm</goal>
+                        </goals>
+                        <configuration>
+                            <workingDirectory>${project.basedir}/../dox-sequence-diagram-ui
+                            </workingDirectory>
+                            <arguments>install</arguments>
+                        </configuration>
+                    </execution>
+
+                    <!-- Fix jQuery dependency in restful-js -->
+                    <execution>
+                        <id>npm restful-js</id>
+                        <goals>
+                            <goal>npm</goal>
+                        </goals>
+                        <configuration>
+                            <arguments>install restful-js</arguments>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>npm install restful-js dependencies</id>
+                        <goals>
+                            <goal>npm</goal>
+                        </goals>
+                        <configuration>
+                            <workingDirectory>${project.basedir}/node_modules/restful-js
+                            </workingDirectory>
+                            <arguments>install --production</arguments>
+                        </configuration>
+                    </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 build -- --version=${project.version}</arguments>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>repack war</id>
+                        <phase>prepare-package</phase>
+                        <configuration>
+                            <tasks>
+                                <echo message="Building test environment"/>
+                                <unzip src="dist/onboarding.war" dest="${basedir}/target/dist">
+                                    <patternset>
+                                        <include name="**/*"/>
+                                    </patternset>
+                                </unzip>
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>${maven.war.plugin.version}</version>
+                <configuration>
+                    <webResources>
+                        <resource>
+                            <directory>${basedir}/target/dist</directory>
+                        </resource>
+                    </webResources>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
 </project>