Skip to content

migrate to maven-publish plugin #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
170 changes: 90 additions & 80 deletions stardog-spring-batch/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin:"java"
apply plugin:"eclipse"
apply plugin:"maven"
apply plugin:"maven-publish"
apply plugin:"signing"

//apply from:'https://raw.github.com/breskeby/gradleplugins/master/emmaPlugin/emma.gradle'
Expand All @@ -19,15 +19,15 @@ ext {
}

repositories {
maven { url "http://maven.stardog.com" }
maven { url "https://maven.stardog.com" }
mavenLocal()
mavenCentral()

maven { url "http://repository.springsource.com/maven/bundles/release" }
maven { url "http://repository.springsource.com/maven/bundles/external" }
maven { url "http://maven.springframework.org/release" }
maven { url "http://maven.springframework.org/milestone" }
maven { url "http://maven.springframework.org/snapshot" }
maven { url "https://repository.springsource.com/maven/bundles/release" }
maven { url "https://repository.springsource.com/maven/bundles/external" }
maven { url "https://maven.springframework.org/release" }
maven { url "https://maven.springframework.org/milestone" }
maven { url "https://maven.springframework.org/snapshot" }
// txtai
maven { url "https://repository.liferay.com/nexus/content/repositories/public" }
}
Expand All @@ -38,24 +38,24 @@ configurations {

dependencies {
// Core Dependencies
compile ("org.springframework:spring-core:${springVersion}")
compile ("org.springframework:spring-beans:${springVersion}")
compile ("org.springframework:spring-context:${springVersion}")
compile ("org.springframework:spring-tx:${springVersion}")
compile ("org.slf4j:slf4j-api:${slf4jVersion}")

compile ("org.springframework.batch:spring-batch-core:${springBatchVersion}")
compile ("org.springframework.batch:spring-batch-infrastructure:${springBatchVersion}")

compile ("com.complexible.stardog:client-http:${stardogVersion}")
compile ("com.stardog.ext:stardog-spring:${stardogSpringVersion}")
testCompile ("com.complexible.stardog:server:${stardogVersion}") {
implementation ("org.springframework:spring-core:${springVersion}")
implementation ("org.springframework:spring-beans:${springVersion}")
implementation ("org.springframework:spring-context:${springVersion}")
implementation ("org.springframework:spring-tx:${springVersion}")
implementation ("org.slf4j:slf4j-api:${slf4jVersion}")

implementation ("org.springframework.batch:spring-batch-core:${springBatchVersion}")
implementation ("org.springframework.batch:spring-batch-infrastructure:${springBatchVersion}")

implementation ("com.complexible.stardog:client-http:${stardogVersion}")
implementation ("com.stardog.ext:stardog-spring:${stardogSpringVersion}")
testImplementation ("com.complexible.stardog:server:${stardogVersion}") {
exclude group: 'com.complexible.stardog.virtual'
}
testImplementation ("com.complexible.stardog.search:stardog-search-shared:${stardogVersion}")

testCompile group: 'junit', name: 'junit', version: "${junitVersion}"
testCompile group: 'org.springframework', name:'spring-test', version:"${springVersion}"
testImplementation group: 'junit', name: 'junit', version: "${junitVersion}"
testImplementation group: 'org.springframework', name:'spring-test', version:"${springVersion}"

constraints {
implementation ("org.apache.logging.log4j:log4j-core:${log4jVersion}") {
Expand Down Expand Up @@ -87,12 +87,12 @@ tasks.withType(Test) {

task sourceJar(type: Jar) {
description 'An archive of the source code for Maven Central'
classifier 'sources'
archiveClassifier.set('sources')
from sourceSets.main.java
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
archiveClassifier.set('javadoc')
from 'build/docs/javadoc'
}

Expand All @@ -101,67 +101,77 @@ artifacts {
archives javadocJar, sourceJar
}

signing {
sign configurations.archives
required { gradle.taskGraph.hasTask(uploadArchives) }
java {
withJavadocJar()
withSourcesJar()
}

uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: sonatypeTokenUser, password: sonatypeTokenPassword)
}

pom.project {
name 'stardog-spring-batch'
packaging 'jar'
description 'Stardog Spring bindings for using Stardog with the Springframework Batch subproject'
url 'https://github.com/stardog-union/stardog-spring/stardog-spring-batch'

scm {
url 'scm:git://github.com/stardog-union/stardog-spring.git'
connection 'scm:git://github.com/stardog-union/stardog-spring.git'
developerConnection 'scm:git://github.com/stardog-union/stardog-spring.git'
}

licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}

developers {
developer {
id 'albakercp'
name 'Al Baker'
}
developer {
id 'gcoluni'
name 'Gregory Coluni'
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java

pom {
name = 'stardog-spring-batch'
packaging = 'jar'
description = 'Stardog Spring bindings for using Stardog with the Springframework Batch subproject'
url = 'https://github.com/stardog-union/stardog-spring/stardog-spring-batch'

scm {
url = 'scm:git://github.com/stardog-union/stardog-spring.git'
connection = 'scm:git://github.com/stardog-union/stardog-spring.git'
developerConnection = 'scm:git://github.com/stardog-union/stardog-spring.git'
}

licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}

developers {
developer {
id = 'albakercp'
name = 'Al Baker'
}
developer {
id 'stardog_support'
name 'Stardog Support'
id = 'gcoluni'
name = 'Gregory Coluni'
}
}
}
}
}
}

configure(install.repositories.mavenInstaller) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gradle install no longer exists, publishToMavenLocal is used instead

pom.project {
version '1.2.0'
artifactId 'stardog-spring-batch'
groupId 'com.stardog.ext'
}
}
developer {
id = 'snowell'
name = 'Stephen Nowell'
}
developer {
id = 'StanislavKlenin'
name = 'Stanislav Klenin'
}
developer {
id = 'stardog_support'
name = 'Stardog Support'
}
}
}
}
}
repositories {
maven {
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = sonatypeTokenUser
password = sonatypeTokenPassword
}
}
}
}

signing {
required { gradle.taskGraph.hasTask("uploadArchives") }
sign publishing.publications.mavenJava
}

wrapper {
gradleVersion = '6.0.1'
gradleVersion = '8.12'
}
Loading