Introduce Spring WS BOM.

The Spring WS BOM itself uses the flatten-maven-plugin to produce a POM file simplified for community consumption. The same plugin is ready to go for the other modules. But given the risk of breaking existing users, it will not be applied until Spring WS 4.1 is released (#1307).

Resolves #1290.
Related: #1205, #1285.
This commit is contained in:
Greg L. Turnquist
2023-01-04 16:03:09 -06:00
parent 3d10ef61a2
commit 7d50f0f9bc
5 changed files with 347 additions and 11 deletions

3
.gitignore vendored
View File

@@ -22,4 +22,5 @@ _site
*.versionsBackup
credentials.yml
credentials.yml
.flattened-pom.xml

View File

@@ -38,39 +38,41 @@ Before you make a release, follow this checklist:
NOTE: The _actual_ building and releasing is done on CI inside a Docker container, ensuring little risk between versions of Java.
But part of the release process requires a local check, which DOES depend upon your environment.
1. Create a new release (on the main branch).
. Update `spring-ws-bom/pom.xml` to contain the planned release version. (`mvn versions:set` will NOT alter these settings.)
+
. Create a new release (on the main branch).
+
----
% ci/create-release.sh <release version> <next snapshot version>
----
+
2. With the release tagged, update the release branch to the newly created tag.
. With the release tagged, update the release branch to the newly created tag.
+
----
% git checkout -b release
% git reset --hard <tag>
----
+
3. Verify this builds locally and passes all tests.
. Verify this builds locally and passes all tests.
+
----
% ./mvnw clean package
% ./mvnw -Pspring-buildsnapshot clean package
----
+
4. Push the tagged version to the release branch.
. Push the tagged version to the release branch.
+
----
% git push -f origin release
----
+
5. For milestones and release candidates, verify the artifacts on artifactory.
6. For releases, login to maven central.
. For milestones and release candidates, verify the artifacts on artifactory.
. For releases, login to maven central.
* Verify the release.
* Close the repository.
* Release the repository.
7. Announce on VMware Slack.
8. Once completed, push the `main` branch for next version's snapshots.
. Announce on VMware Slack.
. Once completed, push the `main` branch for next version's snapshots.
+
----
% git checkout main

View File

@@ -6,7 +6,7 @@ RELEASE=$1
SNAPSHOT=$2
# Bump up the version in pom.xml to the desired version and commit the change
./mvnw versions:set -DnewVersion=$RELEASE -DgenerateBackupPoms=false
./mvnw versions:set -DnewVersion=$RELEASE -DgenerateBackupPoms=false -DprocessAllModules=true -DoldVersion='*'
git add .
git commit --message "Releasing Spring Web Services v$RELEASE"
@@ -14,7 +14,7 @@ git commit --message "Releasing Spring Web Services v$RELEASE"
git tag -s v$RELEASE -m "v$RELEASE"
# Bump up the version in pom.xml to the next snapshot
./mvnw versions:set -DnewVersion=$SNAPSHOT -DgenerateBackupPoms=false
./mvnw versions:set -DnewVersion=$SNAPSHOT -DgenerateBackupPoms=false -DprocessAllModules=true -DoldVersion='*'
git add .
git commit --message "Continue development on v$SNAPSHOT"

35
pom.xml
View File

@@ -71,6 +71,7 @@
</licenses>
<modules>
<module>spring-ws-bom</module>
<module>spring-ws-core</module>
<module>spring-ws-security</module>
<module>spring-ws-support</module>
@@ -342,6 +343,38 @@
</build>
</profile>
<profile>
<!-- TODO: Don't activate until Spring WS 4.1. At that point, simply move this plugin into "distribute" profile. -->
<id>flatten</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.2.5</version>
<configuration>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>distribute</id>
@@ -400,6 +433,7 @@
</goals>
<configuration>
<buildInfo>
<buildName>spring-ws</buildName>
<buildUrl>{{BUILD_URL}}</buildUrl>
</buildInfo>
<deployProperties>
@@ -442,6 +476,7 @@
</goals>
<configuration>
<buildInfo>
<buildName>spring-ws</buildName>
<buildUrl>{{BUILD_URL}}</buildUrl>
</buildInfo>
<deployProperties>

298
spring-ws-bom/pom.xml Normal file
View File

@@ -0,0 +1,298 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-bom</artifactId>
<version>4.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<description>Spring WS - Bill of Materials (BOM)</description>
<url>https://spring.io/projects/spring-ws</url>
<organization>
<name>VMware, Inc.</name>
<url>https://www.spring.io</url>
</organization>
<scm>
<url>https://github.com/spring-projects/spring-ws</url>
<connection>scm:git:git://github.com/spring-projects/spring-ws.git</connection>
<developerConnection>scm:git:ssh://git@github.com:spring-projects/spring-ws.git</developerConnection>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/spring-projects/spring-ws/issues</url>
</issueManagement>
<developers>
<developer>
<id>gturnquist</id>
<name>Greg Turnquist</name>
<email>gturnquist(at)vmware.com</email>
<organization>VMware, Inc.</organization>
<organizationUrl>https://spring.io</organizationUrl>
<roles>
<role>Project Lead</role>
</roles>
<timezone>-6</timezone>
</developer>
</developers>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
<comments>
Copyright 2005-2022 the original author or authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
See the License for the specific language governing permissions and
limitations under the License.
</comments>
</license>
</licenses>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
<version>4.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-security</artifactId>
<version>4.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-support</artifactId>
<version>4.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-test</artifactId>
<version>4.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-xml</artifactId>
<version>4.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.2.5</version>
<configuration>
<updatePomFile>true</updatePomFile>
<pomElements>
<dependencyManagement>expand</dependencyManagement>
</pomElements>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>snapshot</id>
<build>
<plugins>
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>3.2.3</version>
<inherited>false</inherited>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>publish</goal>
</goals>
<configuration>
<buildInfo>
<buildName>spring-ws</buildName>
<buildUrl>{{BUILD_URL}}</buildUrl>
</buildInfo>
<deployProperties>
<zip.name>spring-ws</zip.name>
<zip.displayname>spring-ws</zip.displayname>
<zip.deployed>false</zip.deployed>
<zip.type>docs</zip.type>
<archives>*:*:*:*@zip</archives>
</deployProperties>
<publisher>
<contextUrl>https://repo.spring.io</contextUrl>
<username>{{ARTIFACTORY_USR}}</username>
<password>{{ARTIFACTORY_PSW}}</password>
<repoKey>libs-snapshot-local</repoKey>
<snapshotRepoKey>libs-snapshot-local</snapshotRepoKey>
</publisher>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>milestone</id>
<build>
<plugins>
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>3.2.3</version>
<inherited>false</inherited>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>publish</goal>
</goals>
<configuration>
<buildInfo>
<buildName>spring-ws</buildName>
<buildUrl>{{BUILD_URL}}</buildUrl>
</buildInfo>
<deployProperties>
<zip.name>spring-ws</zip.name>
<zip.displayname>spring-ws</zip.displayname>
<zip.deployed>false</zip.deployed>
<zip.type>docs</zip.type>
<archives>*:*:*:*@zip</archives>
</deployProperties>
<publisher>
<contextUrl>https://repo.spring.io</contextUrl>
<username>{{ARTIFACTORY_USR}}</username>
<password>{{ARTIFACTORY_PSW}}</password>
<repoKey>libs-milestone-local</repoKey>
<snapshotRepoKey>libs-milestone-local</snapshotRepoKey>
</publisher>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>central</id>
<properties>
<maven.test.skip>true</maven.test.skip>
<maven.kotlin.skip>true</maven.kotlin.skip>
<skipTests>true</skipTests>
</properties>
<build>
<pluginManagement>
<plugins>
<!-- Sign JARs -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<!-- Deploy to Sonatype OSS Nexus -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
<keepStagingRepositoryOnFailure>true</keepStagingRepositoryOnFailure>
<skipStagingRepositoryClose>true</skipStagingRepositoryClose>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>sonatype</id>
<url>https://s01.oss.sonatype.org//service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</profile>
</profiles>
</project>