Skip to content

Commit

Permalink
Build JavaScript projects in parallel from root POM
Browse files Browse the repository at this point in the history
Closes keycloak#35365

Signed-off-by: Jon Koops <[email protected]>
  • Loading branch information
jonkoops committed Dec 4, 2024
1 parent aa0b107 commit d6b6fab
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 50 deletions.
6 changes: 0 additions & 6 deletions js/apps/account-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,5 @@
<directory>maven-resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
6 changes: 0 additions & 6 deletions js/apps/admin-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,5 @@
<directory>maven-resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
5 changes: 0 additions & 5 deletions js/libs/keycloak-js/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<!-- Skip execution of build with an empty phase. -->
<id>pnpm-build</id>
<phase/>
</execution>
<execution>
<id>pnpm-pack</id>
<phase>package</phase>
Expand Down
11 changes: 10 additions & 1 deletion js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"type": "module",
"packageManager": "[email protected]+sha512.c8180b3fbe4e4bca02c94234717896b5529740a6cbadf19fa78254270403ea2f27d4e1d46a08a0f56c89b63dc8ebfd3ee53326da720273794e6200fcf0d184ab",
"scripts": {
"prepare": "cd .. && husky js/.husky"
"prepare": "cd .. && husky js/.husky",
"build": "wireit"
},
"wireit": {
"build": {
"dependencies": [
"./apps/account-ui:build",
"./apps/admin-ui:build"
]
}
},
"devDependencies": {
"@eslint/compat": "^1.2.3",
Expand Down
61 changes: 35 additions & 26 deletions js/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,39 +40,14 @@
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>install-node-and-pnpm</goal>
</goals>
</execution>
<execution>
<id>pnpm-install</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>install --prefer-offline --frozen-lockfile --ignore-scripts</arguments>
<workingDirectory>${maven.multiModuleProjectDirectory}/js</workingDirectory>
</configuration>
</execution>
<execution>
<id>pnpm-build</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>build</arguments>
</configuration>
</execution>
</executions>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
<pnpmVersion>${pnpm.version}</pnpmVersion>
<installDirectory>${maven.multiModuleProjectDirectory}/js</installDirectory>
<pnpmInheritsProxyConfigFromMaven>false</pnpmInheritsProxyConfigFromMaven>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
Expand Down Expand Up @@ -100,6 +75,40 @@
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend.plugin.version}</version>
<inherited>false</inherited>
<executions>
<execution>
<goals>
<goal>install-node-and-pnpm</goal>
</goals>
</execution>
<execution>
<id>pnpm-install</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>install --prefer-offline --frozen-lockfile --ignore-scripts</arguments>
</configuration>
</execution>
<execution>
<id>pnpm-build-recursive</id>
<goals>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>build</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
Expand Down
4 changes: 0 additions & 4 deletions js/themes-vendor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@

<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
<wildfly.plugin.version>5.0.0.Final</wildfly.plugin.version>
<nexus.staging.plugin.version>1.6.13</nexus.staging.plugin.version>
<nexus3.staging.plugin.version>1.0.7</nexus3.staging.plugin.version>
<frontend.plugin.version>1.15.0</frontend.plugin.version>
<frontend.plugin.version>1.15.1</frontend.plugin.version>
<docker.maven.plugin.version>0.40.3</docker.maven.plugin.version>
<verifier.plugin.version>1.1</verifier.plugin.version>
<shade.plugin.version>3.4.1</shade.plugin.version>
Expand Down Expand Up @@ -1035,7 +1035,7 @@
<version>${project.version}</version>
<type>zip</type>
</dependency>
<dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-saml-wildfly-subsystem</artifactId>
<version>${project.version}</version>
Expand Down

0 comments on commit d6b6fab

Please sign in to comment.