Downgrade to 3.3.9

This commit is contained in:
Michael Simacek 2017-02-01 15:08:45 +01:00
parent ba9f901dfb
commit a75fa83efe
6 changed files with 56 additions and 183 deletions

View File

@ -1,27 +0,0 @@
From ed8b817b3a4c6367a51c2c5dbb969d1defdc3aa5 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Fri, 18 Nov 2016 18:56:25 +0100
Subject: [PATCH] Compatibility with polyglot
---
.../java/org/apache/maven/model/superpom/DefaultSuperPomProvider.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/superpom/DefaultSuperPomProvider.java b/maven-model-builder/src/main/java/org/apache/maven/model/superpom/DefaultSuperPomProvider.java
index 0c720d1..76f733a 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/superpom/DefaultSuperPomProvider.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/superpom/DefaultSuperPomProvider.java
@@ -86,7 +86,9 @@ public Model getSuperModel( final String version )
}
- superModel = modelProcessor.read( is, null );
+ Map<String, String> options = new HashMap<>();
+ options.put( "xml:4.0.0", "xml:4.0.0" );
+ superModel = modelProcessor.read( is, options );
superPoms.put( effectiveVersion, superModel );
}
--
2.7.4

View File

@ -1,4 +1,4 @@
From d525c9b0b5d1bc61cff6c32164af71a449a074a9 Mon Sep 17 00:00:00 2001
From 0ace877175e4fa35f1de3bf37edc1a05b6927d47 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 8 Apr 2016 01:05:29 +0200
Subject: [PATCH 1/2] Force SLF4J SimpleLogger re-initialization
@ -19,7 +19,7 @@ index bffd18c..5af6a68 100644
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -30,6 +32,19 @@
@@ -30,6 +32,19 @@ public class MavenSlf4jSimpleFriend
{
public static void init()
{
@ -40,5 +40,5 @@ index bffd18c..5af6a68 100644
ILoggerFactory loggerFactory = LoggerFactory.getILoggerFactory();
if ( loggerFactory instanceof SimpleLoggerFactory )
--
2.7.4
2.9.3

View File

@ -1,66 +0,0 @@
From 1390c2b59fe82c4b0f76b18782e9ed28b82a71e8 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 18 Nov 2016 08:51:46 +0100
Subject: [PATCH] Use exec-maven-plugin instead of groovy-maven-plugin
---
maven-slf4j-provider/pom.xml | 20 ++++++++++++--------
.../src/main/script/patch-slf4j-simple.groovy | 2 +-
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/maven-slf4j-provider/pom.xml b/maven-slf4j-provider/pom.xml
index ecb93e8..039b332 100644
--- a/maven-slf4j-provider/pom.xml
+++ b/maven-slf4j-provider/pom.xml
@@ -95,22 +95,26 @@ under the License.
</executions>
</plugin>
<plugin>
- <groupId>org.codehaus.gmaven</groupId>
- <artifactId>groovy-maven-plugin</artifactId>
- <version>2.0</version>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.5.0</version>
<executions>
<execution>
<id>patch-slf4j-simple</id>
<phase>process-sources</phase>
<goals>
- <goal>execute</goal>
+ <goal>exec</goal>
</goals>
- <configuration>
- <source>${project.basedir}/src/main/script/patch-slf4j-simple.groovy</source>
- </configuration>
</execution>
</executions>
+ <configuration>
+ <executable>groovy</executable>
+ <workingDirectory>${project.basedir}</workingDirectory>
+ <arguments>
+ <argument>src/main/script/patch-slf4j-simple.groovy</argument>
+ </arguments>
+ </configuration>
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
diff --git a/maven-slf4j-provider/src/main/script/patch-slf4j-simple.groovy b/maven-slf4j-provider/src/main/script/patch-slf4j-simple.groovy
index bba8646..a6ad10b 100644
--- a/maven-slf4j-provider/src/main/script/patch-slf4j-simple.groovy
+++ b/maven-slf4j-provider/src/main/script/patch-slf4j-simple.groovy
@@ -18,7 +18,7 @@
* under the License.
*/
-dir = new File( basedir, 'target/generated-sources/slf4j-simple/org/slf4j/impl' );
+dir = new File( '.', 'target/generated-sources/slf4j-simple/org/slf4j/impl' );
file = new File( dir, 'StaticLoggerBinder.java' );
content = file.text;
--
2.7.4

View File

@ -1,26 +1,31 @@
From 207831a798420d86789fac965d7b935c4af281ca Mon Sep 17 00:00:00 2001
From 4c12151d239f98812ac77703a0e892197387699a Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Mon, 15 Aug 2016 10:09:29 +0200
Date: Wed, 1 Feb 2017 14:54:26 +0100
Subject: [PATCH 2/2] Adapt mvn script
---
apache-maven/src/bin/mvn | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
apache-maven/src/bin/mvn | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index 2a88df2..1160c62 100755
index 6875628..3b87936 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -22,7 +22,7 @@
@@ -21,12 +21,9 @@
# ----------------------------------------------------------------------------
# Maven2 Start Up Batch script
#
# 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
-# Required ENV vars:
-# ------------------
-# JAVA_HOME - location of a JDK home dir
-#
# Optional ENV vars
# -----------------
+# JAVA_HOME - location of a JDK home dir
# M2_HOME - location of maven2's installed home dir
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
# e.g. to debug Maven itself, use
@@ -40,12 +37,24 @@ if [ -z "$MAVEN_SKIP_RC" ] ; then
. /etc/mavenrc
fi
@ -42,38 +47,28 @@ index 2a88df2..1160c62 100755
+export JAVA_HOME
+export JAVACMD
+
# OS specific support. $var _must_ be set to either true or false.
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
mingw=false;
@@ -63,7 +75,8 @@ done
darwin=false;
@@ -111,7 +120,8 @@ if [ -z "$M2_HOME" ] ; then
saveddir=`pwd`
saveddir=`pwd`
-MAVEN_HOME=`dirname "$PRG"`/..
+MAVEN_HOME="${_FEDORA_MAVEN_HOME:-`dirname "$PRG"`/..}"
+unset _FEDORA_MAVEN_HOME
- M2_HOME=`dirname "$PRG"`/..
+ M2_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
# make it fully qualified
M2_HOME=`cd "$M2_HOME" && pwd`
@@ -238,7 +248,7 @@ export MAVEN_CMD_LINE_ARGS
exec "$JAVACMD" \
$MAVEN_OPTS \
$MAVEN_DEBUG_OPTS \
- -classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \
+ -classpath "$(build-classpath plexus-classworlds)" \
"-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${CLASSWORLDS_LAUNCHER} "$@"
--
2.7.4
2.9.3

View File

@ -1,25 +1,18 @@
%global ver_add -SNAPSHOT
%global bundled_slf4j_version 1.7.22
Name: maven
Version: 3.4.0
Release: 0.6.20161118git8ae1a3e%{?dist}
Epoch: 1
Version: 3.3.9
Release: 1%{?dist}
Summary: Java project management and project comprehension tool
License: ASL 2.0
URL: http://maven.apache.org/
BuildArch: noarch
#Source0: http://archive.apache.org/dist/%{name}/%{name}-3/%{version}/source/apache-%{name}-%{version}-src.tar.gz
Source0: https://git-wip-us.apache.org/repos/asf?p=maven.git;a=snapshot;h=8ae1a3e;sf=tgz#/apache-%{name}-%{version}-SNAPSHOT-src.tar.gz
Source0: http://archive.apache.org/dist/%{name}/%{name}-3/%{version}/source/apache-%{name}-%{version}-src.tar.gz
Source1: maven-bash-completion
Source2: mvn.1
Source200: %{name}-script
Patch0: 0001-Force-SLF4J-SimpleLogger-re-initialization.patch
Patch1: 0002-Adapt-mvn-script.patch
Patch2: 0001-Use-exec-maven-plugin-instead-of-groovy-maven-plugin.patch
# TODO report upstream
Patch3: 0001-Compatibility-with-polyglot.patch
BuildRequires: maven-local
@ -80,17 +73,8 @@ BuildRequires: xmlunit
BuildRequires: mvn(ch.qos.logback:logback-classic)
BuildRequires: mvn(org.mockito:mockito-core)
BuildRequires: mvn(org.codehaus.modello:modello-maven-plugin)
BuildRequires: gossip
BuildRequires: jansi
BuildRequires: maven-shared-utils
BuildRequires: groovy
BuildRequires: maven-plugin-exec
BuildRequires: maven-plugin-build-helper
BuildRequires: maven-dependency-plugin
BuildRequires: slf4j-sources = %{bundled_slf4j_version}
Requires: %{name}-lib = %{version}-%{release}
Requires: %{name}-lib = %{epoch}:%{version}-%{release}
# Theoretically Maven might be usable with just JRE, but typical Maven
# workflow requires full JDK, so we recommend it here.
@ -136,9 +120,6 @@ Requires: plexus-utils
Requires: sisu-inject
Requires: sisu-plexus
Requires: slf4j
Requires: gossip
Requires: jansi
Requires: maven-shared-utils
# Temporary fix for broken sisu
Requires: cdi-api
@ -155,12 +136,6 @@ Summary: Core part of Maven
# installed first to avoid triggering rhbz#1014355.
OrderWithRequires: xmvn-minimal
# Maven upstream uses patched version of SLF4J. They unpack
# slf4j-simple-sources.jar, apply non-upstreamable, Maven-specific
# patch (using a script written in Groovy), compile and package as
# maven-slf4j-provider.jar, together with Maven-specific additions.
Provides: bundled(slf4j) = %{bundled_slf4j_version}
%description lib
Core part of Apache Maven that can be used as a library.
@ -171,17 +146,16 @@ Summary: API documentation for %{name}
%{summary}.
%prep
#setup -q -n apache-%{name}-%{version}%{?ver_add}
%setup -q -n %{name}-8ae1a3e
%setup -q -n apache-%{name}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
# not really used during build, but a precaution
rm -f maven-ant-tasks-*.jar
find -name '*.jar' -not -path '*/test/*' -delete
find -name '*.class' -delete
find -name '*.bat' -delete
rm -f apache-maven/src/bin/*.bat
sed -i 's:\r::' apache-maven/src/conf/settings.xml
# Disable QA plugins which are not useful for us
@ -224,7 +198,6 @@ 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
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}
@ -253,12 +226,8 @@ ln -sf $(build-classpath plexus/classworlds) \
commons-io \
commons-lang \
commons-lang3 \
gossip/gossip-bootstrap \
gossip/gossip-core \
gossip/gossip-slf4j \
guava \
google-guice-no_aop \
jansi/jansi \
atinject \
jsoup/jsoup \
jsr-305 \
@ -270,7 +239,7 @@ ln -sf $(build-classpath plexus/classworlds) \
plexus/plexus-sec-dispatcher \
plexus/utils \
slf4j/api \
maven-shared-utils/maven-shared-utils \
slf4j/simple \
maven-wagon/file \
maven-wagon/http-shaded \
maven-wagon/http-shared \
@ -287,7 +256,6 @@ ln -sf $(build-classpath plexus/classworlds) \
%files lib -f .mfiles
%doc LICENSE NOTICE README.md
%{_datadir}/%{name}
%attr(0755,root,root) %{_datadir}/%{name}/bin/mvn-script
%dir %{_javadir}/%{name}
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/logging
@ -305,6 +273,9 @@ ln -sf $(build-classpath plexus/classworlds) \
%changelog
* Wed Feb 01 2017 Michael Simacek <msimacek@redhat.com> - 1:3.3.9-1
- Downgrade to 3.3.9
* Wed Dec 14 2016 Michael Simacek <msimacek@redhat.com> - 3.4.0-0.6.20161118git8ae1a3e
- Bump slf4j version

View File

@ -1 +1 @@
201c86b1f6f54f1193494404765b1abe apache-maven-3.4.0-SNAPSHOT-src.tar.gz
SHA512 (apache-maven-3.3.9-src.tar.gz) = 696576a52800f0a475c15779075e5e77a1b426848341dd033f86d127506bfcd1c6be5c73183ffa2d85bbb7ec369c1938f9f0d1f76166b8d2e98bf77c7b7f54b2