Skip to content

Commit e3b9876

Browse files
Add pom metadata and script for central
* since repo.spring.io is no longer an option
1 parent f9d14fb commit e3b9876

File tree

9 files changed

+123
-66
lines changed

9 files changed

+123
-66
lines changed

ci/create-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SNAPSHOT=$2
88
./mvnw versions:set -DnewVersion=$RELEASE -DgenerateBackupPoms=false
99
git add .
1010
git commit --message "v$RELEASE Release"
11-
git tag -s v$RELEASE -m "v$RELEASE"
11+
git tag v$RELEASE
1212

1313
git reset --hard HEAD^1
1414
./mvnw versions:set -DnewVersion=$SNAPSHOT -DgenerateBackupPoms=false

ci/deploy.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,12 @@ set -euo pipefail
44

55
[[ -d $PWD/maven && ! -d $HOME/.m2 ]] && ln -s $PWD/maven $HOME/.m2
66

7+
export REPOSITORY="${PWD}"/repository
8+
79
cd java-buildpack-client-certificate-mapper
8-
./mvnw -q -Dmaven.test.skip=true deploy
10+
./mvnw -Dmaven.test.skip=true deploy -DcreateChecksum=true -DaltDeploymentRepository="local::default::file://${REPOSITORY}"
11+
12+
echo "here are the published jars in ${REPOSITORY}"
13+
ls -al ${REPOSITORY}/org/cloudfoundry/
14+
ls -al ${REPOSITORY}/org/cloudfoundry/java-buildpack-client-certificate-mapper/
15+
ls -al ${REPOSITORY}/org/cloudfoundry/java-buildpack-client-certificate-mapper/2.0.0

ci/deploy.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

ci/promote-to-maven-central.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
export BUILD_INFO_LOCATION=$(pwd)/repository/build-info.json
6+
7+
java -jar /concourse-release-scripts.jar publishToCentral 'RELEASE' "$BUILD_INFO_LOCATION" repository
8+
9+
echo "Sync complete"

ci/unit-test.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

java-buildpack-client-certificate-mapper-jakarta/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@
9494
<groupId>org.apache.maven.plugins</groupId>
9595
<artifactId>maven-surefire-plugin</artifactId>
9696
</plugin>
97+
<plugin>
98+
<groupId>org.apache.maven.plugins</groupId>
99+
<artifactId>maven-javadoc-plugin</artifactId>
100+
</plugin>
97101
</plugins>
98102
</build>
99103

java-buildpack-client-certificate-mapper-javax/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@
9494
<groupId>org.apache.maven.plugins</groupId>
9595
<artifactId>maven-surefire-plugin</artifactId>
9696
</plugin>
97+
<plugin>
98+
<groupId>org.apache.maven.plugins</groupId>
99+
<artifactId>maven-javadoc-plugin</artifactId>
100+
</plugin>
97101
</plugins>
98102
</build>
99103

java-buildpack-client-certificate-mapper/pom.xml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,67 @@
6161
<groupId>org.apache.maven.plugins</groupId>
6262
<artifactId>maven-source-plugin</artifactId>
6363
</plugin>
64+
<plugin>
65+
<artifactId>maven-antrun-plugin</artifactId>
66+
<!--
67+
Not ideal to merge 2 jars blindly with this plugin, but... after dropping all transitive dependencies from the 2 jars, we found ourselves in a situation where javadoc could not
68+
resolve spring and other libraries and hence failed running. Adding manually additional libraries to the Javadoc plugin could work but is not maintainable.
69+
-->
70+
<version>3.1.0</version>
71+
<executions>
72+
<execution>
73+
<phase>package</phase>
74+
<configuration>
75+
<target>
76+
<zip destfile="target/${project.artifactId}-${version}-javadoc.jar">
77+
<zipgroupfileset dir="../${project.artifactId}-jakarta/target/" includes="*javadoc.jar"/>
78+
<zipgroupfileset dir="../${project.artifactId}-javax/target/" includes="*javadoc.jar"/>
79+
</zip>
80+
</target>
81+
</configuration>
82+
<goals>
83+
<goal>run</goal>
84+
</goals>
85+
</execution>
86+
</executions>
87+
</plugin>
88+
<plugin>
89+
<artifactId>maven-deploy-plugin</artifactId>
90+
<version>3.1.1</version>
91+
<executions>
92+
<!-- the default execution is normally first; but I want to force javadoc first, since it will publish an invalid pom, that will be overwritten -->
93+
<execution>
94+
<id>default-deploy</id>
95+
<phase>none</phase>
96+
<goals>
97+
<goal>deploy</goal>
98+
</goals>
99+
</execution>
100+
<execution>
101+
<id>deploy-javadoc</id>
102+
<phase>deploy</phase>
103+
<goals>
104+
<goal>deploy-file</goal>
105+
</goals>
106+
<configuration>
107+
<file>target/${project.artifactId}-${version}-javadoc.jar</file>
108+
<url>file://${env.REPOSITORY}</url>
109+
<groupId>${groupId}</groupId>
110+
<artifactId>${artifactId}</artifactId>
111+
<version>${version}</version>
112+
<packaging>javadoc</packaging>
113+
</configuration>
114+
</execution>
115+
<execution>
116+
<id>other-default-deploy</id>
117+
<phase>deploy</phase>
118+
<goals>
119+
<goal>deploy</goal>
120+
</goals>
121+
</execution>
122+
</executions>
123+
</plugin>
124+
64125
<plugin>
65126
<groupId>org.apache.maven.plugins</groupId>
66127
<artifactId>maven-shade-plugin</artifactId>

