Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Better mvn deploy
if [[ ! -e pom.xml ]]; then
echo "Missing pom.xml" 1>&2
exit 1
sed \
-e '/<distributionManagement>/,/<\/distributionManagement>/d' \
-e '/<\/project/d' \
pom.xml > pom-deploy.xml || exit 1
cat >> pom-deploy.xml <<EOF
<!-- ADDED BY $0 -->
... whatever you need ...
mvn -f pom-deploy.xml clean install && \
mvn -f pom-deploy.xml deploy -DskipTests=true && \
rm pom-deploy.xml
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.