Skip to content

Commit d2c4e56

Browse files
committed
use frontend-maven-plugin
1 parent b0f0188 commit d2c4e56

File tree

2 files changed

+26
-21
lines changed

2 files changed

+26
-21
lines changed

Jenkinsfile

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,8 @@
1-
script {
2-
def nodeHome = "${env.WORKSPACE}/.node"
3-
withEnv(["PATH=${nodeHome}/bin:${env.PATH}"]) {
4-
sproutMultiModuleBuild {
5-
moduleToBuild = 'mcp-parent'
6-
nodeLabel = 'ephemeral'
7-
tribes = ['global']
8-
notifySlackGroupsOnFailure = ['@kevin']
9-
jdk = 17
10-
deployRCBranches = true
11-
12-
preBuildBashCommands = """
13-
set -e
14-
mkdir -p "${nodeHome}"
15-
wget -q https://nodejs.org/dist/v18.19.0/node-v18.19.0-linux-x64.tar.xz
16-
tar -xJf node-v18.19.0-linux-x64.tar.xz --strip-components=1 -C "${nodeHome}"
17-
"${nodeHome}/bin/node" -v || true
18-
"${nodeHome}/bin/npx" -v || true
19-
"""
20-
}
21-
}
1+
sproutMultiModuleBuild {
2+
moduleToBuild = 'mcp-parent'
3+
nodeLabel = 'ephemeral'
4+
tribes = ['global']
5+
notifySlackGroupsOnFailure = ['@kevin']
6+
jdk = 17
7+
deployRCBranches = true
228
}

pom.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
<maven-project-info-reports-plugin.version>3.4.5</maven-project-info-reports-plugin.version>
8888
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
8989
<spring-javaformat-maven-plugin.version>0.0.43</spring-javaformat-maven-plugin.version>
90+
<frontend-maven-plugin.version>1.15.1</frontend-maven-plugin.version>
9091
<org.maven.antora-version>1.0.0-alpha.4</org.maven.antora-version>
9192
<io.spring.maven.antora-version>0.0.4</io.spring.maven.antora-version>
9293
<asciidoctorj-pdf.version>1.6.2</asciidoctorj-pdf.version>
@@ -124,6 +125,24 @@
124125
</execution>
125126
</executions>
126127
</plugin>
128+
<plugin>
129+
<groupId>com.github.eirslett</groupId>
130+
<artifactId>frontend-maven-plugin</artifactId>
131+
<version>${frontend-maven-plugin.version}</version>
132+
<executions>
133+
<execution>
134+
<id>install node and npm</id>
135+
<goals>
136+
<goal>install-node-and-npm</goal>
137+
</goals>
138+
<phase>generate-test-resources</phase>
139+
<configuration>
140+
<nodeVersion>v18.19.0</nodeVersion>
141+
<npmVersion>10.2.4</npmVersion>
142+
</configuration>
143+
</execution>
144+
</executions>
145+
</plugin>
127146
<plugin>
128147
<groupId>org.apache.maven.plugins</groupId>
129148
<artifactId>maven-site-plugin</artifactId>

0 commit comments

Comments
 (0)