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"?> <?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> <modelVersion>4.0.0</modelVersion>
@ -7,6 +8,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<timestamp>${maven.build.timestamp}</timestamp> <timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format> <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format>
<buildNumber></buildNumber>
</properties> </properties>
<parent> <parent>
@ -155,6 +157,16 @@
<goal>npm</goal> <goal>npm</goal>
</goals> </goals>
</execution> </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> <execution>
<id>build</id> <id>build</id>
<goals> <goals>
@ -173,22 +185,36 @@
<arguments>link</arguments> <arguments>link</arguments>
</configuration> </configuration>
</execution> </execution>
<!-- <execution> <execution>
<id>npm publish</id> <id>npm publish</id>
<goals> <goals>
<goal>npm</goal> <goal>npm</goal>
</goals> </goals>
<phase>deploy</phase> <phase>deploy</phase>
<configuration> <configuration>
<arguments>publish -userconfig ../libreccm.npmrc</arguments> <arguments>publish -userconfig ../libreccm.npmrc</arguments>
</configuration> </configuration>
</execution> --> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </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> </project>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?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> <modelVersion>4.0.0</modelVersion>
@ -13,13 +14,14 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<timestamp>${maven.build.timestamp}</timestamp> <timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>yyyy-MM-dd'T'HHmmss</maven.build.timestamp.format> <maven.build.timestamp.format>yyyy-MM-dd'T'HHmmss</maven.build.timestamp.format>
<buildNumber></buildNumber>
</properties> </properties>
<groupId>org.librecms</groupId> <groupId>org.librecms</groupId>
<artifactId>ccm-cms</artifactId> <artifactId>ccm-cms</artifactId>
<name>LibreCMS</name> <name>LibreCMS</name>
<licenses> <licenses>
<license> <license>
<name>Lesser GPL 2.1</name> <name>Lesser GPL 2.1</name>
@ -53,7 +55,7 @@
<artifactId>hibernate-envers</artifactId> <artifactId>hibernate-envers</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.hibernate.validator</groupId> <groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId> <artifactId>hibernate-validator</artifactId>
@ -64,19 +66,19 @@
<artifactId>hibernate-validator-cdi</artifactId> <artifactId>hibernate-validator-cdi</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.hibernate</groupId> <groupId>org.hibernate</groupId>
<artifactId>hibernate-search-orm</artifactId> <artifactId>hibernate-search-orm</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jboss.resteasy</groupId> <groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-multipart-provider</artifactId> <artifactId>resteasy-multipart-provider</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.mvc</groupId> <groupId>javax.mvc</groupId>
<artifactId>javax.mvc-api</artifactId> <artifactId>javax.mvc-api</artifactId>
@ -92,7 +94,7 @@
<artifactId>krazo-freemarker</artifactId> <artifactId>krazo-freemarker</artifactId>
<!--<scope>provided</scope>--> <!--<scope>provided</scope>-->
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId> <groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId> <artifactId>jackson-jaxrs-json-provider</artifactId>
@ -105,14 +107,14 @@
<groupId>com.fasterxml.jackson.datatype</groupId> <groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId> <artifactId>jackson-datatype-jsr310</artifactId>
</dependency> </dependency>
<!-- Dependencies for log4j 2 --> <!-- Dependencies for log4j 2 -->
<dependency> <dependency>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId> <artifactId>log4j-api</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.shiro</groupId> <groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId> <artifactId>shiro-core</artifactId>
@ -121,18 +123,18 @@
<groupId>org.apache.shiro</groupId> <groupId>org.apache.shiro</groupId>
<artifactId>shiro-web</artifactId> <artifactId>shiro-web</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jsoup</groupId> <groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId> <artifactId>jsoup</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.hamcrest</groupId> <groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId> <artifactId>hamcrest-core</artifactId>
@ -150,7 +152,7 @@
<version>${project.parent.version}</version> <version>${project.parent.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>nl.jqno.equalsverifier</groupId> <groupId>nl.jqno.equalsverifier</groupId>
<artifactId>equalsverifier</artifactId> <artifactId>equalsverifier</artifactId>
@ -172,7 +174,7 @@
<artifactId>shrinkwrap-resolver-impl-maven</artifactId> <artifactId>shrinkwrap-resolver-impl-maven</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.h2database</groupId> <groupId>com.h2database</groupId>
<artifactId>h2</artifactId> <artifactId>h2</artifactId>
@ -193,7 +195,7 @@
<directory>./target/generated-resources</directory> <directory>./target/generated-resources</directory>
</resource> </resource>
</resources> </resources>
<testResources> <testResources>
<testResource> <testResource>
<directory>src/test/resources</directory> <directory>src/test/resources</directory>
@ -215,7 +217,7 @@
<encoding>${project.build.sourceEncoding}</encoding> <encoding>${project.build.sourceEncoding}</encoding>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>com.github.eirslett</groupId> <groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId> <artifactId>frontend-maven-plugin</artifactId>
@ -233,20 +235,20 @@
</configuration> </configuration>
</execution> </execution>
<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> <id>npm install</id>
<goals> <goals>
<goal>npm</goal> <goal>npm</goal>
</goals> </goals>
</execution> </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> <execution>
<id>build</id> <id>build</id>
<goals> <goals>
@ -256,22 +258,22 @@
<arguments>run build</arguments> <arguments>run build</arguments>
</configuration> </configuration>
</execution> </execution>
<!-- <execution> <execution>
<id>npm publish</id> <id>npm publish</id>
<goals> <goals>
<goal>npm</goal> <goal>npm</goal>
</goals> </goals>
<phase>deploy</phase> <phase>deploy</phase>
<configuration> <configuration>
<arguments>publish -userconfig ../libreccm.npmrc</arguments> <arguments>publish -userconfig ../libreccm.npmrc</arguments>
</configuration> </configuration>
</execution> --> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
@ -326,7 +328,7 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
@ -367,7 +369,7 @@
<groupId>org.jacoco</groupId> <groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId> <artifactId>jacoco-maven-plugin</artifactId>
</plugin> </plugin>
<plugin> <plugin>
<groupId>com.github.spotbugs</groupId> <groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId> <artifactId>spotbugs-maven-plugin</artifactId>
@ -423,9 +425,23 @@
</plugin> </plugin>
</plugins> </plugins>
</reporting> </reporting>
<profiles> <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> <profile>
<id>run-its-with-wildfly-h2mem</id> <id>run-its-with-wildfly-h2mem</id>
<dependencies> <dependencies>
@ -438,9 +454,9 @@
<groupId>net.sf.saxon</groupId> <groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId> <artifactId>Saxon-HE</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<testResources> <testResources>
<testResource> <testResource>
@ -452,9 +468,9 @@
<testResource> <testResource>
<directory>${project.build.directory}/generated-resources</directory> <directory>${project.build.directory}/generated-resources</directory>
</testResource> </testResource>
</testResources> </testResources>
<plugins> <plugins>
<plugin> <plugin>
<groupId>de.jpdigital</groupId> <groupId>de.jpdigital</groupId>
@ -553,7 +569,7 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<reporting> <reporting>
<plugins> <plugins>
<plugin> <plugin>
@ -571,7 +587,7 @@
</plugins> </plugins>
</reporting> </reporting>
</profile> </profile>
<profile> <profile>
<id>run-its-with-wildfly-pgsql</id> <id>run-its-with-wildfly-pgsql</id>
<dependencies> <dependencies>
@ -590,7 +606,7 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<testResources> <testResources>
<testResource> <testResource>
@ -603,7 +619,7 @@
<directory>${project.build.directory}/generated-resources</directory> <directory>${project.build.directory}/generated-resources</directory>
</testResource> </testResource>
</testResources> </testResources>
<plugins> <plugins>
<plugin> <plugin>
<groupId>de.jpdigital</groupId> <groupId>de.jpdigital</groupId>
@ -732,7 +748,7 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<reporting> <reporting>
<plugins> <plugins>
<plugin> <plugin>
@ -750,7 +766,7 @@
</plugins> </plugins>
</reporting> </reporting>
</profile> </profile>
<profile> <profile>
<id>run-its-in-remote-wildfly-h2mem</id> <id>run-its-in-remote-wildfly-h2mem</id>
<dependencies> <dependencies>
@ -764,7 +780,7 @@
<artifactId>Saxon-HE</artifactId> <artifactId>Saxon-HE</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<testResources> <testResources>
<testResource> <testResource>
@ -777,7 +793,7 @@
<directory>${project.build.directory}/generated-resources</directory> <directory>${project.build.directory}/generated-resources</directory>
</testResource> </testResource>
</testResources> </testResources>
<plugins> <plugins>
<plugin> <plugin>
<groupId>de.jpdigital</groupId> <groupId>de.jpdigital</groupId>
@ -825,7 +841,7 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<reporting> <reporting>
<plugins> <plugins>
<plugin> <plugin>
@ -843,7 +859,7 @@
</plugins> </plugins>
</reporting> </reporting>
</profile> </profile>
<profile> <profile>
<id>run-its-in-remote-wildfly-pgsql</id> <id>run-its-in-remote-wildfly-pgsql</id>
<dependencies> <dependencies>
@ -857,7 +873,7 @@
<artifactId>Saxon-HE</artifactId> <artifactId>Saxon-HE</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<testResources> <testResources>
<testResource> <testResource>
@ -870,7 +886,7 @@
<directory>${project.build.directory}/generated-resources</directory> <directory>${project.build.directory}/generated-resources</directory>
</testResource> </testResource>
</testResources> </testResources>
<plugins> <plugins>
<plugin> <plugin>
<groupId>de.jpdigital</groupId> <groupId>de.jpdigital</groupId>
@ -918,7 +934,7 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<reporting> <reporting>
<plugins> <plugins>
<plugin> <plugin>
@ -938,5 +954,5 @@
</profile> </profile>
</profiles> </profiles>
</project> </project>