Use patched upstream launcher instead of custom script
This commit is contained in:
parent
a4670b25a9
commit
befeafe475
@ -1,7 +1,7 @@
|
||||
From 623fb2bd14731aac8fdc29e3544d765e953707fc Mon Sep 17 00:00:00 2001
|
||||
From d525c9b0b5d1bc61cff6c32164af71a449a074a9 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Fri, 8 Apr 2016 01:05:29 +0200
|
||||
Subject: [PATCH] Force SLF4J SimpleLogger re-initialization
|
||||
Subject: [PATCH 1/2] Force SLF4J SimpleLogger re-initialization
|
||||
|
||||
---
|
||||
.../main/java/org/slf4j/impl/MavenSlf4jSimpleFriend.java | 15 +++++++++++++++
|
||||
@ -40,5 +40,5 @@ index bffd18c..5af6a68 100644
|
||||
ILoggerFactory loggerFactory = LoggerFactory.getILoggerFactory();
|
||||
if ( loggerFactory instanceof SimpleLoggerFactory )
|
||||
--
|
||||
2.5.0
|
||||
2.7.4
|
||||
|
||||
|
79
0002-Adapt-mvn-script.patch
Normal file
79
0002-Adapt-mvn-script.patch
Normal file
@ -0,0 +1,79 @@
|
||||
From 207831a798420d86789fac965d7b935c4af281ca Mon Sep 17 00:00:00 2001
|
||||
From: Michael Simacek <msimacek@redhat.com>
|
||||
Date: Mon, 15 Aug 2016 10:09:29 +0200
|
||||
Subject: [PATCH 2/2] Adapt mvn script
|
||||
|
||||
---
|
||||
apache-maven/src/bin/mvn | 22 ++++++++++++++++++----
|
||||
1 file changed, 18 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
|
||||
index 2a88df2..1160c62 100755
|
||||
--- a/apache-maven/src/bin/mvn
|
||||
+++ b/apache-maven/src/bin/mvn
|
||||
@@ -22,7 +22,7 @@
|
||||
#
|
||||
# Environment Variable Prerequisites
|
||||
#
|
||||
-# JAVA_HOME Must point at your Java Development Kit installation.
|
||||
+# JAVA_HOME (Optional) Must point at your Java Development Kit installation.
|
||||
# MAVEN_OPTS (Optional) Java runtime options used when Maven is executed.
|
||||
# MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files.
|
||||
# -----------------------------------------------------------------------------
|
||||
@@ -33,12 +33,24 @@ if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||
. /etc/mavenrc
|
||||
fi
|
||||
|
||||
+ if [ -f /etc/java/maven.conf ] ; then
|
||||
+ . /etc/java/maven.conf
|
||||
+ fi
|
||||
+
|
||||
if [ -f "$HOME/.mavenrc" ] ; then
|
||||
. "$HOME/.mavenrc"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
+if [ -f /usr/share/java-utils/java-functions ] ; then
|
||||
+ . /usr/share/java-utils/java-functions
|
||||
+ set_jvm
|
||||
+ set_javacmd
|
||||
+fi
|
||||
+export JAVA_HOME
|
||||
+export JAVACMD
|
||||
+
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false;
|
||||
mingw=false;
|
||||
@@ -63,7 +75,8 @@ done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
-MAVEN_HOME=`dirname "$PRG"`/..
|
||||
+MAVEN_HOME="${_FEDORA_MAVEN_HOME:-`dirname "$PRG"`/..}"
|
||||
+unset _FEDORA_MAVEN_HOME
|
||||
|
||||
# make it fully qualified
|
||||
MAVEN_HOME=`cd "$MAVEN_HOME" && pwd`
|
||||
@@ -91,7 +104,8 @@ fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
JAVACMD="`which java`"
|
||||
-else
|
||||
+fi
|
||||
+if [ -z "$JAVACMD" ] ; then
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
|
||||
@@ -103,7 +117,7 @@ if [ ! -x "$JAVACMD" ] ; then
|
||||
fi
|
||||
|
||||
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||
-CLASSWORLDS_JAR=`echo "${MAVEN_HOME}"/boot/plexus-classworlds-*.jar`
|
||||
+CLASSWORLDS_JAR=`build-classpath plexus-classworlds`
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
--
|
||||
2.7.4
|
||||
|
16
maven.spec
16
maven.spec
@ -2,7 +2,7 @@
|
||||
|
||||
Name: maven
|
||||
Version: 3.4.0
|
||||
Release: 0.1.20160807git9f2452a%{?dist}
|
||||
Release: 0.2.20160807git9f2452a%{?dist}
|
||||
Summary: Java project management and project comprehension tool
|
||||
License: ASL 2.0
|
||||
URL: http://maven.apache.org/
|
||||
@ -15,6 +15,7 @@ Source2: mvn.1
|
||||
Source200: %{name}-script
|
||||
|
||||
Patch0: 0001-Force-SLF4J-SimpleLogger-re-initialization.patch
|
||||
Patch1: 0002-Adapt-mvn-script.patch
|
||||
|
||||
BuildRequires: maven-local
|
||||
|
||||
@ -157,6 +158,7 @@ Summary: API documentation for %{name}
|
||||
#setup -q -n apache-%{name}-%{version}%{?ver_add}
|
||||
%setup -q -n %{name}-9f2452a
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
# not really used during build, but a precaution
|
||||
rm -f maven-ant-tasks-*.jar
|
||||
@ -164,10 +166,6 @@ rm -f maven-ant-tasks-*.jar
|
||||
rm -f apache-maven/src/bin/*.bat
|
||||
sed -i 's:\r::' apache-maven/src/conf/settings.xml
|
||||
|
||||
# Update shell scripts to use unversioned classworlds
|
||||
sed -i -e s:'"${MAVEN_HOME}"/boot/plexus-classworlds-\*.jar':'"${MAVEN_HOME}"/boot/plexus-classworlds.jar':g \
|
||||
apache-maven/src/bin/mvn*
|
||||
|
||||
# Disable QA plugins which are not useful for us
|
||||
%pom_remove_plugin :animal-sniffer-maven-plugin
|
||||
%pom_remove_plugin :apache-rat-plugin
|
||||
@ -204,12 +202,11 @@ install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}
|
||||
install -d -m 755 %{buildroot}%{_datadir}/bash-completion/completions
|
||||
install -d -m 755 %{buildroot}%{_mandir}/man1
|
||||
|
||||
for cmd in mvnDebug mvnyjp; do
|
||||
sed s/@@CMD@@/$cmd/ %{SOURCE200} >%{buildroot}%{_bindir}/$cmd
|
||||
for cmd in mvn mvnDebug mvnyjp; do
|
||||
ln -s %{_datadir}/%{name}/bin/$cmd %{buildroot}%{_bindir}/$cmd
|
||||
echo ".so man1/mvn.1" >%{buildroot}%{_mandir}/man1/$cmd.1
|
||||
done
|
||||
sed s/@@CMD@@/mvn/ %{SOURCE200} >%{buildroot}%{_datadir}/%{name}/bin/mvn-script
|
||||
ln -sf %{_datadir}/%{name}/bin/mvn-script %{buildroot}%{_bindir}/mvn
|
||||
install -p -m 644 %{SOURCE2} %{buildroot}%{_mandir}/man1
|
||||
install -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/bash-completion/completions/mvn
|
||||
mv $M2_HOME/bin/m2.conf %{buildroot}%{_sysconfdir}
|
||||
@ -290,6 +287,9 @@ ln -sf $(build-classpath plexus/classworlds) \
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Aug 15 2016 Michael Simacek <msimacek@redhat.com> - 3.4.0-0.2.20160807git9f2452a
|
||||
- Use patched upstream launcher instead of custom script
|
||||
|
||||
* Mon Aug 8 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.4.0-0.1.20160807git9f2452a
|
||||
- Update to 3.4.0 snapshot
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user