Skip to content

Backport of HSEARCH-5351 to 5.10 : Switch to JReleaser for nexus publishing #4615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 5.10
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ atlassian-ide-plugin.xml
# Maven wrapper files
.mvn
mvnw*

# Cache folders for formatting plugins:
.cache
3 changes: 3 additions & 0 deletions .release/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# The folder into which we checkout our release scripts into
*
!.gitignore
1 change: 1 addition & 0 deletions backends/jgroups/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

<name>Hibernate Search JGroups Backend</name>
<description>Hibernate Search JGroup based backend</description>
<url>http://search.hibernate.org</url>

<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Hibernate Search, full-text search for your domain model
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.search.backend.jgroups;

/**
* This module provides the Hibernate Search JGroup based backend.
*/
// DO NOT actually remove this one! We need it to let the javadoc plugin to generate the "empty" javadoc jar to comply with the publishign rules.
// (since = "5.10", forRemoval = true)
@Deprecated
public interface HibernateSearchJgroupsExtension {
}
1 change: 1 addition & 0 deletions backends/jms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

<name>Hibernate Search JMS Backend</name>
<description>Hibernate Search JGroup based backend</description>
<url>http://search.hibernate.org</url>

<dependencies>
<dependency>
Expand Down
8 changes: 1 addition & 7 deletions build-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

<name>Hibernate Search Build Configuration</name>
<description>Configuration for the build of Hibernate Search</description>
<url>http://search.hibernate.org</url>

