|
32 | 32 |
|
33 | 33 | <properties> |
34 | 34 | <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssX</maven.build.timestamp.format> |
| 35 | + <project.rootdir>${maven.multiModuleProjectDirectory}</project.rootdir> |
35 | 36 | </properties> |
36 | 37 |
|
37 | 38 | <build> |
38 | 39 | <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 | + |
39 | 86 | <plugin> |
40 | 87 | <artifactId>maven-clean-plugin</artifactId> |
41 | 88 | <version>3.1.0</version> |
|
74 | 121 | <plugin> |
75 | 122 | <groupId>com.github.eirslett</groupId> |
76 | 123 | <artifactId>frontend-maven-plugin</artifactId> |
77 | | - <version>1.10.3</version> |
| 124 | + <version>1.15.0</version> |
78 | 125 | <configuration> |
79 | | - <nodeVersion>v16.9.1</nodeVersion> |
80 | | - <npmVersion>7.6.0</npmVersion> |
| 126 | + <nodeVersion>${node.version}</nodeVersion> |
81 | 127 | <environmentVariables> |
82 | 128 | <SPLINE_UI_BUILD_REVISION>${buildNumber}</SPLINE_UI_BUILD_REVISION> |
83 | 129 | <SPLINE_UI_BUILD_TIMESTAMP>${timestamp}</SPLINE_UI_BUILD_TIMESTAMP> |
|
0 commit comments