Skip to content

Commit

Permalink
refs #51 - switched to maven central and updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jscancella committed Feb 15, 2021
1 parent db2586b commit 9cd191e
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 115 deletions.
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,30 @@ One of the inspirations for writing this library was to create a simple to use i
* Before submitting a pull request run `./gradlew.bat clean check` and there are no errors.

#### Building a release
* run `./gradlew bintrayUpload -Pversion=<VERSION YOU ARE CALLING THIS RELEASE>`
* sign in to https://bintray.com/jscancella/com.github.jscancella/bagging and publish the new version
Make sure you have setup your `gradle.properties` file and have distributed your gpg key
* install gnupg
* generate a key `gpg --full-generate-key`
* export your key `gpg --export-secret-keys -o C:\Users\John\secring.gpg`
* setup your `gradle.properties file`
```
signing.keyId=<LAST 8 NUMBERS of ID>
signing.password=<PASSWORD YOU USED DURING CREATION>
signing.secretKeyRingFile=C:\\Users\\John\\secring.gpg
ossrhUsername=<JIRA USERNAME FOR OSS. See https://issues.sonatype.org/browse/OSSRH-55497>
ossrhPassword=<JIRA PASSWORD>
```

Now actually upload the new version
* run `./gradlew uploadArchives -Pversion="<VERSION YOU ARE CALLING THIS RELEASE>"`
* sign in to https://oss.sonatype.org/
* The following is an abreviated version of https://central.sonatype.org/pages/releasing-the-deployment.html
* Go to the "staging repositories" (naviagation on the left)
* Find the artifact you just uploaded and click "close" button at the top of the page
* Allow time for nexus to go through its automated checking
* click "release" button at the top of page

## Roadmap for this library
* Maintain interoperability with the [BagIt specification](https://tools.ietf.org/html/rfc8493).
* Fix bugs/issues reported (on going).
* Translate to various languages (on going).
* Translate to various languages (on going).
106 changes: 0 additions & 106 deletions bintray.gradle

This file was deleted.

10 changes: 4 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ plugins {
id "org.owasp.dependencycheck" version "5.3.2.1"
id "org.ajoberstar.grgit" version "4.0.2"
id "com.github.spotbugs" version "4.5.1"
id "com.jfrog.bintray" version "1.8.5"
id 'info.solidsoft.pitest' version '1.5.2'
}
apply from: 'eclipse.gradle'
apply from: 'bintray.gradle'
apply from: 'maven-central.gradle'
apply from: 'code-quality.gradle'
apply from: 'message-bundle.gradle'

Expand All @@ -27,13 +26,12 @@ if(project.version == "unspecified"){
}

repositories {
jcenter()
mavenCentral()
}

dependencies {
implementation 'org.slf4j:slf4j-api:1.7.30'
//because they are exposed in the method call signature these should be API
api 'com.fasterxml.jackson.core:jackson-core:2.11.2',
implementation 'org.slf4j:slf4j-api:1.7.30',
'com.fasterxml.jackson.core:jackson-core:2.11.2',
'com.fasterxml.jackson.core:jackson-databind:2.11.2'

testImplementation 'org.junit.jupiter:junit-jupiter:5.6.2',
Expand Down
73 changes: 73 additions & 0 deletions maven-central.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
apply plugin: 'maven'
apply plugin: 'signing'

task javadocJar(type: Jar) {
group "Build"
description "Create the jar that contains all the class documentation (javadoc)."
classifier = 'javadoc'
from javadoc
}

task sourcesJar(type: Jar) {
group "Build"
description "Create the jar that contains all the .class files."
classifier = 'sources'
from sourceSets.main.allSource
}

artifacts {
archives sourcesJar, javadocJar
}

signing {
sign configurations.archives
}

group = 'com.github.jscancella'
archivesBaseName = 'bagging'
version = project.version

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

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

snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

pom.project {
name 'bagging'
packaging 'jar'
// optionally artifactId can be defined here
description 'This is a software library intended to support the creation, manipulation, and validation of "bags" from the bagit specification. It currently supports version 0.93 through 1.0.'
url 'https://github.com/jscancella/bagging'

scm {
connection 'scm:git:https://github.com/jscancella/bagging'
developerConnection 'scm:git:ssh://github.com/jscancella/bagging'
url 'https://github.com/jscancella/bagging'
}

licenses {
license {
name 'AGPL-V3'
url 'https://github.com/jscancella/bagging/blob/master/LICENSE.txt'
}
}

developers {
developer {
id 'blacksmithforlife'
name 'John Scancella'
email '[email protected]'
}
}
}
}
}
}

0 comments on commit 9cd191e

Please sign in to comment.