Skip to content

Commit

Permalink
issue #1155 Move "node.version" settings from "pom.xml" to ".nvmrc" t…
Browse files Browse the repository at this point in the history
…o support "nvm" command.
  • Loading branch information
wajda committed Jul 3, 2024
1 parent 95727bb commit 6ebaec2
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 5 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.14.0
1 change: 0 additions & 1 deletion arangodb-foxx-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
<executions>
<execution>
<phase>process-classes</phase>
Expand Down
58 changes: 55 additions & 3 deletions build/parent-pom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<version>1.0.0-SNAPSHOT</version>

<properties>
<project.rootdir>${maven.multiModuleProjectDirectory}</project.rootdir>
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssX</maven.build.timestamp.format>
<java.version>1.8</java.version>
Expand All @@ -52,8 +53,6 @@
<springfox-swagger.version>2.9.2</springfox-swagger.version>
<jackson.version>2.17.1</jackson.version>
<finatra.jackson.version>21.5.0</finatra.jackson.version>
<node.version>v20.14.0</node.version>
<npm.version>10.8.0</npm.version>

<!-- Extend argLine using prepared way to not influence existing dependency of JaCoCo plugin. -->
<scalatest.argLine.extra>
Expand All @@ -65,6 +64,50 @@

<build>
<plugins>
<!-- Read the ".nvmrc" and populate the "node.version" property -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<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.rootdir}/.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>

<!-- Scala compilation -->
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
Expand Down Expand Up @@ -177,7 +220,6 @@
<version>1.10.3</version>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
<npmVersion>${npm.version}</npmVersion>
<environmentVariables>
<SPLINE_BUILD_REVISION>${buildNumber}</SPLINE_BUILD_REVISION>
<SPLINE_BUILD_TIMESTAMP>${timestamp}</SPLINE_BUILD_TIMESTAMP>
Expand Down Expand Up @@ -237,6 +279,16 @@
</plugin>

</plugins>

<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.3.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>

<dependencies>
Expand Down
1 change: 0 additions & 1 deletion rest-gateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<includePluginDependencies>true</includePluginDependencies>
<executableDependency>
Expand Down

0 comments on commit 6ebaec2

Please sign in to comment.