Skip to content

Commit

Permalink
Introduce Spring WS BOM.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gregturn committed Jan 5, 2023
1 parent 3d10ef6 commit 7d50f0f
Show file tree
Hide file tree
Showing 5 changed files with 347 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ _site

*.versionsBackup

credentials.yml
credentials.yml
.flattened-pom.xml
18 changes: 10 additions & 8 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ci/create-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ 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"

# Tag the 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"

Expand Down
35 changes: 35 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -400,6 +433,7 @@
</goals>
<configuration>
<buildInfo>
<buildName>spring-ws</buildName>
<buildUrl>{{BUILD_URL}}</buildUrl>
</buildInfo>
<deployProperties>
Expand Down Expand Up @@ -442,6 +476,7 @@
</goals>
<configuration>
<buildInfo>
<buildName>spring-ws</buildName>
<buildUrl>{{BUILD_URL}}</buildUrl>
</buildInfo>
<deployProperties>
Expand Down
Loading

0 comments on commit 7d50f0f

Please sign in to comment.