|
46 | 46 |
|
47 | 47 | <!-- Plugins not managed by the JBoss parent POM: --> |
48 | 48 | <maven-wrapper-plugin.version>3.3.2</maven-wrapper-plugin.version> |
49 | | - <nexus-staging.plugin.version>1.7.0</nexus-staging.plugin.version> |
50 | 49 | <flatten-maven-plugin.version>1.7.0</flatten-maven-plugin.version> |
51 | 50 |
|
52 | 51 | <!-- |
53 | 52 | We don't want to publish or sign any modules by default. |
54 | 53 | Specific modules will override the setting at their own level. |
55 | 54 | --> |
56 | 55 | <deploy.skip>true</deploy.skip> |
57 | | - <maven-deploy-plugin.skip>true</maven-deploy-plugin.skip> |
58 | 56 |
|
59 | 57 | <!-- Repository Deployment URLs --> |
60 | | - <ossrh.releases.repo.id>ossrh</ossrh.releases.repo.id> |
61 | | - <ossrh.releases.repo.name>Sonatype OSSRH Releases</ossrh.releases.repo.name> |
62 | | - <ossrh.releases.repo.url>https://oss.sonatype.org/service/local/staging/deploy/maven2</ossrh.releases.repo.url> |
63 | | - <ossrh.releases.repo.baseUrl>https://oss.sonatype.org</ossrh.releases.repo.baseUrl> |
| 58 | + |
| 59 | + <!-- We always publish to a local directory, JReleaser is supposed to take care of publishing to Nexus: --> |
| 60 | + <local.staging.releases.repo.id>staging-deploy</local.staging.releases.repo.id> |
| 61 | + <local.staging.releases.repo.name>Local Staging Directory Releases Repository</local.staging.releases.repo.name> |
| 62 | + <local.staging.releases.repo.url>file:${maven.multiModuleProjectDirectory}/target/staging-deploy/maven</local.staging.releases.repo.url> |
64 | 63 | <ossrh.snapshots.repo.id>ossrh</ossrh.snapshots.repo.id> |
65 | 64 | <ossrh.snapshots.repo.name>Sonatype OSSRH Snapshots</ossrh.snapshots.repo.name> |
66 | 65 | <ossrh.snapshots.repo.url>https://oss.sonatype.org/content/repositories/snapshots</ossrh.snapshots.repo.url> |
|
175 | 174 | </dependencyManagement> |
176 | 175 |
|
177 | 176 | <distributionManagement> |
178 | | - <repository> |
179 | | - <id>${ossrh.releases.repo.id}</id> |
180 | | - <name>${ossrh.releases.repo.name}</name> |
181 | | - <url>${ossrh.releases.repo.url}</url> |
182 | | - </repository> |
183 | | - <snapshotRepository> |
184 | | - <id>${ossrh.snapshots.repo.id}</id> |
185 | | - <name>${ossrh.snapshots.repo.name}</name> |
186 | | - <url>${ossrh.snapshots.repo.url}</url> |
187 | | - </snapshotRepository> |
| 177 | + <repository> |
| 178 | + <id>${local.staging.releases.repo.id}</id> |
| 179 | + <name>${local.staging.releases.repo.name}</name> |
| 180 | + <url>${local.staging.releases.repo.url}</url> |
| 181 | + </repository> |
| 182 | + <snapshotRepository> |
| 183 | + <id>${ossrh.snapshots.repo.id}</id> |
| 184 | + <name>${ossrh.snapshots.repo.name}</name> |
| 185 | + <url>${ossrh.snapshots.repo.url}</url> |
| 186 | + </snapshotRepository> |
188 | 187 | </distributionManagement> |
189 | 188 |
|
190 | 189 | <build> |
|
199 | 198 | <distributionType>bin</distributionType> |
200 | 199 | </configuration> |
201 | 200 | </plugin> |
202 | | - <!-- Published artifacts have to be signed: --> |
203 | | - <plugin> |
204 | | - <groupId>org.apache.maven.plugins</groupId> |
205 | | - <artifactId>maven-gpg-plugin</artifactId> |
206 | | - <executions> |
207 | | - <execution> |
208 | | - <id>sign-artifacts</id> |
209 | | - <phase>verify</phase> |
210 | | - <goals> |
211 | | - <goal>sign</goal> |
212 | | - </goals> |
213 | | - <configuration> |
214 | | - <skip>${deploy.skip}</skip> |
215 | | - <homedir>${env.RELEASE_GPG_HOMEDIR}</homedir> |
216 | | - </configuration> |
217 | | - </execution> |
218 | | - </executions> |
219 | | - </plugin> |
220 | | - <plugin> |
221 | | - <groupId>org.sonatype.plugins</groupId> |
222 | | - <artifactId>nexus-staging-maven-plugin</artifactId> |
223 | | - <version>${nexus-staging.plugin.version}</version> |
224 | | - <extensions>false</extensions><!-- This is essential: do not put true here --> |
225 | | - <configuration> |
226 | | - <skipNexusStagingDeployMojo>${deploy.skip}</skipNexusStagingDeployMojo> |
227 | | - <serverId>${ossrh.releases.repo.id}</serverId> |
228 | | - <!-- The following, by default, is only used for actual releases, not for snapshot deployments --> |
229 | | - <nexusUrl>${ossrh.releases.repo.baseUrl}</nexusUrl> |
230 | | - <!-- oss.sonatype.org has been very slow when closing repositories lately; |
231 | | - let's raise the timeout until we switch to s01.sonatype.org --> |
232 | | - <stagingProgressTimeoutMinutes>60</stagingProgressTimeoutMinutes> |
233 | | - </configuration> |
234 | | - </plugin> |
235 | 201 | <plugin> |
236 | 202 | <groupId>org.codehaus.mojo</groupId> |
237 | 203 | <artifactId>flatten-maven-plugin</artifactId> |
|
262 | 228 | <groupId>org.apache.maven.plugins</groupId> |
263 | 229 | <artifactId>maven-deploy-plugin</artifactId> |
264 | 230 | <configuration> |
265 | | - <skip>${maven-deploy-plugin.skip}</skip> |
| 231 | + <skip>${deploy.skip}</skip> |
266 | 232 | </configuration> |
267 | 233 | </plugin> |
268 | | - <!-- |
269 | | - Configure the nexus-staging-maven-plugin explicitly (without <extension>true</extension>) |
270 | | - in order to work around a problem in the "reports" module (see that module's POM for more info). |
271 | | - --> |
272 | | - <plugin> |
273 | | - <groupId>org.sonatype.plugins</groupId> |
274 | | - <artifactId>nexus-staging-maven-plugin</artifactId> |
275 | | - <executions> |
276 | | - <execution> |
277 | | - <id>default-deploy</id> |
278 | | - <phase>deploy</phase> |
279 | | - <goals> |
280 | | - <!-- |
281 | | - This will only put artifacts in a staging directory. |
282 | | - See the "reports" module for actual deployment, at the end of the build. |
283 | | - --> |
284 | | - <goal>deploy</goal> |
285 | | - </goals> |
286 | | - </execution> |
287 | | - </executions> |
288 | | - </plugin> |
289 | 234 | <plugin> |
290 | 235 | <groupId>org.codehaus.mojo</groupId> |
291 | 236 | <artifactId>flatten-maven-plugin</artifactId> |
|
316 | 261 | </plugins> |
317 | 262 | </build> |
318 | 263 |
|
319 | | - <profiles> |
320 | | - <profile> |
321 | | - <id>release</id> |
322 | | - <activation> |
323 | | - <property> |
324 | | - <name>performRelease</name> |
325 | | - <value>true</value> |
326 | | - </property> |
327 | | - </activation> |
328 | | - <build> |
329 | | - <plugins> |
330 | | - <plugin> |
331 | | - <groupId>org.apache.maven.plugins</groupId> |
332 | | - <artifactId>maven-gpg-plugin</artifactId> |
333 | | - </plugin> |
334 | | - </plugins> |
335 | | - </build> |
336 | | - </profile> |
337 | | - |
338 | | - <!-- |
339 | | - WARNING: this MUST be the very last profile, |
340 | | - so that the "report" module is the very last module, |
341 | | - in particular when deploying artifacts to a Nexus repository. |
342 | | - See the "build/reports" module POM for more information. |
343 | | - --> |
344 | | - <profile> |
345 | | - <id>build-reports-as-last-module</id> |
346 | | - <activation> |
347 | | - <property> |
348 | | - <name>!some.property.that.will.never.exist</name> |
349 | | - </property> |
350 | | - </activation> |
351 | | - <modules> |
352 | | - <module>reports</module> |
353 | | - </modules> |
354 | | - </profile> |
355 | | - |
356 | | - <!-- DO NOT ADD ANY PROFILE AFTER THIS: see above --> |
357 | | - </profiles> |
358 | | - |
359 | 264 | </project> |
0 commit comments