Implement experimental dependency checking
This commit is contained in:
parent
ebf5130c1b
commit
d1265ccd6f
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f /usr/share/java-utils/java-functions ] ; then
|
||||
. /usr/share/java-utils/java-functions
|
||||
set_jvm
|
||||
@ -32,6 +33,9 @@ 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"
|
||||
|
||||
function process_args()
|
||||
{
|
||||
while [ $# != 0 ]; do
|
||||
@ -62,6 +66,21 @@ echo $JAVA_HOME
|
||||
export JAVA_HOME
|
||||
# can't put it on command line due to
|
||||
# http://jira.codehaus.org/browse/SUREFIRE-121
|
||||
export MAVEN_OPTS="$MAVEN_OPTS -Dmaven.local.mode ${local_add}"
|
||||
export MAVEN_OPTS="$MAVEN_OPTS -Dmaven.local.mode ${local_add} ${logfile_add}"
|
||||
|
||||
$M2_HOME/bin/mvn -o "$@"
|
||||
$M2_HOME/bin/mvn -o "$@" || exit $?
|
||||
|
||||
|
||||
sanitize() {
|
||||
for obj in $1; do
|
||||
echo -n 'mvn-rpmbuild: possibly redundant dependency: '
|
||||
rpm -qf "$(readlink -f $obj)" | sed 's/-[^-]*-[^-]*$//'
|
||||
done | sort -u
|
||||
}
|
||||
|
||||
installed=$(sanitize "$(rpm -ql `package-cleanup --all --leaves | xargs` | egrep '\.(jar|pom)$')")
|
||||
used=$(sanitize "$(cat $log_file 2>/dev/null)")
|
||||
|
||||
diff - /dev/fd/3 <<<"$installed" 3<<<"$used" | grep '^< ' | sed s/..//
|
||||
|
||||
:
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Name: maven
|
||||
Version: 3.0.4
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: Java project management and project comprehension tool
|
||||
|
||||
Group: Development/Tools
|
||||
@ -97,6 +97,7 @@ Requires: sisu >= 2.1.1-2
|
||||
Requires: sonatype-oss-parent
|
||||
Requires: xbean
|
||||
Requires: xerces-j2
|
||||
Requires: yum-utils
|
||||
|
||||
|
||||
# for noarch->arch change
|
||||
@ -359,6 +360,9 @@ ln -sf `rpm --eval '%%{_jnidir}'` %{_datadir}/%{name}/repository-jni/JPP
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Jun 11 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.4-7
|
||||
- Implement redundant dependency checks
|
||||
|
||||
* Thu May 24 2012 Krzysztof Daniel <kdaniel@redhat.com> 3.0.4-6
|
||||
- Bug 824789 -Use the version if it is possible.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user