Skip to content

Commit e08dcaa

Browse files
committed
(no issue) add ".nvmrc"
1 parent 1794299 commit e08dcaa

2 files changed

Lines changed: 50 additions & 3 deletions

File tree

ui/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16.9.1

ui/pom.xml

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,57 @@
3232

3333
<properties>
3434
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssX</maven.build.timestamp.format>
35+
<project.rootdir>${maven.multiModuleProjectDirectory}</project.rootdir>
3536
</properties>
3637

3738
<build>
3839
<plugins>
40+
<!-- Read the ".nvmrc" and populate the "node.version" property -->
41+
<plugin>
42+
<groupId>org.codehaus.mojo</groupId>
43+
<artifactId>exec-maven-plugin</artifactId>
44+
<version>3.3.0</version>
45+
<executions>
46+
<execution>
47+
<id>generate-node-version-property</id>
48+
<phase>initialize</phase>
49+
<goals>
50+
<goal>exec</goal>
51+
</goals>
52+
<configuration>
53+
<executable>sh</executable>
54+
<arguments>
55+
<argument>-c</argument>
56+
<argument><![CDATA[
57+
mkdir -p ${project.build.directory}
58+
echo "node.version=$(cat ${project.rootdir}/.nvmrc)" > ${project.build.directory}/nvm.properties
59+
]]></argument>
60+
</arguments>
61+
</configuration>
62+
</execution>
63+
</executions>
64+
</plugin>
65+
<plugin>
66+
<groupId>org.codehaus.mojo</groupId>
67+
<artifactId>properties-maven-plugin</artifactId>
68+
<version>1.2.1</version>
69+
<executions>
70+
<execution>
71+
<phase>initialize</phase>
72+
<goals>
73+
<goal>read-project-properties</goal>
74+
</goals>
75+
<configuration>
76+
<files>
77+
<file>${project.build.directory}/nvm.properties</file>
78+
</files>
79+
</configuration>
80+
</execution>
81+
</executions>
82+
</plugin>
83+
84+
<!-- others -->
85+
3986
<plugin>
4087
<artifactId>maven-clean-plugin</artifactId>
4188
<version>3.1.0</version>
@@ -74,10 +121,9 @@
74121
<plugin>
75122
<groupId>com.github.eirslett</groupId>
76123
<artifactId>frontend-maven-plugin</artifactId>
77-
<version>1.10.3</version>
124+
<version>1.15.0</version>
78125
<configuration>
79-
<nodeVersion>v16.9.1</nodeVersion>
80-
<npmVersion>7.6.0</npmVersion>
126+
<nodeVersion>${node.version}</nodeVersion>
81127
<environmentVariables>
82128
<SPLINE_UI_BUILD_REVISION>${buildNumber}</SPLINE_UI_BUILD_REVISION>
83129
<SPLINE_UI_BUILD_TIMESTAMP>${timestamp}</SPLINE_UI_BUILD_TIMESTAMP>

0 commit comments

Comments
 (0)