2010-12-21 14:25:37 +00:00
|
|
|
#!/bin/sh
|
|
|
|
if [ -f /usr/share/java-utils/java-functions ] ; then
|
|
|
|
. /usr/share/java-utils/java-functions
|
|
|
|
set_jvm
|
|
|
|
set_javacmd
|
|
|
|
fi
|
|
|
|
|
2011-06-06 08:34:24 +00:00
|
|
|
function help()
|
|
|
|
{
|
|
|
|
echo "mvn-local [options] [<goal(s)>] [<phase(s)>]"
|
|
|
|
echo
|
|
|
|
echo "mvn-local is custom Fedora maven used for building maven projects"
|
|
|
|
echo "using mix of jar files provided by system and remote maven repositories."
|
|
|
|
echo "You can modify its behaviour using several environment variables:"
|
|
|
|
echo
|
|
|
|
echo "-Dmaven.repo.local [default:$(pwd)/.m2] - custom location of maven repository"
|
|
|
|
echo "-Dmaven.local.depmap.file - file containing custom dependency mapping between"
|
|
|
|
echo " groupId:artifactId and jar file. File format see:"
|
|
|
|
echo " http://fedoraproject.org/wiki/Java/JPPMavenReadme"
|
|
|
|
echo "-Dmaven.local.debug - if set maven will print additional resolving information"
|
|
|
|
echo " that can be useful for debugging resolver problems"
|
|
|
|
}
|
|
|
|
|
|
|
|
function process_args()
|
|
|
|
{
|
|
|
|
while [ $# != 0 ]; do
|
|
|
|
flag="$1"
|
|
|
|
case "$flag" in
|
|
|
|
-h|--help)
|
|
|
|
help
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
process_args "$@"
|
|
|
|
|
2010-12-21 14:25:37 +00:00
|
|
|
export M2_HOME=/usr/share/maven
|
|
|
|
echo $JAVA_HOME
|
2011-01-11 15:40:20 +00:00
|
|
|
export JAVA_HOME
|
2011-01-28 16:12:57 +00:00
|
|
|
# can't put it on command line due to
|
|
|
|
# http://jira.codehaus.org/browse/SUREFIRE-121
|
2011-04-18 08:20:16 +00:00
|
|
|
export MAVEN_OPTS="$MAVEN_OPTS -Dmaven.local.mode ${local_add}"
|
2011-02-10 10:57:07 +00:00
|
|
|
echo "Running mvn in local mode. Please report bugs to http://bugzilla.redhat.com"
|
2011-01-28 16:12:57 +00:00
|
|
|
|
2011-02-10 10:57:07 +00:00
|
|
|
$M2_HOME/bin/mvn "$@"
|