pom.xml

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,32 @@
2727
<artifactId>java-buildpack-client-certificate-mapper-parent</artifactId>
2828
<version>2.0.0-SNAPSHOT</version>
2929
<packaging>pom</packaging>
30+
<name>Cloud Foundry Client Certificate Mapper</name>
31+
<description>Cloud Foundry Client Certificate Mapper</description>
3032

3133
<properties>
3234
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3335
</properties>
3436

37+
<developers>
38+
<developer>
39+
<name>VMware</name>
40+
<email>info@vmware.com</email>
41+
<organization>VMware, Inc.</organization>
42+
<organizationUrl>https://www.cloudfoundry.org</organizationUrl>
43+
</developer>
44+
</developers>
45+
<licenses>
46+
<license>
47+
<name>The Apache License, Version 2.0</name>
48+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
49+
</license>
50+
</licenses>
51+
<url>https://github.com/cloudfoundry/java-buildpack-client-certificate-mapper</url>
52+
<scm>
53+
<url>https://github.com/cloudfoundry/java-buildpack-client-certificate-mapper</url>
54+
</scm>
55+
3556
<modules>
3657
<module>java-buildpack-client-certificate-mapper</module>
3758
<module>java-buildpack-client-certificate-mapper-jakarta</module>
@@ -87,41 +108,30 @@
87108
</configuration>
88109
</plugin>
89110
<plugin>
90-
<groupId>org.jfrog.buildinfo</groupId>
91-
<artifactId>artifactory-maven-plugin</artifactId>
92-
<version>3.6.2</version>
93-
<inherited>false</inherited>
111+
<groupId>org.apache.maven.plugins</groupId>
112+
<artifactId>maven-javadoc-plugin</artifactId>
113+
<version>3.6.3</version>
114+
<configuration>
115+
<links>
116+
<link>https://projectreactor.io/docs/core/release/api/</link>
117+
</links>
118+
<!-- <quiet>true</quiet>-->
119+
<source>8</source>
120+
<additionalOptions>
121+
<additionalOption>-Xdoclint:none</additionalOption>
122+
</additionalOptions>
123+
</configuration>
94124
<executions>
95125
<execution>
96-
<id>build-info</id>
126+
<id>attach-javadocs</id>
97127
<goals>
98-
<goal>publish</goal>
128+
<goal>jar</goal>
99129
</goals>
100-
<configuration>
101-
<publisher>
102-
<contextUrl>https://repo.spring.io</contextUrl>
103-
<username>{{ARTIFACTORY_USERNAME}}</username>
104-
<password>{{ARTIFACTORY_PASSWORD}}</password>
105-
<repoKey>{{ARTIFACTORY_REPO_KEY|"libs-release-local"}}</repoKey>
106-
<snapshotRepoKey>{{ARTIFACTORY_SNAPSHOT_REPO_KEY|"libs-snapshot-local"}}</snapshotRepoKey>
107-
</publisher>
108-
</configuration>
109130
</execution>
110131
</executions>
111132
</plugin>
112133
</plugins>
113134
</pluginManagement>
114135
</build>
115136

116-
<pluginRepositories>
117-
<pluginRepository>
118-
<snapshots>
119-
<enabled>false</enabled>
120-
</snapshots>
121-
<id>central</id>
122-
<name>bintray-plugins</name>
123-
<url>https://jcenter.bintray.com</url>
124-
</pluginRepository>
125-
</pluginRepositories>
126-
127137
</project>

0 commit comments

Comments
 (0)