-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ISSUE-757: Sign and publish artifacts (#760)
Updated the gradle build files so it's ready for publishing into Sonatype repo
- Loading branch information
Showing
3 changed files
with
70 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,6 @@ | |
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
allprojects { | ||
repositories { | ||
|
||
|
@@ -36,10 +35,10 @@ subprojects { | |
group = 'com.hortonworks.registries' | ||
|
||
apply plugin: 'java' | ||
apply plugin: 'maven' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'project-report' | ||
apply plugin: 'jacoco' | ||
apply plugin: 'com.bmuschko.nexus' | ||
apply plugin: 'checkstyle' | ||
apply plugin: 'signing' | ||
|
||
|
@@ -155,67 +154,79 @@ subprojects { | |
} | ||
|
||
// jersey-shaded has custom publication and we don't publish any test artifacts | ||
if (it.name != 'jersey-shaded' & it.name != 'behavior-tests') { | ||
if (it.name != 'jersey-shaded' && it.name != 'behavior-tests' && it.name != 'hortonworks-registries-bin' && it.name != 'hortonworks-registries-docker') { | ||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
groupId = group | ||
from components.java | ||
|
||
pom { | ||
name = 'Schema Registry' | ||
url = 'https://github.com/hortonworks/registry' | ||
|
||
scm { | ||
url = 'https://github.com/hortonworks/registry' | ||
connection = 'scm:git:[email protected]:hortonworks/registry.git' | ||
developerConnection = 'scm:git:[email protected]:hortonworks/registry.git' | ||
} | ||
|
||
licenses { | ||
license { | ||
name = "The Apache License, Version 2.0" | ||
url = "http://www.apache.org/licenses/LICENSE-2.0.txt" | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id = 'galyo' | ||
name = 'Csaba Galyo' | ||
email = '[email protected]' | ||
} | ||
developer { | ||
id = 'csenge.maruzsi' | ||
name = 'Csenge Virag Maruzsi' | ||
email = '[email protected]' | ||
} | ||
developer { | ||
id = 'acsaki' | ||
name = 'Andras Csaki' | ||
email = '[email protected]' | ||
} | ||
} | ||
} | ||
|
||
} | ||
} | ||
} | ||
|
||
signing { | ||
//useGpgCmd() // enable if using command line gpg | ||
sign publishing.publications.mavenJava | ||
} | ||
} | ||
|
||
// put your password into ~/.gradle/build.gradle and then run "gradle sign uploadArchive" to upload into nexus | ||
modifyPom { | ||
project { | ||
name 'Registry' | ||
description 'Registry is a versioned entity framework that allows to build various registry services such as Schema Registry, ML Model Registry etc..' | ||
url 'http://github.com/hortonworks/registry' | ||
|
||
artifacts { | ||
archives javadocJar, sourcesJar | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
scm { | ||
url 'http://github.com/hortonworks/registry' | ||
connection 'scm:git:git://github.com/hortonworks/registry.git' | ||
developerConnection 'scm:git:[email protected]:hortonworks/registry.git' | ||
} | ||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
authentication(userName: nexusUsername, password: nexusPassword) | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
distribution 'repo' | ||
} | ||
} | ||
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { | ||
authentication(userName: nexusUsername, password: nexusPassword) | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'galyo' | ||
name 'Csaba Galyo' | ||
email '[email protected]' | ||
} | ||
developer { | ||
id 'csenge.maruzsi' | ||
name 'Csenge Virag Maruzsi' | ||
email '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
extraArchive { | ||
sources = false | ||
tests = false | ||
javadoc = false | ||
} | ||
|
||
nexus { | ||
sign = true | ||
repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/' | ||
snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots/' | ||
} | ||
} | ||
|
||
|
@@ -228,7 +239,6 @@ buildscript { | |
} | ||
|
||
dependencies { | ||
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' | ||
classpath "com.github.ben-manes:gradle-versions-plugin:0.36.0" | ||
classpath "com.peterabeles.gversion:com.peterabeles.gversion.gradle.plugin:1.10" | ||
classpath "com.github.jengelman.gradle.plugins:shadow:5.2.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters