Skip to content

Commit b02094a

Browse files
committed
task(pom.xml): add frontend-maven-plugin.
Addressed to #1060 No functional changes.
1 parent 61fca51 commit b02094a

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ src/main/webapp/WEB-INF/static/styles/*.min.css
1818
src/main/javascript/*.min.js
1919
src/main/javascript/*/*.min.js
2020

21+
# managed by frontend-maven-plugin
22+
src/main/frontend/node/
23+
2124
# Vagrant related files
2225
.vagrant/
2326
vagrant/provisioning/vagrant.retry

pom.xml

+32
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@
490490
<enforcer.plugin.version>1.4.1</enforcer.plugin.version>
491491
<error-prone-javac.version>9+181-r4173-1</error-prone-javac.version>
492492
<error-prone.version>2.3.3</error-prone.version>
493+
<frontend.plugin.version>1.7.6</frontend.plugin.version>
493494
<gmavenplus.plugin.version>1.5</gmavenplus.plugin.version>
494495

495496
<!-- Redefine default value from spring-boot-dependencies (https://github.com/spring-projects/spring-boot/blob/v1.5.21.RELEASE/spring-boot-dependencies/pom.xml) -->
@@ -1207,6 +1208,37 @@
12071208
</plugins>
12081209
</build>
12091210
</profile>
1211+
<profile>
1212+
<id>frontend</id>
1213+
<build>
1214+
<plugins>
1215+
<!--
1216+
We assume that most of the time we develop backend rather frontend.
1217+
So, we cache and skip the frontend-related things by default. This
1218+
should save us a little time on every iteration during development
1219+
on local environment.
1220+
-->
1221+
<plugin>
1222+
<groupId>com.github.eirslett</groupId>
1223+
<artifactId>frontend-maven-plugin</artifactId>
1224+
<version>${frontend.plugin.version}</version>
1225+
<configuration>
1226+
<nodeVersion>v10.16.0</nodeVersion>
1227+
<workingDirectory>${basedir}/src/main/frontend</workingDirectory>
1228+
</configuration>
1229+
<executions>
1230+
<execution>
1231+
<id>install-node-and-npm</id>
1232+
<goals>
1233+
<goal>install-node-and-npm</goal>
1234+
</goals>
1235+
<phase>initialize</phase>
1236+
</execution>
1237+
</executions>
1238+
</plugin>
1239+
</plugins>
1240+
</build>
1241+
</profile>
12101242
</profiles>
12111243

12121244
</project>

0 commit comments

Comments
 (0)