[eclipse/xtext#1547] use maven-publish instead of maven plugin

Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
This commit is contained in:
Christian Dietrich 2019-09-06 11:25:27 +02:00
parent ecd16a0a9e
commit aff7b2242e
4 changed files with 142 additions and 142 deletions

View file

@ -9,7 +9,7 @@ if [ -f "/.dockerenv" ]; then
fi fi
./gradlew \ ./gradlew \
clean cleanGenerateXtext build createLocalMavenRepo \ clean cleanGenerateXtext build publish \
-PuseJenkinsSnapshots=true \ -PuseJenkinsSnapshots=true \
-PJENKINS_URL=$JENKINS_URL \ -PJENKINS_URL=$JENKINS_URL \
-PcompileXtend=true \ -PcompileXtend=true \

View file

@ -27,6 +27,7 @@ subprojects {
group = 'org.eclipse.xtext' group = 'org.eclipse.xtext'
version = rootProject.version version = rootProject.version
apply plugin: 'maven-publish'
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'io.spring.dependency-management' apply plugin: 'io.spring.dependency-management'
dependencyManagement { dependencyManagement {
@ -38,7 +39,6 @@ subprojects {
apply plugin: 'org.xtext.xtend' apply plugin: 'org.xtext.xtend'
} }
apply plugin: 'eclipse' apply plugin: 'eclipse'
apply plugin: 'maven'
apply from: "${rootDir}/gradle/upstream-repositories.gradle" apply from: "${rootDir}/gradle/upstream-repositories.gradle"
apply from: "${rootDir}/gradle/java-compiler-settings.gradle" apply from: "${rootDir}/gradle/java-compiler-settings.gradle"

View file

@ -2,108 +2,106 @@
* Information on Xtext developers used in generated pom files for Maven publishing. * Information on Xtext developers used in generated pom files for Maven publishing.
*/ */
project { developers {
developers { developer {
developer { name = 'Sven Efftinge'
name = 'Sven Efftinge' email = 'sven.efftinge@typefox.io'
email = 'sven.efftinge@typefox.io' organization = 'TypeFox'
organization = 'TypeFox' organizationUrl = 'http://typefox.io'
organizationUrl = 'http://typefox.io' }
} developer {
developer { name = 'Sebastian Benz'
name = 'Sebastian Benz' }
} developer {
developer { name = 'Lorenzo Bettini'
name = 'Lorenzo Bettini' email = 'lorenzo.bettini@gmail.com'
email = 'lorenzo.bettini@gmail.com' organization = 'DISIA, University Firenze'
organization = 'DISIA, University Firenze' }
} developer {
developer { name = 'Michael Clay'
name = 'Michael Clay' }
} developer {
developer { name = 'Arne Deutsch'
name = 'Arne Deutsch' email = 'arne.deutsch@itemis.de'
email = 'arne.deutsch@itemis.de' organization = 'itemis'
organization = 'itemis' organizationUrl = 'http://www.itemis.com'
organizationUrl = 'http://www.itemis.com' }
} developer {
developer { name = 'Christian Dietrich'
name = 'Christian Dietrich' email = 'christian.dietrich@itemis.de'
email = 'christian.dietrich@itemis.de' organization = 'itemis'
organization = 'itemis' organizationUrl = 'http://www.itemis.com'
organizationUrl = 'http://www.itemis.com' }
} developer {
developer { name = 'Moritz Eysholdt'
name = 'Moritz Eysholdt' email = 'moritz.eysholdt@typefox.io'
email = 'moritz.eysholdt@typefox.io' organization = 'TypeFox'
organization = 'TypeFox' organizationUrl = 'http://typefox.io'
organizationUrl = 'http://typefox.io' }
} developer {
developer { name = 'Dennis Hübner'
name = 'Dennis Hübner' email = 'dennis.huebner@typefox.io'
email = 'dennis.huebner@typefox.io' organization = 'TypeFox'
organization = 'TypeFox' organizationUrl = 'http://typefox.io'
organizationUrl = 'http://typefox.io' }
} developer {
developer { name = 'Jan Köhnlein'
name = 'Jan Köhnlein' email = 'jan.koehnlein@typefox.io'
email = 'jan.koehnlein@typefox.io' organization = 'TypeFox'
organization = 'TypeFox' organizationUrl = 'http://typefox.io'
organizationUrl = 'http://typefox.io' }
} developer {
developer { name = 'Anton Kosyakov'
name = 'Anton Kosyakov' email = 'anton.kosyakov@typefox.io'
email = 'anton.kosyakov@typefox.io' organization = 'TypeFox'
organization = 'TypeFox' organizationUrl = 'http://typefox.io'
organizationUrl = 'http://typefox.io' }
} developer {
developer { name = 'Tamas Miklossy'
name = 'Tamas Miklossy' email = 'miklossy@itemis.de'
email = 'miklossy@itemis.de' organization = 'itemis'
organization = 'itemis' organizationUrl = 'http://www.itemis.com'
organizationUrl = 'http://www.itemis.com' }
} developer {
developer { name = 'Stefan Oehme'
name = 'Stefan Oehme' }
} developer {
developer { name = 'Holger Schill'
name = 'Holger Schill' email = 'holger.schill@itemis.de'
email = 'holger.schill@itemis.de' organization = 'itemis'
organization = 'itemis' organizationUrl = 'http://www.itemis.com'
organizationUrl = 'http://www.itemis.com' }
} developer {
developer { name = 'Christian Schneider'
name = 'Christian Schneider' email = 'christian.schneider@typefox.io'
email = 'christian.schneider@typefox.io' organization = 'TypeFox'
organization = 'TypeFox' organizationUrl = 'http://typefox.io'
organizationUrl = 'http://typefox.io' }
} developer {
developer { name = 'Miro Spönemann'
name = 'Miro Spönemann' email = 'miro.spoenemann@typefox.io'
email = 'miro.spoenemann@typefox.io' organization = 'TypeFox'
organization = 'TypeFox' organizationUrl = 'http://typefox.io'
organizationUrl = 'http://typefox.io' }
} developer {
developer { name = 'Karsten Thoms'
name = 'Karsten Thoms' email = 'karsten.thoms@itemis.de'
email = 'karsten.thoms@itemis.de' organization = 'itemis'
organization = 'itemis' organizationUrl = 'http://www.itemis.com'
organizationUrl = 'http://www.itemis.com' }
} developer {
developer { name = 'Knut Wannheden'
name = 'Knut Wannheden' }
} developer {
developer { name = 'Sebastian Zarnekow'
name = 'Sebastian Zarnekow' email = 'sebastian.zarnekow@gmail.com'
email = 'sebastian.zarnekow@gmail.com' organization = 'itemis'
organization = 'itemis' organizationUrl = 'http://www.itemis.com'
organizationUrl = 'http://www.itemis.com' }
} developer {
developer { name = 'Titouan Vervack'
name = 'Titouan Vervack' email = 'titouan.vervack@sigasi.com'
email = 'titouan.vervack@sigasi.com' organization = 'Sigasi'
organization = 'Sigasi' organizationUrl = 'https://www.sigasi.com'
organizationUrl = 'https://www.sigasi.com'
}
} }
} }

View file

@ -2,42 +2,44 @@
* Configuration of deployment to Maven repositories. * Configuration of deployment to Maven repositories.
*/ */
// Configuration function for generated POMs def noJavaDoc = name.endsWith('tests') || name.contains('testlanguage')
def configurePom = { pom -> publishing {
pom.project { publications {
if (project.hasProperty('title')) { LocalMavenRepo(MavenPublication) {
name = project.title from components.java
description = project.description artifact sourcesJar
} if (!noJavaDoc) {
packaging 'jar' artifact javadocJar
url 'https://www.eclipse.org/Xtext/' }
licenses { pom {
license { url = 'https://www.eclipse.org/Xtext/'
name 'Eclipse Public License, Version 1.0' licenses {
url 'http://www.eclipse.org/legal/epl-v10.html' license {
} name = 'Eclipse Public License, Version 1.0'
} url = 'http://www.eclipse.org/legal/epl-v10.html'
scm { }
connection "scm:git:git@github.com:eclipse/${rootProject.name}.git" }
developerConnection "scm:git:git@github.com:eclipse/${rootProject.name}.git" scm {
url "git@github.com:eclipse/${rootProject.name}.git" connection = "scm:git:git@github.com:eclipse/${rootProject.name}.git"
} developerConnection = "scm:git:git@github.com:eclipse/${rootProject.name}.git"
} url = "git@github.com:eclipse/${rootProject.name}.git"
apply from: "${rootDir}/gradle/developers.gradle", to: pom }
} // We need to wait until the project's own build file has been executed
// so we can use the title and description settings for setting up Maven publishing.
afterEvaluate {
if (project.hasProperty('title')) {
name = project.title
description = project.description
}
}
}
apply from: "${rootDir}/gradle/developers.gradle", to: pom
}
// We need to wait until the project's own build file has been executed }
// so we can use the title and description settings for setting up Maven publishing. repositories {
afterEvaluate { maven {
url = "$rootProject.buildDir/maven-repository"
task createLocalMavenRepo(type: Upload) { }
group = 'Upload' }
description = 'Create or update the local Maven repository'
configuration = configurations.archives
repositories.mavenDeployer {
repository(url: "file:" + file("${rootDir}/build/maven-repository"))
configurePom(pom)
}
}
} }