HHH-8220 - pom dependencies scope changed from compile to runtime
This commit is contained in:
parent
1df4b2ea3c
commit
40373412e0
75
build.gradle
75
build.gradle
|
@ -406,39 +406,50 @@ subprojects { subProject ->
|
||||||
}
|
}
|
||||||
|
|
||||||
pom.withXml {
|
pom.withXml {
|
||||||
def root = asNode();
|
// sadly for some reason it is not working within the closure above to define the descritpion...
|
||||||
root.appendNode( 'name', subProject.pomName() )
|
asNode().appendNode( 'description', subProject.pomDescription() )
|
||||||
root.appendNode( 'description', subProject.pomDescription() )
|
|
||||||
root.appendNode( 'url', 'http://hibernate.org' )
|
|
||||||
def org = root.appendNode( 'organization' )
|
|
||||||
org.appendNode( 'name', 'Hibernate.org' )
|
|
||||||
org.appendNode( 'url', 'http://hibernate.org' )
|
|
||||||
def jira = root.appendNode( 'issueManagement' )
|
|
||||||
jira.appendNode( 'system', 'jira' )
|
|
||||||
jira.appendNode( 'url', 'https://hibernate.atlassian.net/browse/HHH' )
|
|
||||||
def scm = root.appendNode( 'scm' )
|
|
||||||
scm.appendNode( 'url', 'http://github.com/hibernate/hibernate-orm' )
|
|
||||||
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' );
|
|
||||||
license.appendNode( 'name', 'GNU Lesser General Public License' )
|
|
||||||
license.appendNode( 'url', 'http://www.gnu.org/licenses/lgpl-2.1.html' )
|
|
||||||
license.appendNode( 'comments', 'See discussion at http://hibernate.org/license for more details.' )
|
|
||||||
license.appendNode( 'distribution', 'repo' )
|
|
||||||
def dev = root.appendNode( 'developers' ).appendNode( 'developer' );
|
|
||||||
dev.appendNode( 'id', 'hibernate-team' )
|
|
||||||
dev.appendNode( 'name', 'The Hibernate Development Team' )
|
|
||||||
dev.appendNode( 'organization', 'Hibernate.org' )
|
|
||||||
dev.appendNode( 'organizationUrl', 'http://hibernate.org' )
|
|
||||||
|
|
||||||
final String runtimeScope = '<scope>runtime</scope>';
|
// append additional metadata
|
||||||
final int replacementLength = runtimeScope.length();
|
asNode().children().last() + {
|
||||||
final String compileScope = '<scope>compile</scope>';
|
name subProject.pomName()
|
||||||
final StringBuilder stringBuilder = asString();
|
// ugh, see above
|
||||||
int index = stringBuilder.indexOf( runtimeScope );
|
// description subProject.pomDescription()
|
||||||
while ( index > -1 ) {
|
url 'http://hibernate.org'
|
||||||
stringBuilder.replace( index, index+replacementLength, compileScope );
|
organization {
|
||||||
index = stringBuilder.indexOf( runtimeScope );
|
name 'Hibernate.org'
|
||||||
|
url 'http://hibernate.org'
|
||||||
|
}
|
||||||
|
issueManagement {
|
||||||
|
system 'jira'
|
||||||
|
url 'https://hibernate.atlassian.net/browse/HHH'
|
||||||
|
}
|
||||||
|
scm {
|
||||||
|
url 'http://github.com/hibernate/hibernate-orm'
|
||||||
|
connection 'scm:git:http://github.com/hibernate/hibernate-orm.git'
|
||||||
|
developerConnection 'scm:git:git@github.com:hibernate/hibernate-orm.git'
|
||||||
|
}
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name 'GNU Lesser General Public License'
|
||||||
|
url 'http://www.gnu.org/licenses/lgpl-2.1.html'
|
||||||
|
comments 'See discussion at http://hibernate.org/license for more details.'
|
||||||
|
distribution 'repo'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id 'hibernate-team'
|
||||||
|
name 'The Hibernate Development Team'
|
||||||
|
organization 'Hibernate.org'
|
||||||
|
organizationUrl 'http://hibernate.org'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TEMPORARY : currently Gradle Publishing feature is exporting dependencies as 'runtime' scope,
|
||||||
|
// rather than 'compile'; fix that.
|
||||||
|
asNode().dependencies[0].dependency.each {
|
||||||
|
it.scope[0].value = 'compile'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue