Skip to content

Commit

Permalink
(no issue) add ".nvmrc"
Browse files Browse the repository at this point in the history
  • Loading branch information
wajda committed Jul 9, 2024
1 parent 1794299 commit 54d765f
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 3 deletions.
1 change: 1 addition & 0 deletions ui/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.9.1
51 changes: 48 additions & 3 deletions ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,52 @@

<build>
<plugins>
<!-- Read the ".nvmrc" and populate the "node.version" property -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>generate-node-version-property</id>
<phase>initialize</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sh</executable>
<arguments>
<argument>-c</argument>
<argument><![CDATA[
mkdir -p ${project.build.directory}
echo "node.version=$(cat ${project.basedir}/.nvmrc)" > ${project.build.directory}/nvm.properties
]]></argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${project.build.directory}/nvm.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>

<!-- others -->

<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
Expand Down Expand Up @@ -74,10 +120,9 @@
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.10.3</version>
<version>1.15.0</version>
<configuration>
<nodeVersion>v16.9.1</nodeVersion>
<npmVersion>7.6.0</npmVersion>
<nodeVersion>${node.version}</nodeVersion>
<environmentVariables>
<SPLINE_UI_BUILD_REVISION>${buildNumber}</SPLINE_UI_BUILD_REVISION>
<SPLINE_UI_BUILD_TIMESTAMP>${timestamp}</SPLINE_UI_BUILD_TIMESTAMP>
Expand Down

0 comments on commit 54d765f

Please sign in to comment.