Lets build modern ui by default 12/94812/3
authorwsliwka <wojciech.sliwka@nokia.com>
Tue, 3 Sep 2019 09:02:42 +0000 (11:02 +0200)
committerIttay Stern <ittay.stern@att.com>
Wed, 4 Sep 2019 06:27:39 +0000 (06:27 +0000)
to disable modern ui build just use maven with -DskipModernUi=true

Added configuration for maven-cleanup-plugin to remove 'dist' directory

Issue-ID: VID-576
Signed-off-by: wsliwka <wojciech.sliwka@nokia.com>
Change-Id: I668820bbd28302b8cdaf13300b0f26cfcb3df398
Signed-off-by: wsliwka <wojciech.sliwka@nokia.com>
vid-webpack-master/pom.xml

index d1398cc..8d4ab15 100644 (file)
@@ -29,6 +29,7 @@
     <stagingNexusPath>content/repositories/staging/</stagingNexusPath>
     <snapshotNexusPath>content/repositories/snapshots/</snapshotNexusPath>
     <releaseNexusPath>content/repositories/releases/</releaseNexusPath>
+    <NPM_CMD>build</NPM_CMD>
   </properties>
 
 
     <profile>
       <id>if-not-webpack</id>
       <activation>
-        <activeByDefault>true</activeByDefault>
+        <property>
+          <name>skipModernUi</name>
+          <value>true</value>
+        </property>
       </activation>
       <build>
         <plugins>
     </profile>
     <profile>
       <id>webpack-npm</id>
+      <activation>
+        <property>
+          <name>skipModernUi</name>
+          <value>!true</value>
+        </property>
+        <activeByDefault>true</activeByDefault>
+      </activation>
       <build>
         <plugins>
           <plugin>
                   <arguments>run ${NPM_CMD}</arguments>
                 </configuration>
               </execution>
-
             </executions>
           </plugin>
         </plugins>
           <webXml>src/WEB-INF/web.xml</webXml>
         </configuration>
       </plugin>
-
+    <plugin>
+      <artifactId>maven-clean-plugin</artifactId>
+      <configuration>
+        <filesets>
+          <fileset>
+            <directory>dist</directory>
+          </fileset>
+        </filesets>
+      </configuration>
+    </plugin>
     </plugins>
   </build>
   <dependencies>