diff --git a/publish-to-Maven-Central.sh b/publish-to-Maven-Central.sh new file mode 100755 index 00000000..eccb1dc4 --- /dev/null +++ b/publish-to-Maven-Central.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# This file is used to publish the library to Maven Central. +# First, it runs the Gradle task to generate the resource files and to override the +# resource files of the Maven Central version with the ones in the gradleResources directory. +# After that, it calls the Maven deploy command to publish the library to Maven Central. +# It would be more convenient to use the Gradle plugin to publish the library to Maven Central, +# but that doesn't seem to be possible. The Gradle plugin always stops with a "400 Bad Request" error. + +# This script requires a settings.xml file in the .m2 directory with the following content: +# +# +# +# ossrh +# (token-user from the Maven Central Nexus UI) +# (token from the Maven Central Nexus UI) +# +# +# +# +# sign-artifacts +# +# (id of the gpg key you're using to sign the files) +# (passphrase of that gpg key) +# +# +# +# +# sign-artifacts +# +# + +./gradlew clean publishToMavenLocal + +mvn clean deploy -P MavenCentral \ No newline at end of file