<properties>
<!--
Expand All @@ -34,13 +35,6 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
Expand Down
17 changes: 13 additions & 4 deletions ci/release/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,29 @@ pipeline {

def releaseVersion = Version.parseReleaseVersion(params.RELEASE_VERSION)
def developmentVersion = Version.parseDevelopmentVersion(params.DEVELOPMENT_VERSION)
env.JRELEASER_DRY_RUN = params.RELEASE_DRY_RUN
echo "Performing full release for version ${releaseVersion.toString()}"

withMaven(mavenSettingsConfig: params.RELEASE_DRY_RUN ? null : 'ci-hibernate.deploy.settings.maven',
mavenLocalRepo: env.WORKSPACE_TMP + '/.m2repository') {
configFileProvider([configFile(fileId: 'release.config.ssh', targetLocation: env.HOME + '/.ssh/config'),
configFile(fileId: 'release.config.ssh.knownhosts', targetLocation: env.HOME + '/.ssh/known_hosts')]) {
withCredentials([file(credentialsId: 'release.gpg.private-key', variable: 'RELEASE_GPG_PRIVATE_KEY_PATH'),
string(credentialsId: 'release.gpg.passphrase', variable: 'RELEASE_GPG_PASSPHRASE')]) {
string(credentialsId: 'release.gpg.passphrase', variable: 'JRELEASER_GPG_PASSPHRASE'),
// TODO: HSEARCH-5354
// Once we switch to maven-central publishing (from nexus2) we need to add a new credentials
// to use the following env variable names to set the user/password:
// JRELEASER_MAVENCENTRAL_USERNAME
// JRELEASER_MAVENCENTRAL_TOKEN
usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'JRELEASER_NEXUS2_PASSWORD', usernameVariable: 'JRELEASER_NEXUS2_USERNAME'),
string(credentialsId: 'Hibernate-CI.github.com', variable: 'JRELEASER_GITHUB_TOKEN')]) {
sshagent(['ed25519.Hibernate-CI.github.com', 'hibernate.filemgmt.jboss.org', 'hibernate-ci.frs.sourceforge.net']) {
sh 'cat $HOME/.ssh/config'
sh 'git clone https://github.com/hibernate/hibernate-noorm-release-scripts.git'
env.RELEASE_GPG_HOMEDIR = env.WORKSPACE_TMP + '/.gpg'
dir('.release/scripts') {
sh 'git clone https://github.com/hibernate/hibernate-release-scripts.git .'
}
sh """
bash -xe hibernate-noorm-release-scripts/release.sh ${params.RELEASE_DRY_RUN ? '-d' : ''} \
bash -xe .release/scripts/release.sh -j ${params.RELEASE_DRY_RUN ? '-d' : ''} \
search ${releaseVersion.toString()} ${developmentVersion.toString()}
"""
}
Expand Down
17 changes: 10 additions & 7 deletions ci/snapshot-publish/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,16 @@ pipeline {
stage('Publish') {
steps {
script {
withMaven(mavenSettingsConfig: 'ci-hibernate.deploy.settings.maven',
mavenLocalRepo: env.WORKSPACE_TMP + '/.m2repository') {
sh """mvn \
-Pci-build \
-DskipTests \
clean deploy \
"""
withMaven(mavenSettingsConfig: 'ci-hibernate.deploy.settings.maven', mavenLocalRepo: env.WORKSPACE_TMP + '/.m2repository') {
dir('.release/scripts') {
sh 'git clone https://github.com/hibernate/hibernate-release-scripts.git .'
}
def version = sh(
script: ".release/scripts/determine-current-version.sh search",
returnStdout: true
).trim()
echo "Current version: '${version}'"
sh "bash -xe .release/scripts/snapshot-deploy.sh search ${version}"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

<name>Hibernate Search Distribution</name>
<description>Builds the distribution bundles</description>
<url>http://search.hibernate.org</url>
<packaging>pom</packaging>

<properties>
<!-- Skip artifact deployment -->
<maven.deploy.skip>true</maven.deploy.skip>
<gpg.skip>true</gpg.skip>
</properties>

<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions distribution/src/main/assembly/dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@
<exclude>copyright.txt</exclude>
<exclude>lgpl.txt</exclude>

<!-- only needed for documentation and helper scripts, no need to include them -->
<exclude>hibernate-noorm-release-scripts/**</exclude>
<!-- only needed for documentation and helper scripts, no need to include them -->
<exclude>.release/**</exclude>

<!-- actual files which should be ignored -->
<exclude>.git</exclude>
Expand Down
2 changes: 1 addition & 1 deletion documentation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

<name>Hibernate Search Manual</name>
<description>The Hibernate Search reference manual</description>
<url>http://search.hibernate.org</url>

<properties>
<asciidoctor.base-output-dir>${project.build.directory}/asciidoctor/en-US</asciidoctor.base-output-dir>
Expand All @@ -33,7 +34,6 @@

<!-- Skip artifact deployment -->
<maven.deploy.skip>true</maven.deploy.skip>
<gpg.skip>true</gpg.skip>
<!-- Skip javadoc generation -->
<maven.javadoc.skip>true</maven.javadoc.skip>
</properties>
Expand Down
1 change: 1 addition & 0 deletions elasticsearch-aws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

<name>Hibernate Search Elasticsearch AWS integration</name>
<description>Configurer for the Hibernate Search Elasticsearch backend enabling connection to an AWS-hosted Elasticsearch cluster</description>
<url>http://search.hibernate.org</url>

<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Hibernate Search, full-text search for your domain model
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.search.elasticsearch.aws;

/**
* Hibernate Search Elasticsearch AWS is an extension that is the
* configurer for the Hibernate Search Elasticsearch backend enabling connection to an AWS-hosted Elasticsearch cluster
*/
// DO NOT actually remove this one! We need it to let the javadoc plugin to generate the "empty" javadoc jar to comply with the publishign rules.
// (since = "5.10", forRemoval = true)
@Deprecated
public interface HibernateSearchElasticsearchAwsExtension {
}
1 change: 1 addition & 0 deletions elasticsearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

<name>Hibernate Search Elasticsearch</name>
<description>Hibernate Search backend which has indexing operations forwarded to Elasticsearch</description>
<url>http://search.hibernate.org</url>

<dependencies>
<dependency>
Expand Down
1 change: 1 addition & 0 deletions engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

<name>Hibernate Search Engine</name>
<description>Core of the Object/Lucene mapper, query engine and index management</description>
<url>http://search.hibernate.org</url>

<dependencies>
<dependency>
Expand Down
10 changes: 2 additions & 8 deletions infinispan/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
</parent>

<artifactId>hibernate-search-infinispan</artifactId>
<packaging>pom</packaging>

<name>Hibernate Search Infinispan Directory Provider</name>
<description>Hibernate Search Infinispan Directory Provider</description>
<url>http://search.hibernate.org</url>

<distributionManagement>
<relocation>
Expand All @@ -34,14 +36,6 @@
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<!-- We need an empty JAR, otherwise the build will fail -->
<skipIfEmpty>false</skipIfEmpty>
</configuration>
</plugin>
</plugins>
</build>
</project>
7 changes: 0 additions & 7 deletions integrationtest/elasticsearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,6 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
Expand Down
7 changes: 0 additions & 7 deletions integrationtest/jdk9-modules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,6 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down
7 changes: 0 additions & 7 deletions integrationtest/jms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,6 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
Expand Down
7 changes: 0 additions & 7 deletions integrationtest/jsr352/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,6 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
Expand Down
7 changes: 0 additions & 7 deletions integrationtest/narayana/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,6 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
Expand Down
7 changes: 0 additions & 7 deletions integrationtest/osgi/karaf-features/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,6 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down
7 changes: 0 additions & 7 deletions integrationtest/osgi/karaf-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,6 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down
7 changes: 0 additions & 7 deletions integrationtest/performance/engine-elasticsearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,6 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
Expand Down
7 changes: 0 additions & 7 deletions integrationtest/performance/engine-lucene/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,6 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
Expand Down
7 changes: 0 additions & 7 deletions integrationtest/performance/orm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,6 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
Expand Down
7 changes: 0 additions & 7 deletions integrationtest/performance/sandbox/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,6 @@
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
Expand Down
Loading