HHH-12172 - Move to BinTray for publishing artifacts
This commit is contained in:
parent
9e20eece55
commit
7d3158625e
|
@ -23,6 +23,7 @@ buildscript {
|
|||
classpath 'org.hibernate.build.gradle:gradle-xjc-plugin:1.0.2.Final'
|
||||
classpath 'com.github.lburgazzoli:lb-karaf-features-gen:1.0.0-SNAPSHOT'
|
||||
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.2'
|
||||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
*/
|
||||
|
||||
apply from: rootProject.file( 'gradle/java-module.gradle' )
|
||||
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'maven-publish-auth'
|
||||
|
||||
apply from: rootProject.file( 'gradle/publishing-pom.gradle' )
|
||||
apply from: rootProject.file( 'gradle/publishing-repos.gradle' )
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
* 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
|
||||
*/
|
||||
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
afterEvaluate {
|
||||
|
||||
// delay pom customization until project evaluation is complete
|
||||
|
|
|
@ -5,21 +5,61 @@
|
|||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
|
||||
project.afterEvaluate {
|
||||
apply from: rootProject.file( 'gradle/base-information.gradle' )
|
||||
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
if ( project.isSnapshot ) {
|
||||
// For SNAPSHOT builds all we need to define is to add the JBoss SNAPSHOT server as
|
||||
// a publishing repository - NOTE that the plugin applies security over the
|
||||
// JBoss SNAPSHOT repo via a local user's Maven `settings.xml`
|
||||
|
||||
apply plugin: 'maven-publish-auth'
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
if ( project.isSnapshot ) {
|
||||
maven {
|
||||
name 'jboss-snapshots-repository'
|
||||
url 'https://repository.jboss.org/nexus/content/repositories/snapshots'
|
||||
}
|
||||
}
|
||||
else {
|
||||
maven {
|
||||
name 'jboss-releases-repository'
|
||||
url 'https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/'
|
||||
}
|
||||
maven {
|
||||
name 'jboss-snapshots-repository'
|
||||
url 'https://repository.jboss.org/nexus/content/repositories/snapshots'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// otherwise, set up the bintray plugin for publishing the release artifacts to Bintray
|
||||
|
||||
apply plugin: 'com.jfrog.bintray'
|
||||
|
||||
ext {
|
||||
bintrayUser = project.property( 'PERSONAL_BINTRAY_USER' )
|
||||
bintrayKey = project.property( 'PERSONAL_BINTRAY_API_KEY' )
|
||||
}
|
||||
|
||||
bintray {
|
||||
user = project.bintrayUser
|
||||
key = project.bintrayKey
|
||||
|
||||
repo = 'artifacts'
|
||||
|
||||
pkg {
|
||||
userOrg = 'hibernate'
|
||||
name = 'hibernate-orm'
|
||||
|
||||
version {
|
||||
name = project.version
|
||||
released = new Date()
|
||||
vcsTag = project.version
|
||||
gpg {
|
||||
sign = true
|
||||
}
|
||||
attributes = [
|
||||
'jpa': '2.2',
|
||||
'family': project.hibernateMajorMinorVersion
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
publish = false
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue