Run redundant dependency checks only in mock

This commit is contained in:
Mikolaj Izdebski 2012-07-23 18:37:28 +02:00
parent 5856826cc4
commit 7d259eee4b
2 changed files with 14 additions and 4 deletions

View File

@ -33,8 +33,15 @@ function help()
# add maven.repo.local if it's not defined already
local_add="-Dmaven.repo.local=$(pwd)/.m2/"
log_file="$(umask 2 && mktemp -t mvn-rpmbuild.$$.XXXXXXXXXX)"
logfile_add="-Dmaven.resolver.logfile=$log_file"
# Check whether we are ran in mock
# FIXME: is there a better way to do this?
mock=test
test "$HOME" = /builddir && mock=:
if $mock; then
log_file="$(umask 2 && mktemp -t mvn-rpmbuild.$$.XXXXXXXXXX)"
logfile_add="-Dmaven.resolver.logfile=$log_file"
fi
function process_args()
{
@ -69,7 +76,7 @@ export JAVA_HOME
export MAVEN_OPTS="$MAVEN_OPTS -Dmaven.local.mode ${local_add} ${logfile_add}"
$M2_HOME/bin/mvn -o "$@" || exit $?
$mock || exit
sanitize() {
for obj in $1; do

View File

@ -2,7 +2,7 @@
Name: maven
Version: 3.0.4
Release: 8%{?dist}
Release: 9%{?dist}
Summary: Java project management and project comprehension tool
Group: Development/Tools
@ -367,6 +367,9 @@ ln -sf `rpm --eval '%%{_jnidir}'` %{_datadir}/%{name}/repository-jni/JPP
%changelog
* Mon Jul 23 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.4-9
- Run redundant dependency checks only in mock
* Tue Jul 17 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.4-8
- Add manual page