Closed graywolf336 closed 8 years ago
Not really.
I wrote this plugin to publish artifacts to maven repositories from non java/maven builds. If you are using maven in the first place can't you just let maven do the complete cycle in your build step instead?
Okay thanks.
That's how we started off trying, but I couldn't find a way to get it working with a password protected repository as I couldn't find a way to create the settings.xml
with the usernames and passwords. You have any tips on doing that?
IIRC, the only way I found how to do provide maven with credentials was to generate a settings.xml.
It wouldn't be that much work supporting running any maven command in this plugin but unfortunately I don't have time to implement it right now..
You could maybe use a bash script which wraps the maven invocation and creates the settings.xml before maven is launched during the build step.. This solution does "leak" the credentials early on in the build process so you might want to be careful depending on how public the project is.
The wrapper could maybe look something like this where the M2_PASSWORD is injected in to the builder environment via drone secrets.
#!/bin/bash
echo cat << EOF > $HOME/.m2/settings.xml
<settings>
... $M2_PASSWORD ...
</settings>
EOF
mvn ${@}
I will have to try that out, thanks!
Is there anyway to pull the version from the
pom.xml
file? Or what would you recommend for this?