Skip to content

Commit 5885c70

Browse files
committed
Add ability to publish to S3 maven milestone repository for maven central style artifacts by adding slightly modified spring-build targets to publish-maven.xml
1 parent 7ad5dd1 commit 5885c70

File tree

2 files changed

+39
-7
lines changed

2 files changed

+39
-7
lines changed

build-spring-framework/publish-maven.xml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,34 @@
1616

1717

1818
<!-- top level targets -->
19-
<target name="publish-maven-central-only-pom-artifacts" depends="publish-only-pom-windows,publish-only-pom-unix">
19+
20+
<target name="publish-maven-central-only-pom-artifacts" depends="publish-central-only-pom-windows,publish-central-only-pom-unix">
21+
</target>
22+
23+
<target name="publish-maven-central-code-artifacts" depends="publish-central-windows,publish-code-unix">
2024
</target>
2125

2226

23-
<target name="publish-maven-central-code-artifacts" depends="publish-code-windows,publish-code-unix">
27+
<target name="publish-maven-milestone-only-pom-artifacts" depends="maven.init">
28+
<maven:deploy>
29+
<remoteRepository url="s3://${publish.bucket}/maven/bundles/${adjusted.release.type}">
30+
<authentication username="${accessKey}" passphrase="${secretKey}"/>
31+
</remoteRepository>
32+
<pom file="${local.pom.output.file}"/>
33+
</maven:deploy>
2434
</target>
2535

36+
<target name="publish-maven-milestone-code-artifacts" depends="maven.init">
37+
<maven:deploy file="${jar.output.file}">
38+
<remoteRepository url="s3://${publish.bucket}/maven/bundles/${adjusted.release.type}">
39+
<authentication username="${accessKey}" passphrase="${secretKey}"/>
40+
</remoteRepository>
41+
<pom file="${pom.output.file}"/>
42+
<attach file="${source-jar.output.file}" classifier="sources"/>
43+
</maven:deploy>
44+
</target>
45+
46+
2647
<target name="install-pom" depends="maven.init">
2748
<maven:install>
2849
<pom file="${local.pom.output.file}"/>
@@ -33,7 +54,7 @@
3354

3455
<!-- POM only deployment -->
3556

36-
<target name="publish-only-pom-windows" depends="maven.init" if="is.windows">
57+
<target name="publish-central-only-pom-windows" depends="maven.init" if="is.windows">
3758
<maven:deploy>
3859
<!-- Due to http://jira.codehaus.org/browse/MANTTASKS-103 in 2.0.8 on windows, fixed in 2.0.9 -->
3960
<!-- Assuming using local file, value of variable should be of the form L:\temp\maven-repo-test -->
@@ -42,7 +63,7 @@
4263
</maven:deploy>
4364
</target>
4465

45-
<target name="publish-only-pom-unix" depends="maven.init" unless="is.windows">
66+
<target name="publish-central-only-pom-unix" depends="maven.init" unless="is.windows">
4667
<maven:deploy>
4768
<remoteRepository url="${maven.central.repository}"/>
4869
<pom file="${local.pom.output.file}"/>
@@ -52,7 +73,7 @@
5273

5374
<!-- jar, source-jar and POM deployment -->
5475

55-
<target name="publish-code-windows" depends="maven.init">
76+
<target name="publish-central-windows" depends="maven.init">
5677
<maven:deploy file="${jar.output.file}">
5778
<!-- Due to http://jira.codehaus.org/browse/MANTTASKS-103 in 2.0.8 on windows, fixed in 2.0.9 -->
5879
<!-- Assuming using local file, value of variable should be of the form L:\temp\maven-repo-test -->

build-spring-framework/publish.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,23 @@
3131
<pathelement location="../org.springframework.spring-parent"/>
3232
</path>
3333

34+
<!-- for milestones -->
3435

35-
<target name="publish-maven-central-spring" depends="publish-maven-central-only-pom-spring">
36+
<target name="publish-maven-milestone" depends="publish-maven-milestone-only-pom">
37+
<all-bundles target="publish-maven-milestone-code-artifacts" buildpathRef="modules-with-code-artifacts"/>
38+
</target>
39+
40+
<target name="publish-maven-milestone-only-pom">
41+
<all-bundles target="publish-maven-milestone-only-pom-artifacts" buildpathRef="modules-with-only-pom-artifacts"/>
42+
</target>
43+
44+
<!-- for releases -->
45+
46+
<target name="publish-maven-central-release" depends="publish-maven-central-only-pom-release">
3647
<all-bundles target="publish-maven-central-code-artifacts" buildpathRef="modules-with-code-artifacts"/>
3748
</target>
3849

39-
<target name="publish-maven-central-only-pom-spring">
50+
<target name="publish-maven-central-only-pom-release">
4051
<all-bundles target="publish-maven-central-only-pom-artifacts" buildpathRef="modules-with-only-pom-artifacts"/>
4152
</target>
4253

0 commit comments

Comments
 (0)