diff --git a/README.md b/README.md index b7adea1..357927e 100644 --- a/README.md +++ b/README.md @@ -14,5 +14,15 @@ Java library for working with CDOC documents. * [Unlimited Strength Jurisdiction Policy](https://github.com/open-eid/cdoc4j/wiki/Enabling-Unlimited-Strength-Jurisdiction-Policy) ## How to use it -Take a look at the [examples](https://github.com/open-eid/cdoc4j/wiki/Examples-of-how-to-use-it). +Take a look at the [examples](https://github.com/open-eid/cdoc4j/wiki/Examples-of-how-to-use-it) +## Maven Central +You can use the library as a dependency from [Maven Central](http://mvnrepository.com/artifact/org.open-eid.cdoc4j/cdoc4j) + +```xml + + org.open-eid.cdoc4j + cdoc4j + 1.1 + +``` diff --git a/publish.sh b/publish.sh new file mode 100755 index 0000000..682a8c1 --- /dev/null +++ b/publish.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +project="cdoc4j" +version="1.1" +staging_url="https://oss.sonatype.org/service/local/staging/deploy/maven2/" +repositoryId="ossrh" + +# Starting GPG agent to store GPG passphrase so we wouldn't have to enter the passphrase every time +eval $(gpg-agent --daemon --no-grab) +export GPG_TTY=$(tty) +export GPG_AGENT_INFO + +artifact="target/$project-$version" + +echo "Deploying $project-$version" + +mvn gpg:sign-and-deploy-file -DpomFile=pom.xml -Dfile=$artifact.jar -Durl=$staging_url -DrepositoryId=$repositoryId +mvn gpg:sign-and-deploy-file -DpomFile=pom.xml -Dfile=$artifact-sources.jar -Dclassifier=sources -Durl=$staging_url -DrepositoryId=$repositoryId +mvn gpg:sign-and-deploy-file -DpomFile=pom.xml -Dfile=$artifact-javadoc.jar -Dclassifier=javadoc -Durl=$staging_url -DrepositoryId=$repositoryId + +echo "Finished deployment" + +killall gpg-agent