HHH-8146 - Update to use maven-publishing plugin
This commit is contained in:
parent
079fd4ac01
commit
8eeef7af3b
119
build.gradle
119
build.gradle
|
@ -21,7 +21,7 @@ buildscript {
|
||||||
mavenRepo name: "jboss-snapshots", url: "http://snapshots.jboss.org/maven2/"
|
mavenRepo name: "jboss-snapshots", url: "http://snapshots.jboss.org/maven2/"
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'org.hibernate.build.gradle:gradle-upload-auth-plugin:1.1.1'
|
classpath 'org.hibernate.build.gradle:gradle-maven-publish-auth:2.0.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,6 +55,14 @@ idea {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Used in POM customization. Each sub-project overrides ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
def pomName() {
|
||||||
|
return "A Hibernate O/RM module"
|
||||||
|
}
|
||||||
|
def pomDescription() {
|
||||||
|
return "A module of the Hibernate O/RM project"
|
||||||
|
}
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
subprojects { subProject ->
|
subprojects { subProject ->
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
|
@ -69,8 +77,8 @@ subprojects { subProject ->
|
||||||
buildDir = "target"
|
buildDir = "target"
|
||||||
if ( ! subProject.name.startsWith( 'release' ) && ! subProject.name.startsWith( 'documentation' ) ) {
|
if ( ! subProject.name.startsWith( 'release' ) && ! subProject.name.startsWith( 'documentation' ) ) {
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'maven' // for install task as well as deploy dependencies
|
apply plugin: 'maven-publish'
|
||||||
apply plugin: 'uploadAuth'
|
apply plugin: 'maven-publish-auth'
|
||||||
apply plugin: 'osgi'
|
apply plugin: 'osgi'
|
||||||
|
|
||||||
apply from: "../utilities.gradle"
|
apply from: "../utilities.gradle"
|
||||||
|
@ -91,16 +99,12 @@ subprojects { subProject ->
|
||||||
hibernateJpaModelGenTool {
|
hibernateJpaModelGenTool {
|
||||||
description = "Dependencies for running the Hibernate JPA Metamodel Generator AnnotationProcessor tool"
|
description = "Dependencies for running the Hibernate JPA Metamodel Generator AnnotationProcessor tool"
|
||||||
}
|
}
|
||||||
deployerJars {
|
|
||||||
description = 'Jars needed for doing deployment to JBoss Nexus repo'
|
|
||||||
}
|
|
||||||
jaxb {
|
jaxb {
|
||||||
description = 'Dependencies for running ant xjc (jaxb class generation)'
|
description = 'Dependencies for running ant xjc (jaxb class generation)'
|
||||||
}
|
}
|
||||||
configurations {
|
configurations {
|
||||||
all*.exclude group: 'xml-apis', module: 'xml-apis'
|
all*.exclude group: 'xml-apis', module: 'xml-apis'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// appropriately inject the common dependencies into each sub-project
|
// appropriately inject the common dependencies into each sub-project
|
||||||
|
@ -129,8 +133,6 @@ subprojects { subProject ->
|
||||||
}
|
}
|
||||||
jaxb( libraries.jaxb2_basics )
|
jaxb( libraries.jaxb2_basics )
|
||||||
jaxb( libraries.jaxb2_ant )
|
jaxb( libraries.jaxb2_ant )
|
||||||
|
|
||||||
deployerJars "org.apache.maven.wagon:wagon-http:1.0"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// mac-specific stuff ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// mac-specific stuff ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -146,7 +148,7 @@ subprojects { subProject ->
|
||||||
sourceCompatibility = rootProject.javaLanguageLevel
|
sourceCompatibility = rootProject.javaLanguageLevel
|
||||||
|
|
||||||
task compile
|
task compile
|
||||||
compile.dependsOn compileJava, compileTestJava
|
compile.dependsOn compileJava, processResources, compileTestJava, processTestResources
|
||||||
|
|
||||||
sourceSets.main {
|
sourceSets.main {
|
||||||
compileClasspath += configurations.provided
|
compileClasspath += configurations.provided
|
||||||
|
@ -273,9 +275,6 @@ subprojects { subProject ->
|
||||||
}
|
}
|
||||||
} )
|
} )
|
||||||
|
|
||||||
assemble.doLast( { install } )
|
|
||||||
uploadArchives.dependsOn install
|
|
||||||
|
|
||||||
idea {
|
idea {
|
||||||
module {
|
module {
|
||||||
iml {
|
iml {
|
||||||
|
@ -343,55 +342,59 @@ subprojects { subProject ->
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
// elements used to customize the generated POM used during upload
|
publishing {
|
||||||
def pomConfig = {
|
publications {
|
||||||
name 'A Hibernate O/RM Module'
|
mavenJava(MavenPublication) {
|
||||||
description 'A module of the Hibernate O/RM project'
|
from components.java
|
||||||
url 'http://hibernate.org'
|
|
||||||
organization {
|
artifact sourcesJar {
|
||||||
name 'Hibernate.org'
|
classifier "sources"
|
||||||
url 'http://hibernate.org'
|
|
||||||
}
|
}
|
||||||
issueManagement {
|
|
||||||
system 'jira'
|
pom.withXml {
|
||||||
url 'http://opensource.atlassian.com/projects/hibernate/browse/HHH'
|
def root = asNode();
|
||||||
}
|
root.appendNode( 'name', subProject.pomName() )
|
||||||
scm {
|
root.appendNode( 'description', subProject.pomDescription() )
|
||||||
url "http://github.com/hibernate/hibernate-core"
|
root.appendNode( 'url', 'http://hibernate.org' )
|
||||||
connection "scm:git:http://github.com/hibernate/hibernate-core.git"
|
def org = root.appendNode( 'organization' )
|
||||||
developerConnection "scm:git:git@github.com:hibernate/hibernate-core.git"
|
org.appendNode( 'name', 'Hibernate.org' )
|
||||||
}
|
org.appendNode( 'url', 'http://hibernate.org' )
|
||||||
licenses {
|
def jira = root.appendNode( 'issueManagement' )
|
||||||
license {
|
jira.appendNode( 'system', 'jira' )
|
||||||
name 'GNU Lesser General Public License'
|
jira.appendNode( 'url', 'https://hibernate.atlassian.net/browse/HHH' )
|
||||||
url 'http://www.gnu.org/licenses/lgpl-2.1.html'
|
def scm = root.appendNode( 'scm' )
|
||||||
comments 'See discussion at http://hibernate.org/license for more details.'
|
scm.appendNode( 'url', 'http://github.com/hibernate/hibernate-orm' )
|
||||||
distribution 'repo'
|
scm.appendNode( 'connection', 'scm:git:http://github.com/hibernate/hibernate-orm.git' )
|
||||||
}
|
scm.appendNode( 'developerConnection', 'scm:git:git@github.com:hibernate/hibernate-orm.git' )
|
||||||
}
|
def license = root.appendNode( 'licenses' ).appendNode( 'license' );
|
||||||
developers {
|
license.appendNode( 'name', 'GNU Lesser General Public License' )
|
||||||
developer {
|
license.appendNode( 'url', 'http://www.gnu.org/licenses/lgpl-2.1.html' )
|
||||||
id 'hibernate-team'
|
license.appendNode( 'comments', 'See discussion at http://hibernate.org/license for more details.' )
|
||||||
name 'The Hibernate Development Team'
|
license.appendNode( 'distribution', 'repo' )
|
||||||
organization 'Hibernate.org'
|
def dev = root.appendNode( 'developers' ).appendNode( 'developer' );
|
||||||
organizationUrl 'http://hibernate.org'
|
dev.appendNode( 'id', 'hibernate-team' )
|
||||||
|
dev.appendNode( 'name', 'The Hibernate Development Team' )
|
||||||
|
dev.appendNode( 'organization', 'Hibernate.org' )
|
||||||
|
dev.appendNode( 'organizationUrl', 'http://hibernate.org' )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
subProject.ext.basePomConfig = pomConfig
|
repositories {
|
||||||
|
maven {
|
||||||
configure(install.repositories.mavenInstaller) {
|
if ( subProject.version.endsWith( 'SNAPSHOT' ) ) {
|
||||||
pom.project pomConfig
|
name 'jboss-snapshots-repository'
|
||||||
|
url 'https://repository.jboss.org/nexus/content/repositories/snapshots'
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
name 'jboss-releases-repository'
|
||||||
|
url 'https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uploadArchives {
|
generatePomFileForMavenJavaPublication {
|
||||||
repositories.mavenDeployer {
|
destination = file("$buildDir/generated-pom.xml")
|
||||||
name = 'jbossDeployer'
|
|
||||||
configuration = configurations.deployerJars
|
|
||||||
pom.project pomConfig
|
|
||||||
repository(id: "jboss-releases-repository", url: "https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/")
|
|
||||||
snapshotRepository(id: "jboss-snapshots-repository", url: "https://repository.jboss.org/nexus/content/repositories/snapshots")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -399,12 +402,6 @@ subprojects { subProject ->
|
||||||
from sourceSets.main.allSource
|
from sourceSets.main.allSource
|
||||||
classifier = 'sources'
|
classifier = 'sources'
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
|
||||||
archives sourcesJar
|
|
||||||
}
|
|
||||||
|
|
||||||
uploadArchives.dependsOn sourcesJar
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,14 @@ dependencies {
|
||||||
testCompile project( ':hibernate-testing' )
|
testCompile project( ':hibernate-testing' )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def pomName() {
|
||||||
|
return 'Hibernate/c3p0 Integration'
|
||||||
|
}
|
||||||
|
|
||||||
|
def pomDescription() {
|
||||||
|
return 'Integration for c3p0 Connection pooling into Hibernate O/RM'
|
||||||
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
instruction 'Bundle-Description', 'Hibernate ORM C3P0'
|
instruction 'Bundle-Description', 'Hibernate ORM C3P0'
|
||||||
|
|
|
@ -33,6 +33,14 @@ dependencies {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def pomName() {
|
||||||
|
return 'Core Hibernate O/RM functionality'
|
||||||
|
}
|
||||||
|
|
||||||
|
def pomDescription() {
|
||||||
|
return 'The core O/RM functionality as provided by Hibernate'
|
||||||
|
}
|
||||||
|
|
||||||
manifest.mainAttributes(
|
manifest.mainAttributes(
|
||||||
'Main-Class': 'org.hibernate.Version'
|
'Main-Class': 'org.hibernate.Version'
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,6 +5,14 @@ dependencies {
|
||||||
testCompile project( ':hibernate-testing' )
|
testCompile project( ':hibernate-testing' )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def pomName() {
|
||||||
|
return 'Hibernate/Ehcache Integration'
|
||||||
|
}
|
||||||
|
|
||||||
|
def pomDescription() {
|
||||||
|
return 'Integration for Ehcache into Hibernate as a second-level caching service'
|
||||||
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
instruction 'Bundle-Description', 'Hibernate ORM EHCache'
|
instruction 'Bundle-Description', 'Hibernate ORM EHCache'
|
||||||
|
|
|
@ -24,6 +24,14 @@ dependencies {
|
||||||
// testRuntime( "org.glassfish.web:el-impl:2.1.2-b04" )
|
// testRuntime( "org.glassfish.web:el-impl:2.1.2-b04" )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def pomName() {
|
||||||
|
return 'Hibernate JPA Support'
|
||||||
|
}
|
||||||
|
|
||||||
|
def pomDescription() {
|
||||||
|
return 'Hibernate O/RM implementation of the JPA specification'
|
||||||
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
instruction 'Bundle-Description', 'Hibernate ORM JPA Entity Manager'
|
instruction 'Bundle-Description', 'Hibernate ORM JPA Entity Manager'
|
||||||
|
|
|
@ -10,6 +10,14 @@ dependencies {
|
||||||
testRuntime( libraries.javassist )
|
testRuntime( libraries.javassist )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def pomName() {
|
||||||
|
return 'Entity versioning support'
|
||||||
|
}
|
||||||
|
|
||||||
|
def pomDescription() {
|
||||||
|
return 'Entity versioning support'
|
||||||
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
ext.generatedJpaMetamodelSrcDir = file( "${buildDir}/generated-src/jpamodelgen/${name}" )
|
ext.generatedJpaMetamodelSrcDir = file( "${buildDir}/generated-src/jpamodelgen/${name}" )
|
||||||
|
|
|
@ -16,6 +16,14 @@ dependencies {
|
||||||
testCompile ('mysql:mysql-connector-java:5.1.17')
|
testCompile ('mysql:mysql-connector-java:5.1.17')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def pomName() {
|
||||||
|
return 'Hibernate/Infinispan Integration'
|
||||||
|
}
|
||||||
|
|
||||||
|
def pomDescription() {
|
||||||
|
return 'Integration for Infinispan into Hibernate as a second-level caching service'
|
||||||
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
systemProperties['java.net.preferIPv4Stack'] = true
|
systemProperties['java.net.preferIPv4Stack'] = true
|
||||||
systemProperties['jgroups.ping.timeout'] = 500
|
systemProperties['jgroups.ping.timeout'] = 500
|
||||||
|
|
|
@ -4,6 +4,14 @@ dependencies {
|
||||||
compile( "org.osgi:org.osgi.core:4.3.0" )
|
compile( "org.osgi:org.osgi.core:4.3.0" )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def pomName() {
|
||||||
|
return 'Hibernate OSGi Support'
|
||||||
|
}
|
||||||
|
|
||||||
|
def pomDescription() {
|
||||||
|
return 'Support for running Hibernate O/RM in OSGi environments'
|
||||||
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
instruction 'Bundle-Activator', 'org.hibernate.osgi.HibernateBundleActivator'
|
instruction 'Bundle-Activator', 'org.hibernate.osgi.HibernateBundleActivator'
|
||||||
|
|
|
@ -4,6 +4,14 @@ dependencies {
|
||||||
testCompile project( ':hibernate-testing' )
|
testCompile project( ':hibernate-testing' )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def pomName() {
|
||||||
|
return 'Hibernate/Proxool Integration'
|
||||||
|
}
|
||||||
|
|
||||||
|
def pomDescription() {
|
||||||
|
return 'Integration for Proxool Connection pooling into Hibernate O/RM'
|
||||||
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
instruction 'Bundle-Description', 'Hibernate ORM Proxool'
|
instruction 'Bundle-Description', 'Hibernate ORM Proxool'
|
||||||
|
|
Loading…
Reference in New Issue