mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 08:18:55 +00:00
[eclipse/xtext#1547] use maven-publish instead of maven plugin
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
This commit is contained in:
parent
ecd16a0a9e
commit
aff7b2242e
4 changed files with 142 additions and 142 deletions
|
@ -9,7 +9,7 @@ if [ -f "/.dockerenv" ]; then
|
|||
fi
|
||||
|
||||
./gradlew \
|
||||
clean cleanGenerateXtext build createLocalMavenRepo \
|
||||
clean cleanGenerateXtext build publish \
|
||||
-PuseJenkinsSnapshots=true \
|
||||
-PJENKINS_URL=$JENKINS_URL \
|
||||
-PcompileXtend=true \
|
||||
|
|
|
@ -27,6 +27,7 @@ subprojects {
|
|||
group = 'org.eclipse.xtext'
|
||||
version = rootProject.version
|
||||
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
dependencyManagement {
|
||||
|
@ -38,7 +39,6 @@ subprojects {
|
|||
apply plugin: 'org.xtext.xtend'
|
||||
}
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'maven'
|
||||
|
||||
apply from: "${rootDir}/gradle/upstream-repositories.gradle"
|
||||
apply from: "${rootDir}/gradle/java-compiler-settings.gradle"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* Information on Xtext developers used in generated pom files for Maven publishing.
|
||||
*/
|
||||
|
||||
project {
|
||||
developers {
|
||||
developer {
|
||||
name = 'Sven Efftinge'
|
||||
|
@ -106,4 +105,3 @@ project {
|
|||
organizationUrl = 'https://www.sigasi.com'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,42 +2,44 @@
|
|||
* Configuration of deployment to Maven repositories.
|
||||
*/
|
||||
|
||||
// Configuration function for generated POMs
|
||||
def configurePom = { pom ->
|
||||
pom.project {
|
||||
def noJavaDoc = name.endsWith('tests') || name.contains('testlanguage')
|
||||
publishing {
|
||||
publications {
|
||||
LocalMavenRepo(MavenPublication) {
|
||||
from components.java
|
||||
artifact sourcesJar
|
||||
if (!noJavaDoc) {
|
||||
artifact javadocJar
|
||||
}
|
||||
pom {
|
||||
url = 'https://www.eclipse.org/Xtext/'
|
||||
licenses {
|
||||
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"
|
||||
url = "git@github.com:eclipse/${rootProject.name}.git"
|
||||
}
|
||||
// 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
|
||||
}
|
||||
packaging 'jar'
|
||||
url 'https://www.eclipse.org/Xtext/'
|
||||
licenses {
|
||||
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"
|
||||
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 {
|
||||
|
||||
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)
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url = "$rootProject.buildDir/maven-repository"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue