From 2accd93c9dea441b7615e8b4aef1087f67e616f8 Mon Sep 17 00:00:00 2001 From: Pawel Kruszewski Date: Tue, 11 Jun 2024 16:34:07 +0200 Subject: [PATCH] fix: javadoc / sources generation --- maven-central-publish.sh | 16 ++++++++++++++++ pom.xml | 27 ++++++++++++++++++++------- 2 files changed, 36 insertions(+), 7 deletions(-) create mode 100755 maven-central-publish.sh diff --git a/maven-central-publish.sh b/maven-central-publish.sh new file mode 100755 index 0000000..07b9ad3 --- /dev/null +++ b/maven-central-publish.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Deploy maven artefact in current directory into Maven central repository +# using maven-release-plugin goals + +read -p "Really publish to maven cetral repository (yes/no)? " + +if ( [ "$REPLY" == "yes" ] ) then + eval `ssh-agent` + ssh-add ~/.ssh/id_rsa + ssh-add -l + mvn deploy -e + ssh-add -D +else + echo 'Exit without deploy' +fi diff --git a/pom.xml b/pom.xml index 04a1c10..870a9da 100644 --- a/pom.xml +++ b/pom.xml @@ -51,6 +51,18 @@ + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar + + + + org.apache.maven.plugins maven-release-plugin @@ -92,12 +104,6 @@ - - org.apache.maven.plugins - maven-source-plugin - 3.3.0 - - org.codehaus.mojo license-maven-plugin @@ -134,12 +140,19 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.6.3 false UTF-8 UTF-8 + + + attach-javadocs + + jar + + + maven-surefire-plugin