Skip to content

Instantly share code, notes, and snippets.

@TomyLobo
Last active April 20, 2016 08:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TomyLobo/d92a1cce92a33bc5eb5b056afcc5bbf4 to your computer and use it in GitHub Desktop.
Save TomyLobo/d92a1cce92a33bc5eb5b056afcc5bbf4 to your computer and use it in GitHub Desktop.
Workaround for Debian bug #573482
#!/bin/bash
set -e
fixjar=aaafix-debian-bug-573482.jar
pom_xml=org/apache/maven/project/pom-4.0.0.xml
first_component="${pom_xml%%/*}"
cd /usr/share/maven2/lib
if [ -e "$first_component" ]; then
echo >&2 "$first_component exists, bailing out!"
exit 1
fi
if [ -e "$fixjar" ]; then
echo >&2 "$fixjar exists, bailing out!"
exit 1
fi
jar xf maven-debian-uber.jar "$pom_xml"
sed -i 's#^ <build>#\0 <extensions> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-webdav-jackrabbit</artifactId> <version>1.0-beta-6</version> </extension> </extensions>#' "$pom_xml"
jar cf "$fixjar" "$first_component"
rm -rf "$first_component"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment