| 
103 | 103 | 
 
  | 
104 | 104 |         <!-- Plugins not managed by the JBoss parent POM: -->  | 
105 | 105 |         <maven-wrapper-plugin.version>3.3.2</maven-wrapper-plugin.version>  | 
 | 106 | +        <nexus-staging.plugin.version>1.7.0</nexus-staging.plugin.version>  | 
 | 107 | +        <flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>  | 
 | 108 | + | 
 | 109 | +        <!--  | 
 | 110 | +            We don't want to publish or sign any modules by default.  | 
 | 111 | +            Specific modules will override the setting at their own level.  | 
 | 112 | +        -->  | 
 | 113 | +        <deploy.skip>true</deploy.skip>  | 
 | 114 | +        <maven-deploy-plugin.skip>true</maven-deploy-plugin.skip>  | 
 | 115 | + | 
 | 116 | +        <!-- Repository Deployment URLs -->  | 
 | 117 | +        <ossrh.releases.repo.id>ossrh</ossrh.releases.repo.id>  | 
 | 118 | +        <ossrh.releases.repo.name>Sonatype OSSRH Releases</ossrh.releases.repo.name>  | 
 | 119 | +        <ossrh.releases.repo.url>https://oss.sonatype.org/service/local/staging/deploy/maven2</ossrh.releases.repo.url>  | 
 | 120 | +        <ossrh.releases.repo.baseUrl>https://oss.sonatype.org</ossrh.releases.repo.baseUrl>  | 
 | 121 | +        <ossrh.snapshots.repo.id>ossrh</ossrh.snapshots.repo.id>  | 
 | 122 | +        <ossrh.snapshots.repo.name>Sonatype OSSRH Snapshots</ossrh.snapshots.repo.name>  | 
 | 123 | +        <ossrh.snapshots.repo.url>https://oss.sonatype.org/content/repositories/snapshots</ossrh.snapshots.repo.url>  | 
106 | 124 | 
 
  | 
107 | 125 |         <maven.compiler.target>11</maven.compiler.target>  | 
108 | 126 |         <maven.compiler.source>11</maven.compiler.source>  | 
 | 
227 | 245 |          </dependencies>  | 
228 | 246 |     </dependencyManagement>  | 
229 | 247 | 
 
  | 
230 |  | -    <repositories>  | 
 | 248 | +    <distributionManagement>  | 
231 | 249 |         <repository>  | 
232 |  | -            <snapshots>  | 
233 |  | -                <enabled>false</enabled>  | 
234 |  | -            </snapshots>  | 
235 |  | -            <id>ossrh-releases-repository</id>  | 
236 |  | -            <name>Sonatype OSSRH Releases</name>  | 
237 |  | -            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>  | 
 | 250 | +            <id>${ossrh.releases.repo.id}</id>  | 
 | 251 | +            <name>${ossrh.releases.repo.name}</name>  | 
 | 252 | +            <url>${ossrh.releases.repo.url}</url>  | 
238 | 253 |         </repository>  | 
239 |  | -       <repository>  | 
240 |  | -            <snapshots>  | 
241 |  | -                <enabled>true</enabled>  | 
242 |  | -            </snapshots>  | 
243 |  | -            <id>ossrh-snapshots-repository</id>  | 
244 |  | -            <name>Sonatype OSSRH Snapshots</name>  | 
245 |  | -            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>  | 
246 |  | -        </repository>  | 
247 |  | -    </repositories>  | 
248 |  | - | 
249 |  | -    <distributionManagement>  | 
250 |  | -      <repository>  | 
251 |  | -        <id>ossrh-releases-repository</id>  | 
252 |  | -        <name>Sonatype OSSRH Releases</name>  | 
253 |  | -        <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>  | 
254 |  | -      </repository>  | 
255 |  | -      <snapshotRepository>  | 
256 |  | -        <id>ossrh-snapshots-repository</id>  | 
257 |  | -        <name>Sonatype OSSRH Snapshots</name>  | 
258 |  | -        <url>https://oss.sonatype.org/content/repositories/snapshots/</url>  | 
259 |  | -      </snapshotRepository>  | 
 | 254 | +        <snapshotRepository>  | 
 | 255 | +            <id>${ossrh.snapshots.repo.id}</id>  | 
 | 256 | +            <name>${ossrh.snapshots.repo.name}</name>  | 
 | 257 | +            <url>${ossrh.snapshots.repo.url}</url>  | 
 | 258 | +        </snapshotRepository>  | 
260 | 259 |     </distributionManagement>  | 
261 | 260 | 
 
  | 
262 | 261 |     <build>  | 
 | 
