Commit c50d6787 authored by Mathijs den Burger's avatar Mathijs den Burger

CMS-11601 Use frontend-maven-plugin to build with NodeJs and NPM

Use "npm ci" instead of "npm install" to avoid pulling in newer versions
of dependencies automatically.
parent 51617207
......@@ -3,5 +3,6 @@
.DS_Store
atlassian-ide-plugin.xml
classes/
node_modules/
target/
/dashboard/node/
/dashboard/node_modules/
This diff is collapsed.
......@@ -66,30 +66,40 @@
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${maven.plugin.frontend.version}</version>
<executions>
<execution>
<id>npm-install</id>
<phase>generate-sources</phase>
<goals><goal>exec</goal></goals>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<executable>npm</executable>
<commandlineArgs>install</commandlineArgs>
<nodeVersion>${nodejs.version}</nodeVersion>
<npmVersion>${npm.version}</npmVersion>
</configuration>
</execution>
<execution>
<id>npm-build</id>
<phase>process-resources</phase>
<goals><goal>exec</goal></goals>
<id>npm ci</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<executable>npm</executable>
<commandlineArgs>run build</commandlineArgs>
<arguments>ci</arguments>
</configuration>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
......
......@@ -48,6 +48,10 @@
<filesync.override>false</filesync.override>
<maven.plugins.filesync.version>1.0.0</maven.plugins.filesync.version>
<maven.plugin.frontend.version>1.6</maven.plugin.frontend.version>
<nodejs.version>v8.13.0</nodejs.version>
<npm.version>6.4.1</npm.version>
<maven.plugin.jacoco.version>0.8.1</maven.plugin.jacoco.version>
<!-- Tells Sonar to run the unit tests -->
<sonar.dynamicAnalysis>true</sonar.dynamicAnalysis>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment