Update .github/workflows/maven-publish.yml

This commit is contained in:
stjepan.cvitanovic 2025-03-20 15:45:41 +01:00
parent 2e65a9240d
commit 6819eb56f4

View File

@ -72,19 +72,19 @@ jobs:
echo "Uploading artifact for $GROUP_ID:$ARTIFACT_ID:$VERSION"
if [ $PACKAGING == "pom" ];
then
echo "Packaging is pom, uploading pom.xml"
mvn deploy:deploy-file \
-Durl=https://devops.pravilanovait.hr/nexus/repository/maven-snapshots \
-Dpackaging=pom -DgroupId=$GROUP_ID -DartifactId=$ARTIFACT_ID \
-Dversion=$VERSION -DrepositoryId=local-nexus \
-Dfile=pom.xml
echo "Packaging is pom, uploading pom.xml"
mvn deploy:deploy-file \
-Durl=https://devops.pravilanovait.hr/nexus/repository/maven-snapshots \
-Dpackaging=pom -DgroupId=$GROUP_ID -DartifactId=$ARTIFACT_ID \
-Dversion=$VERSION -DrepositoryId=local-nexus \
-Dfile=pom.xml
else
echo "Packaging is $PACKAGING, uploading target/$ARTIFACT_ID-$VERSION.$PACKAGING"
mvn deploy:deploy-file \
-Durl=https://devops.pravilanovait.hr/nexus/repository/maven-snapshots \
-Dpackaging=$PACKAGING -DgroupId=$GROUP_ID -DartifactId=$ARTIFACT_ID \
-Dversion=$VERSION -DrepositoryId=local-nexus \
-Dfile=target/$ARTIFACT_ID-$VERSION.$PACKAGING
echo "Packaging is $PACKAGING, uploading target/$ARTIFACT_ID-$VERSION.$PACKAGING"
mvn deploy:deploy-file \
-Durl=https://devops.pravilanovait.hr/nexus/repository/maven-snapshots \
-Dpackaging=$PACKAGING -DgroupId=$GROUP_ID -DartifactId=$ARTIFACT_ID \
-Dversion=$VERSION -DrepositoryId=local-nexus \
-Dfile=target/$ARTIFACT_ID-$VERSION.$PACKAGING
fi
env: