I'm trying to set up a Jenkins CI server to automatically deploy to a Nexus server after it finishes building. My issue is that since the Nexus repository is both password protected and the fact that the JAR file is from a third party (the pom.xml file's repository is not set up correctly). The current command I am using is as follows:
mvn deploy:deploy-file -Dpackaging=jar -DrepositoryId=nexus -Durl=http://nexus.<redacted>.com/content/repositories/releases -DpomFile=Spigot/Spigot-Server/pom.xml -Dfile=Spigot/Spigot-Server/target/spigot-1.9-R0.1-SNAPSHOT.jar
I'm also not too sure if this is an issue, but due to recent legal issues, Spigot (the Minecraft server) requires that it be run through a "BuildTools" application that "patches" the resulting JAR file, so I can't directly clone from a git repository.
I'm a bit stumped at this point, so I'd appreciate any help you can give me. Thank you!
EDIT: I forgot to include the error I get:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error deploying artifact: Failed to transfer file: http://nexus.<redacted>.com/content/repositories/releases/org/spigotmc/spigot/1.9-R0.1-SNAPSHOT/spigot-1.9-R0.1-20160312.214547-1.jar. Return code is: 400