271 | 270 |                         <distributionType>bin</distributionType>  | 
272 | 271 |                     </configuration>  | 
273 | 272 |                 </plugin>  | 
 | 273 | +                <!-- Published artifacts have to be signed: -->  | 
 | 274 | +                <plugin>  | 
 | 275 | +                    <groupId>org.apache.maven.plugins</groupId>  | 
 | 276 | +                    <artifactId>maven-gpg-plugin</artifactId>  | 
 | 277 | +                    <executions>  | 
 | 278 | +                        <execution>  | 
 | 279 | +                            <id>sign-artifacts</id>  | 
 | 280 | +                            <phase>verify</phase>  | 
 | 281 | +                            <goals>  | 
 | 282 | +                                <goal>sign</goal>  | 
 | 283 | +                            </goals>  | 
 | 284 | +                            <configuration>  | 
 | 285 | +                                <skip>${deploy.skip}</skip>  | 
 | 286 | +                                <homedir>${env.RELEASE_GPG_HOMEDIR}</homedir>  | 
 | 287 | +                            </configuration>  | 
 | 288 | +                        </execution>  | 
 | 289 | +                    </executions>  | 
 | 290 | +                </plugin>  | 
 | 291 | +                <plugin>  | 
 | 292 | +                    <groupId>org.sonatype.plugins</groupId>  | 
 | 293 | +                    <artifactId>nexus-staging-maven-plugin</artifactId>  | 
 | 294 | +                    <version>${nexus-staging.plugin.version}</version>  | 
 | 295 | +                    <extensions>false</extensions><!-- This is essential: do not put true here -->  | 
 | 296 | +                    <configuration>  | 
 | 297 | +                        <skipNexusStagingDeployMojo>${deploy.skip}</skipNexusStagingDeployMojo>  | 
 | 298 | +                        <serverId>${ossrh.releases.repo.id}</serverId>  | 
 | 299 | +                        <!-- The following, by default, is only used for actual releases, not for snapshot deployments -->  | 
 | 300 | +                        <nexusUrl>${ossrh.releases.repo.baseUrl}</nexusUrl>  | 
 | 301 | +                        <!-- oss.sonatype.org has been very slow when closing repositories lately;  | 
 | 302 | +                             let's raise the timeout until we switch to s01.sonatype.org -->  | 
 | 303 | +                        <stagingProgressTimeoutMinutes>60</stagingProgressTimeoutMinutes>  | 
 | 304 | +                    </configuration>  | 
 | 305 | +                </plugin>  | 
 | 306 | +                <plugin>  | 
 | 307 | +                    <groupId>org.codehaus.mojo</groupId>  | 
 | 308 | +                    <artifactId>flatten-maven-plugin</artifactId>  | 
 | 309 | +                    <version>${flatten-maven-plugin.version}</version>  | 
 | 310 | +                    <configuration>  | 
 | 311 | +                        <outputDirectory>${project.build.directory}</outputDirectory>  | 
 | 312 | +                        <!-- Keep things like url, inceptionYear, authors...  | 
 | 313 | +                             everything that's required by the OSSRH Maven repository -->  | 
 | 314 | +                        <flattenMode>ossrh</flattenMode>  | 
 | 315 | +                        <!-- To make sure that `hibernate-tools-gradle` module that has a pom packaging will also publish the flattened pom -->  | 
 | 316 | +                        <updatePomFile>true</updatePomFile>  | 
 | 317 | +                    </configuration>  | 
 | 318 | +                    <executions>  | 
 | 319 | +                        <execution>  | 
 | 320 | +                            <id>flatten-pom</id>  | 
 | 321 | +                            <phase>process-resources</phase>  | 
 | 322 | +                            <goals>  | 
 | 323 | +                                <goal>flatten</goal>  | 
 | 324 | +                            </goals>  | 
 | 325 | +                        </execution>  | 
 | 326 | +                    </executions>  | 
 | 327 | +                </plugin>  | 
