Added change for NPM to all modules deploying NPM modules

master
Jens Pelzetter 2023-04-24 20:03:42 +02:00
parent 0399809641
commit ad1686e63d
2 changed files with 103 additions and 61 deletions

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@ -7,6 +8,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format>
<buildNumber></buildNumber>
</properties>
<parent>
@ -155,6 +157,16 @@
<goal>npm</goal>
</goals>
</execution>
<!-- Sync Maven module version and NPM module version -->
<execution>
<id>npm version</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>version --allow-same-version=true ${project.version}${buildNumber}</arguments>
</configuration>
</execution>
<execution>
<id>build</id>
<goals>
@ -174,7 +186,7 @@
</configuration>
</execution>
<!-- <execution>
<execution>
<id>npm publish</id>
<goals>
<goal>npm</goal>
@ -185,10 +197,24 @@
<configuration>
<arguments>publish -userconfig ../libreccm.npmrc</arguments>
</configuration>
</execution> -->
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>with-buildnumber</id>
<activation>
<property>
<name>env.BUILD_NUMBER</name>
</property>
</activation>
<properties>
<buildNumber>.${env.BUILD_NUMBER}</buildNumber>
</properties>
</profile>
</profiles>
</project>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@ -13,6 +14,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>yyyy-MM-dd'T'HHmmss</maven.build.timestamp.format>
<buildNumber></buildNumber>
</properties>
<groupId>org.librecms</groupId>
@ -232,21 +234,21 @@
<nodeVersion>v16.14.2</nodeVersion>
</configuration>
</execution>
<execution>
<id>set package version</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>version ${project.version}.${timestamp}</arguments>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
</execution>
<execution>
<id>npm version</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>version --allow-same-version=true ${project.version}.${buildNumber}</arguments>
</configuration>
</execution>
<execution>
<id>build</id>
<goals>
@ -257,7 +259,7 @@
</configuration>
</execution>
<!-- <execution>
<execution>
<id>npm publish</id>
<goals>
<goal>npm</goal>
@ -268,7 +270,7 @@
<configuration>
<arguments>publish -userconfig ../libreccm.npmrc</arguments>
</configuration>
</execution> -->
</execution>
</executions>
</plugin>
@ -426,6 +428,20 @@
<profiles>
<profiles>
<profile>
<id>with-buildnumber</id>
<activation>
<property>
<name>env.BUILD_NUMBER</name>
</property>
</activation>
<properties>
<buildNumber>.${env.BUILD_NUMBER}</buildNumber>
</properties>
</profile>
</profiles>
<profile>
<id>run-its-with-wildfly-h2mem</id>
<dependencies>