Nexus 3.x and appllinks dependency

Anyone planning on upgrading to Nexus 3.x should be aware that there are problems with applinks-parent. Apparently the lack of an XML stanza at the top of the pom prevents this artifact from being received correctly whether Nexus is setup as a proxy, or whether a manual upload of a previously downloaded version is attempted.

Nexus bug:

Affected Maven artetfact:
com.atlassian.applinks:applinks-parent-5.2.4.pom

Workaround:
Add the following at the top of the pom:
<?xml version="1.0" encoding="UTF-8"?>

As Nexus 3.x removed the feature to upload artefacts, you’re left with using maven… Here is a convenience script to upload a JAR/POM pair, or just the POM:

if [ -a $1.jar ]; then
echo "Deploying JAR and POM"
mvn -e deploy:deploy-file \
  -DpomFile=$1.pom \
  -Dfile=$1.jar \
  -DrepositoryId=maven-thirdparty \
  -Durl=http://nexus:8081/repository/maven-thirdparty/
else
echo "Deploying POM only"
mvn -e deploy:deploy-file \
  -DpomFile=$1.pom \
  -Dfile=$1.pom \
  -DrepositoryId=maven-thirdparty \
  -Durl=http://nexus:8081/repository/maven-thirdparty/
fi

You’ll need to add a server block to your ~/.m2/settings.xml:

    <server>
      <id>maven-thirdparty</id>
      <username>admin</username>
      <password>admin123</password> <!-- the default nexus password, change of course -->
    </server>

Then just call the script from the artefact directory, ommitting the .pom of the artifact, eg, from: ~/.m2/repository/com/atlassian/applinks/applinks-api/5.2.4 , run:

upload.sh applinks-api-5.2.4
5 Likes

Thanks for letting us know @andy

Of course, it would be nice if Atlassian updated various poms with the requisite XML headers so it just worked :wink: from what I can tell its just the applinks related projects.

1 Like

Its sad that something as darn simple to fix as this cannot see the light of day, and continues to hit me every time I need the next version :face_with_symbols_over_mouth:

Aand again, a Confluence release, a new applinks version, STILL the same problem. For something so simple to remain unfixed is just awful. Its not hard people!

Happy birthday you malformed descriptor, you’ll be happy to hear we wasted yet another 30m of our lives fixing v5.0.4 of you today. If only we could invite some Atlassian devs to the party.