274 | 328 |             </plugins>  | 
275 | 329 |         </pluginManagement>  | 
 | 330 | +        <plugins>  | 
 | 331 | +            <!-- Skip the deploy plugin explicitly: we use nexus-staging-maven-plugin instead -->  | 
 | 332 | +            <plugin>  | 
 | 333 | +                <groupId>org.apache.maven.plugins</groupId>  | 
 | 334 | +                <artifactId>maven-deploy-plugin</artifactId>  | 
 | 335 | +                <configuration>  | 
 | 336 | +                    <skip>${maven-deploy-plugin.skip}</skip>  | 
 | 337 | +                </configuration>  | 
 | 338 | +            </plugin>  | 
 | 339 | +            <!--  | 
 | 340 | +                 Configure the nexus-staging-maven-plugin explicitly (without <extension>true</extension>)  | 
 | 341 | +                 in order to work around a problem in the "reports" module (see that module's POM for more info).  | 
 | 342 | +             -->  | 
 | 343 | +            <plugin>  | 
 | 344 | +                <groupId>org.sonatype.plugins</groupId>  | 
 | 345 | +                <artifactId>nexus-staging-maven-plugin</artifactId>  | 
 | 346 | +                <executions>  | 
 | 347 | +                    <execution>  | 
 | 348 | +                        <id>default-deploy</id>  | 
 | 349 | +                        <phase>deploy</phase>  | 
 | 350 | +                        <goals>  | 
 | 351 | +                            <!--  | 
 | 352 | +                                This will only put artifacts in a staging directory.  | 
 | 353 | +                                See the "reports" module for actual deployment, at the end of the build.  | 
 | 354 | +                             -->  | 
 | 355 | +                            <goal>deploy</goal>  | 
 | 356 | +                        </goals>  | 
 | 357 | +                    </execution>  | 
 | 358 | +                </executions>  | 
 | 359 | +            </plugin>  | 
 | 360 | +            <plugin>  | 
 | 361 | +                <groupId>org.codehaus.mojo</groupId>  | 
 | 362 | +                <artifactId>flatten-maven-plugin</artifactId>  | 
 | 363 | +            </plugin>  | 
 | 364 | +            <plugin>  | 
 | 365 | +                <groupId>org.apache.maven.plugins</groupId>  | 
 | 366 | +                <artifactId>maven-enforcer-plugin</artifactId>  | 
 | 367 | +                <executions>  | 
 | 368 | +                    <execution>  | 
 | 369 | +                        <id>enforce-java-version</id>  | 
 | 370 | +                        <goals>  | 
 | 371 | +                            <goal>enforce</goal>  | 
 | 372 | +                        </goals>  | 
 | 373 | +                        <configuration>  | 
 | 374 | +                            <!--  | 
 | 375 | +                                We want to override the rules for this configuration to remove the bannedRepositories rule from the JBoss parent.  | 
 | 376 | +                            -->  | 
 | 377 | +                            <rules combine.self="override">  | 
 | 378 | +                                <requireJavaVersion>  | 
 | 379 | +                                    <message>To build this project JDK ${jdk.min.version} (or greater) is required. Please install it.</message>  | 
 | 380 | +                                    <version>${jdk.min.version}</version>  | 
 | 381 | +                                </requireJavaVersion>  | 
 | 382 | +                            </rules>  | 
 | 383 | +                        </configuration>  | 
 | 384 | +                    </execution>  | 
 | 385 | +                </executions>  | 
 | 386 | +            </plugin>  | 
 | 387 | +        </plugins>  | 
276 | 388 |     </build>  | 
277 | 389 | 
 
  | 
 | 390 | +    <profiles>  | 
 | 391 | +        <profile>  | 
 | 392 | +            <id>release</id>  | 
 | 393 | +            <activation>  | 
 | 394 | +                <property>  | 
 | 395 | +                    <name>performRelease</name>  | 
 | 396 | +                    <value>true</value>  | 
 | 397 | +                </property>  | 
 | 398 | +            </activation>  | 
 | 399 | +            <build>  | 
 | 400 | +                <plugins>  | 
 | 401 | +                    <plugin>  | 
 | 402 | +                        <groupId>org.apache.maven.plugins</groupId>  | 
 | 403 | +                        <artifactId>maven-gpg-plugin</artifactId>  | 
 | 404 | +                    </plugin>  | 
 | 405 | +                </plugins>  | 
 | 406 | +            </build>  | 
 | 407 | +        </profile>  | 
 | 408 | + | 
 | 409 | +        <!--  | 
 | 410 | +             WARNING: this MUST be the very last profile,  | 
 | 411 | +             so that the "report" module is the very last module,  | 
 | 412 | +             in particular when deploying artifacts to a Nexus repository.  | 
 | 413 | +             See the "build/reports" module POM for more information.  | 
 | 414 | +         -->  | 
 | 415 | +        <profile>  | 
 | 416 | +            <id>build-reports-as-last-module</id>  | 
 | 417 | +            <activation>  | 
 | 418 | +                <property>  | 
 | 419 | +                    <name>!some.property.that.will.never.exist</name>  | 
 | 420 | +                </property>  | 
 | 421 | +            </activation>  | 
 | 422 | +            <modules>  | 
 | 423 | +                <module>reports</module>  | 
 | 424 | +            </modules>  | 
 | 425 | +        </profile>  | 
 | 426 | + | 
 | 427 | +        <!-- DO NOT ADD ANY PROFILE AFTER THIS: see above -->  | 
 | 428 | +    </profiles>  | 
 | 429 | + | 
278 | 430 | </project>  | 
0 commit comments