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