diff --git a/.github/workflows/createReleasePom.sh b/.github/workflows/createReleasePom.sh
new file mode 100755
index 0000000..84c1b46
--- /dev/null
+++ b/.github/workflows/createReleasePom.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+if ! command -v xmlstarlet &> /dev/null
+then
+ echo "xmlstarlet tool is not available, please install it to continue."
+ exit 1
+fi
+
+readonly RELEASE_POM=release-pom.xml
+echo "Copying original POM file to $RELEASE_POM"
+cp pom.xml "$RELEASE_POM"
+
+CURRENT_VERSION=$(mvn --file "$RELEASE_POM" -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)
+
+echo "Updating artifactId value for release POM $RELEASE_POM"
+xmlstarlet edit -L --ps -N pom="http://maven.apache.org/POM/4.0.0" \
+ --update "/pom:project/pom:artifactId" \
+ --value "import-export-udf-common-scala_\${scala.compat.version}" "$RELEASE_POM"
+
diff --git a/.github/workflows/release_droid_release_on_maven_central.yml b/.github/workflows/release_droid_release_on_maven_central.yml
index 7028ba7..da8b1f6 100644
--- a/.github/workflows/release_droid_release_on_maven_central.yml
+++ b/.github/workflows/release_droid_release_on_maven_central.yml
@@ -29,13 +29,19 @@ jobs:
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
+ - name: Install xmlstarlet
+ run: sudo apt install -y --no-install-recommends xmlstarlet
+ - name: Update release pom file
+ run: ./.github/workflows/createReleasePom.sh
- name: Publish to Central Repository for ${{ matrix.scala-version }}
run: |
- mvn clean deploy \
+ mvn --file release-pom.xml clean deploy \
-P${{ matrix.scala-version }} \
-Dgpg.skip=false \
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \
-DskipTests
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
- MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
\ No newline at end of file
+ MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
+ - name: Remove release pom file
+ run: rm -rf release-pom.xml
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 46b8a44..25b035d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -71,4 +71,5 @@ tmp
Desktop.ini
Thumbs.db
-*.flattened-pom.xml
\ No newline at end of file
+*.flattened-pom.xml
+release-pom.xml
diff --git a/README.md b/README.md
index 0a299d0..fda58fb 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,9 @@
# Import Export UDF Common Scala
[](https://github.com/exasol/import-export-udf-common-scala/actions/workflows/ci-build.yml)
-[](https://search.maven.org/artifact/com.exasol/import-export-udf-common-scala_2.13)
+
+Scala 2.13: [](https://search.maven.org/artifact/com.exasol/import-export-udf-common-scala_2.13)
+Scala 2.12: [](https://search.maven.org/artifact/com.exasol/import-export-udf-common-scala_2.12)
[](https://sonarcloud.io/dashboard?id=com.exasol%3Aimport-export-udf-common-scala)
diff --git a/doc/changes/changelog.md b/doc/changes/changelog.md
index a542f88..1b70e29 100644
--- a/doc/changes/changelog.md
+++ b/doc/changes/changelog.md
@@ -1,5 +1,6 @@
# Changes
+* [0.4.2](changes_0.4.2.md)
* [0.4.1](changes_0.4.1.md)
* [0.4.0](changes_0.4.0.md)
* [0.3.1](changes_0.3.1.md)
diff --git a/doc/changes/changes_0.4.2.md b/doc/changes/changes_0.4.2.md
new file mode 100644
index 0000000..8485771
--- /dev/null
+++ b/doc/changes/changes_0.4.2.md
@@ -0,0 +1,19 @@
+# Import Export UDF Common Scala 0.4.2, released 2022-08-03
+
+Code name: Fixed Maven Central deployment
+
+## Summary
+
+The automatic Maven Central deployment tried to upload both variants for Scala 2.12 and 2.13 to the same artifact https://repo1.maven.org/maven2/com/exasol/import-export-udf-common-scala/ which causes the build to fail.
+
+Now they are uploaded with the correct artifact ids:
+
+* https://repo1.maven.org/maven2/com/exasol/import-export-udf-common-scala_2.12/
+* https://repo1.maven.org/maven2/com/exasol/import-export-udf-common-scala_2.13/
+
+
+## Bugfix
+
+* #36: Fixed Maven Central deployment
+
+## Dependency Updates
diff --git a/pk_generated_parent.pom b/pk_generated_parent.pom
index bcf7402..6b2214d 100644
--- a/pk_generated_parent.pom
+++ b/pk_generated_parent.pom
@@ -3,7 +3,7 @@
4.0.0
com.exasol
import-export-udf-common-scala-generated-parent
- 0.4.1
+ 0.4.2
pom
UTF-8
diff --git a/pom.xml b/pom.xml
index 9203c2e..ae77b9a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.exasol
import-export-udf-common-scala
- 0.4.1
+ 0.4.2
Import Export UDF Common Scala
Common import export libraries used in Exasol user defined functions
https://github.com/exasol/import-export-udf-common-scala/
@@ -398,7 +398,7 @@
import-export-udf-common-scala-generated-parent
com.exasol
- 0.4.1
+ 0.4.2
pk_generated_parent.pom
-
\ No newline at end of file
+