@@ -65,12 +65,19 @@ sonatypeUsername=$usernameOfToken
6565sonatypePassword=$passwordOfToken
6666```
6767
68- ## Upload, test , publish a release
68+ ## Test, upload , publish a release
6969
70- There are no more "Release candidates" as such, but the uploaded, validated
71- [ deployment bundle can be
72- tested] ( https://central.sonatype.org/publish/publish-portal-api/#manually-testing-a-deployment-bundle ) .
73- I.e. you first upload a release and before publishing it you test it.
70+ ### Test
71+
72+ In metafacture-core:
73+
74+ 1 . Change to intended current master or specific commit
75+ 2 . Build locally ` ./gradlew publishToMavenLocal `
76+
77+ In your project:
78+
79+ 3 . set your project dependency to ` master-SNAPSHOT `
80+ 4 . Run your tests of your project
7481
7582### Upload
7683
@@ -92,60 +99,6 @@ a) It's going from your local Git repository to central.sonatype.com to Maven Ce
9299 ```
93100 ./gradlew publishToSonatype -PpublishVersion=A.B.C closeSonatypeStagingRepository
94101 ```
95- ### Test
96-
97- _As a fallback and for build systems where the below does not work:
98- git checkout the release tag resp. the branch, build locally and consume locally. You don't need
99- to have a login then, no special configs etc._
100-
101- If you decide to test what is actually in the pipeline you need some
102- prerequisites;
103- You need to have a login at central.sonatype.com and be added as a
104- maintainer of the namespace `org.metafacture`.
105- Follow the section "Authorize at central sonatype" to be able to test the
106- deployment bundle.
107-
108- You have to add this into you `~/.m2/settings.xml`:
109- ```
110- <servers >
111- <server>
112- <id>central.manual.testing</id>
113- <configuration>
114- <httpHeaders>
115- <property>
116- <name>Authorization</name>
117- <value>Bearer $basencodedUsernameAndPassword</value>
118- </property>
119- </httpHeaders>
120- </configuration>
121- </server>
122- </servers >
123-
124- <profiles >
125- <profile>
126- <id>central.manual.testing</id>
127- <repositories>
128- <repository>
129- <id>central.manual.testing</id>
130- <name>Central Testing repository</name>
131- <url>https://central.sonatype.com/api/v1/publisher/deployments/download</url>
132- </repository>
133- </repositories>
134- </profile>
135- </profiles >
136- ```
137- where `basencodedUsernameAndPassword` is created like this:
138- ```
139- printf "$usernameToken:$passwordToken" | base64
140- ```
141- (note the semicolon `:`).
142-
143- If you have a maven project you can now update the dependencies in the
144- `pom.xml` and download the like:
145-
146- ```
147- mvn -debug -Pcentral.manual.testing install
148- ```
149102
150103### Publish
151104
0 commit comments