I'm currently working on getting a script to upload my artifacts to Nexus using CURL.
I can get it to work with one artifact file without any problems using the command:
curl -v -F r={repo_id} -F hasPom=true -F e=jar -F file=@pom.xml -F file=@target/project.jar -u un:pwd {repo_url}
My project has both a jar containing the binaries and a jar containing the sources though. I would like to deploy both to the same location in my maven repo. I tried this with the curl command by adding a second file,
curl -v -F r={repo_id} -F hasPom=true -F e=jar -F file=@pom.xml -F file=@target/project.jar -F file=@target/project-sources.jar -u un:pwd {repo_url}
This essentially performs two seperate rest calls for each file, using the same pom. Which doesn't work since my Nexus doesn't allow updating artifacts.
Is there a way to make this work, or can this only work by enabling the updating of artifacts? I would prefer not to enable this for obvious reasons.