#7 Sync stream-maven-3.6 with stream-javapackages-tools-201901
Merged 2 months ago by mizdebsk. Opened 2 months ago by mizdebsk.

file modified
+5 -14

@@ -1,14 +1,14 @@ 

- From 9e51d86115b066cbf3d44392810b3f6fd63fdfc9 Mon Sep 17 00:00:00 2001

+ From 056c94f86450c7c27f5bb11f98653c73bfe3d8e4 Mon Sep 17 00:00:00 2001

  From: Michael Simacek <msimacek@redhat.com>

  Date: Wed, 1 Feb 2017 14:54:26 +0100

- Subject: [PATCH 1/3] Adapt mvn script

+ Subject: [PATCH 1/4] Adapt mvn script

  

  ---

-  apache-maven/src/bin/mvn | 19 ++++++++++++++++---

-  1 file changed, 16 insertions(+), 3 deletions(-)

+  apache-maven/src/bin/mvn | 17 +++++++++++++++--

+  1 file changed, 15 insertions(+), 2 deletions(-)

  

  diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn

- index a554c6617..818cf70b8 100755

+ index a554c6617..0c07ba6e2 100755

  --- a/apache-maven/src/bin/mvn

  +++ b/apache-maven/src/bin/mvn

  @@ -22,7 +22,7 @@

@@ -55,15 +55,6 @@ 

   

   # make it fully qualified

   MAVEN_HOME=`cd "$MAVEN_HOME" && pwd`

- @@ -102,7 +115,7 @@ if [ ! -x "$JAVACMD" ] ; then

-    exit 1

-  fi

-  

- -CLASSWORLDS_JAR=`echo "${MAVEN_HOME}"/boot/plexus-classworlds-*.jar`

- +CLASSWORLDS_JAR=`build-classpath plexus-classworlds`

-  CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher

-  

-  # For Cygwin, switch paths to Windows format before running java

  -- 

  2.21.0

  

@@ -1,7 +1,7 @@ 

- From 4fa2cfaa19a0752a656b2a223a77c3af25d2de12 Mon Sep 17 00:00:00 2001

+ From 7610a10691e680db00edcbd4ce6767a30641cd71 Mon Sep 17 00:00:00 2001

  From: Michael Simacek <msimacek@redhat.com>

  Date: Tue, 6 Jun 2017 13:47:43 +0200

- Subject: [PATCH 2/3] Invoke logback via reflection

+ Subject: [PATCH 2/4] Invoke logback via reflection

  

  ---

   .../logging/impl/LogbackConfiguration.java    | 19 ++++++++++++++-----

@@ -1,7 +1,7 @@ 

- From c533aada209c517c1666989d7115672e7522aa72 Mon Sep 17 00:00:00 2001

+ From 56d10f48ebb2cdaf3882dc8afbef65a2ab529040 Mon Sep 17 00:00:00 2001

  From: Sylwester Lachiewicz <slachiewicz@apache.org>

  Date: Sat, 13 Oct 2018 04:16:44 +0200

- Subject: [PATCH 3/3] [MNG-6642] Revert "[MNG-5995] Remove dependency to

+ Subject: [PATCH 3/4] [MNG-6642] Revert "[MNG-5995] Remove dependency to

   maven-compat (#185)"

  

  This partially reverts commit bb3ec5da71d26d105972392f0a20bc61bc5d8c53 to restore working with Tycho P2 repository.

@@ -0,0 +1,51 @@ 

+ From c8933d155694ce37b1d4be59a744c8f7cbde6bb5 Mon Sep 17 00:00:00 2001

+ From: Mikolaj Izdebski <mizdebsk@redhat.com>

+ Date: Mon, 1 Jul 2019 09:51:56 +0200

+ Subject: [PATCH 4/4] Use non-shaded HTTP wagon

+ 

+ ---

+  apache-maven/pom.xml | 15 ---------------

+  pom.xml              |  1 -

+  2 files changed, 16 deletions(-)

+ 

+ diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml

+ index 2686570af..d22ae121d 100644

+ --- a/apache-maven/pom.xml

+ +++ b/apache-maven/pom.xml

+ @@ -63,21 +63,6 @@ under the License.

+      <dependency>

+        <groupId>org.apache.maven.wagon</groupId>

+        <artifactId>wagon-http</artifactId>

+ -      <classifier>shaded</classifier>

+ -      <exclusions>

+ -        <exclusion>

+ -          <groupId>org.apache.httpcomponents</groupId>

+ -          <artifactId>httpclient</artifactId>

+ -        </exclusion>

+ -        <exclusion>

+ -          <groupId>org.apache.httpcomponents</groupId>

+ -          <artifactId>httpcore</artifactId>

+ -        </exclusion>

+ -        <exclusion>

+ -          <groupId>org.apache.maven.wagon</groupId>

+ -          <artifactId>wagon-http-shared</artifactId>

+ -        </exclusion>

+ -      </exclusions>

+      </dependency>

+      <dependency>

+        <groupId>org.slf4j</groupId>

+ diff --git a/pom.xml b/pom.xml

+ index 237cdc39e..85436c54d 100644

+ --- a/pom.xml

+ +++ b/pom.xml

+ @@ -324,7 +324,6 @@ under the License.

+          <groupId>org.apache.maven.wagon</groupId>

+          <artifactId>wagon-http</artifactId>

+          <version>${wagonVersion}</version>

+ -        <classifier>shaded</classifier>

+          <exclusions>

+            <exclusion>

+              <groupId>commons-logging</groupId>

+ -- 

+ 2.21.0

+ 

file removed
-52

@@ -1,52 +0,0 @@ 

- #!/bin/sh

- 

- for f in /etc/mavenrc /etc/java/maven.conf "$HOME/.mavenrc"; do

-   [ -f "$f" ] && . "$f"

- done

- 

- 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

- 

- export M2_HOME="${M2_HOME:-/usr/share/maven}"

- 

- 

- # traverses directory structure from process work directory to filesystem root

- # first directory with .mvn subdirectory is considered project base directory

- find_maven_basedir() {

- (

-   basedir="`pwd`"

-   wdir="`pwd`"

-   while [ "$wdir" != '/' ] ; do

-     if [ -d "$wdir"/.mvn ] ; then

-       basedir=$wdir

-       break

-     fi

-     wdir="`cd "$wdir/.."; pwd`"

-   done

-   echo "${basedir}"

- )

- }

- 

- export MAVEN_PROJECTBASEDIR="${MAVEN_BASEDIR:-`find_maven_basedir`}"

- 

- export MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"

- 

- project_opts=$(

-     [ -e "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config" ] &&

- 	cat /tmp/foo "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config")

- 

- exec "$JAVACMD" \

-     $project_opts \

-     $MAVEN_OPTS \

-     $MAVEN_DEBUG_OPTS \

-     -classpath $(build-classpath plexus-classworlds) \

-     -Dclassworlds.conf="${M2_HOME}/bin/m2.conf" \

-     -Dmaven.home="${M2_HOME}" \

-     -Dmaven.multiModuleProjectDirectory="${MAVEN_PROJECTBASEDIR}" \

-     org.codehaus.plexus.classworlds.launcher.Launcher \

-     "$@"

file modified
+64 -99

@@ -22,132 +22,95 @@ 

  # Used only when %%without logback is in effect

  Patch2:         0002-Invoke-logback-via-reflection.patch

  Patch3:         0003-MNG-6642-Revert-MNG-5995-Remove-dependency-to-maven-.patch

+ Patch4:         0004-Use-non-shaded-HTTP-wagon.patch

  

  BuildRequires:  maven-local

- BuildRequires:  mvn(com.google.inject:guice::no_aop:)

- BuildRequires:  mvn(commons-cli:commons-cli)

+ BuildRequires:  %{?module_prefix}mvn(com.google.inject:guice::no_aop:)

+ BuildRequires:  %{?module_prefix}mvn(commons-cli:commons-cli)

  BuildRequires:  mvn(commons-jxpath:commons-jxpath)

- BuildRequires:  mvn(javax.annotation:jsr250-api)

- BuildRequires:  mvn(javax.inject:javax.inject)

+ BuildRequires:  %{?module_prefix}mvn(javax.annotation:jsr250-api)

+ BuildRequires:  %{?module_prefix}mvn(javax.inject:javax.inject)

  BuildRequires:  mvn(junit:junit)

- BuildRequires:  mvn(org.apache.commons:commons-lang3)

+ BuildRequires:  %{?module_prefix}mvn(org.apache.commons:commons-lang3)

  BuildRequires:  mvn(org.apache.maven:maven-parent:pom:)

  BuildRequires:  mvn(org.apache.maven.plugins:maven-assembly-plugin)

  BuildRequires:  mvn(org.apache.maven.plugins:maven-dependency-plugin)

- BuildRequires:  mvn(org.apache.maven.resolver:maven-resolver-api)

- BuildRequires:  mvn(org.apache.maven.resolver:maven-resolver-connector-basic)

- BuildRequires:  mvn(org.apache.maven.resolver:maven-resolver-impl)

- BuildRequires:  mvn(org.apache.maven.resolver:maven-resolver-spi)

- BuildRequires:  mvn(org.apache.maven.resolver:maven-resolver-transport-wagon)

- BuildRequires:  mvn(org.apache.maven.resolver:maven-resolver-util)

- BuildRequires:  mvn(org.apache.maven.shared:maven-shared-utils)

- BuildRequires:  mvn(org.apache.maven.wagon:wagon-file)

- BuildRequires:  mvn(org.apache.maven.wagon:wagon-http::shaded:)

- BuildRequires:  mvn(org.apache.maven.wagon:wagon-provider-api)

+ BuildRequires:  %{?module_prefix}mvn(org.apache.maven.resolver:maven-resolver-api)

+ BuildRequires:  %{?module_prefix}mvn(org.apache.maven.resolver:maven-resolver-connector-basic)

+ BuildRequires:  %{?module_prefix}mvn(org.apache.maven.resolver:maven-resolver-impl)

+ BuildRequires:  %{?module_prefix}mvn(org.apache.maven.resolver:maven-resolver-spi)

+ BuildRequires:  %{?module_prefix}mvn(org.apache.maven.resolver:maven-resolver-transport-wagon)

+ BuildRequires:  %{?module_prefix}mvn(org.apache.maven.resolver:maven-resolver-util)

+ BuildRequires:  %{?module_prefix}mvn(org.apache.maven.shared:maven-shared-utils)

+ BuildRequires:  %{?module_prefix}mvn(org.apache.maven.wagon:wagon-file)

+ BuildRequires:  %{?module_prefix}mvn(org.apache.maven.wagon:wagon-http)

+ BuildRequires:  %{?module_prefix}mvn(org.apache.maven.wagon:wagon-provider-api)

  BuildRequires:  mvn(org.codehaus.modello:modello-maven-plugin) >= 1.10.0

  BuildRequires:  mvn(org.codehaus.mojo:build-helper-maven-plugin)

- BuildRequires:  mvn(org.codehaus.plexus:plexus-classworlds)

- BuildRequires:  mvn(org.codehaus.plexus:plexus-component-annotations)

+ BuildRequires:  %{?module_prefix}mvn(org.codehaus.plexus:plexus-classworlds)

+ BuildRequires:  %{?module_prefix}mvn(org.codehaus.plexus:plexus-component-annotations)

  BuildRequires:  mvn(org.codehaus.plexus:plexus-component-metadata)

- BuildRequires:  mvn(org.codehaus.plexus:plexus-interpolation)

- BuildRequires:  mvn(org.codehaus.plexus:plexus-utils) >= 3.2.0

- BuildRequires:  mvn(org.eclipse.sisu:org.eclipse.sisu.inject)

- BuildRequires:  mvn(org.eclipse.sisu:org.eclipse.sisu.plexus)

+ BuildRequires:  %{?module_prefix}mvn(org.codehaus.plexus:plexus-interpolation)

+ BuildRequires:  %{?module_prefix}mvn(org.codehaus.plexus:plexus-utils) >= 3.2.0

+ BuildRequires:  %{?module_prefix}mvn(org.eclipse.sisu:org.eclipse.sisu.inject)

+ BuildRequires:  %{?module_prefix}mvn(org.eclipse.sisu:org.eclipse.sisu.plexus)

  BuildRequires:  mvn(org.eclipse.sisu:sisu-maven-plugin)

- BuildRequires:  mvn(org.fusesource.jansi:jansi)

+ BuildRequires:  %{?module_prefix}mvn(org.fusesource.jansi:jansi)

  BuildRequires:  mvn(org.mockito:mockito-core) >= 2

- BuildRequires:  mvn(org.slf4j:jcl-over-slf4j)

- BuildRequires:  mvn(org.slf4j:slf4j-api)

- BuildRequires:  mvn(org.slf4j:slf4j-simple)

- BuildRequires:  mvn(org.sonatype.plexus:plexus-cipher)

- BuildRequires:  mvn(org.sonatype.plexus:plexus-sec-dispatcher)

+ BuildRequires:  %{?module_prefix}mvn(org.slf4j:jcl-over-slf4j)

+ BuildRequires:  %{?module_prefix}mvn(org.slf4j:slf4j-api)

+ BuildRequires:  %{?module_prefix}mvn(org.slf4j:slf4j-simple)

+ BuildRequires:  %{?module_prefix}mvn(org.sonatype.plexus:plexus-cipher)

+ BuildRequires:  %{?module_prefix}mvn(org.sonatype.plexus:plexus-sec-dispatcher)

  BuildRequires:  mvn(org.xmlunit:xmlunit-core)

  BuildRequires:  mvn(org.xmlunit:xmlunit-matchers)

  

  BuildRequires:  slf4j-sources = %{bundled_slf4j_version}

  

+ %if 0%{?module_prefix:1}

+ %package -n %{module_prefix}%{name}

+ Summary: %{summary}

+ %endif

  

- Requires:       %{name}-lib = %{epoch}:%{version}-%{release}

+ Requires: %{?module_prefix}%{name}-lib = %{epoch}:%{version}-%{release}

  

  Requires(post): (alternatives if fedora-release >= 30 else chkconfig)

  Requires(postun): (alternatives if fedora-release >= 30 else chkconfig)

  

+ # Require full javapackages-tools since maven-script uses

+ # /usr/share/java-utils/java-functions

+ Requires: javapackages-tools

+ 

  # Theoretically Maven might be usable with just JRE, but typical Maven

  # workflow requires full JDK, so we recommend it here.

  Recommends: java-devel

  

- # XMvn does generate auto-requires, but explicit requires are still

- # needed because some symlinked JARs are not present in Maven POMs or

- # their dependency scope prevents them from being added automatically

- # by XMvn.  It would be possible to explicitly specify only

- # dependencies which are not generated automatically, but adding

- # everything seems to be easier.

- Requires:       aopalliance

- Requires:       apache-commons-cli

- Requires:       apache-commons-codec

- Requires:       apache-commons-io

- Requires:       apache-commons-lang3

- Requires:       apache-commons-logging

- Requires:       atinject

- Requires:       cdi-api

- Requires:       geronimo-annotation

- Requires:       google-guice

- Requires:       guava

- Requires:       hawtjni-runtime

- Requires:       httpcomponents-client

- Requires:       httpcomponents-core

- Requires:       jansi

- Requires:       jansi-native

- Requires:       jcl-over-slf4j

- Requires:       maven-resolver-api

- Requires:       maven-resolver-connector-basic

- Requires:       maven-resolver-impl

- Requires:       maven-resolver-spi

- Requires:       maven-resolver-transport-wagon

- Requires:       maven-resolver-util

- Requires:       maven-shared-utils

- Requires:       maven-wagon-file

- Requires:       maven-wagon-http

- Requires:       maven-wagon-http-shared

- Requires:       maven-wagon-provider-api

- Requires:       plexus-cipher

- Requires:       plexus-classworlds

- Requires:       plexus-containers-component-annotations

- Requires:       plexus-interpolation

- Requires:       plexus-sec-dispatcher

- Requires:       plexus-utils

- Requires:       sisu-inject

- Requires:       sisu-plexus

- Requires:       slf4j

+ %if 0%{?module_prefix:1}

+ %description -n %{module_prefix}%{name}

+ %{summary}.

+ %endif

  

  %description

  Maven is a software project management and comprehension tool. Based on the

  concept of a project object model (POM), Maven can manage a project's build,

  reporting and documentation from a central piece of information.

  

- %package        lib

+ %package -n %{?module_prefix}%{name}-lib

  Summary:        Core part of Maven

  # If XMvn is part of the same RPM transaction then it should be

  # installed first to avoid triggering rhbz#1014355.

  OrderWithRequires: xmvn-minimal

  

- # Require full javapackages-tools since maven-script uses

- # /usr/share/java-utils/java-functions

- Requires:       javapackages-tools

  # 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

+ %description -n %{?module_prefix}%{name}-lib

  Core part of Apache Maven that can be used as a library.

  

- %package        javadoc

- Summary:        API documentation for %{name}

- 

- %description    javadoc

- %{summary}.

+ %{?javadoc_package}

  

  %prep

  %setup -q -n apache-%{name}-%{version}

@@ -155,6 +118,7 @@ 

  %patch1 -p1

  %patch2 -p1

  %patch3 -p1

+ %patch4 -p1

  

  # not really used during build, but a precaution

  find -name '*.jar' -not -path '*/test/*' -delete

@@ -182,6 +146,7 @@ 

  

  %mvn_package :apache-maven __noinstall

  

+ %pom_change_dep :jansi :::runtime maven-embedder

  %pom_remove_dep -r :logback-classic

  

  %mvn_alias :maven-resolver-provider :maven-aether-provider

@@ -207,17 +172,6 @@ 

  cp -a $M2_HOME/{bin,lib,boot} %{buildroot}%{homedir}/

  xmvn-subst -R %{buildroot} -s %{buildroot}%{homedir}

  

- # Transitive deps of wagon-http, missing because of unshading

- build-jar-repository -s -p %{buildroot}%{homedir}/lib \

-     commons-{codec,logging} httpcomponents/{httpclient,httpcore} maven-wagon/http-shared

- 

- # Transitive deps of cdi-api that should have been excluded

- rm %{buildroot}%{homedir}/lib/jboss-interceptors*.jar

- rm %{buildroot}%{homedir}/lib/javax.el-api*.jar

- 

- # Native lib whose extraction we suppressed

- ln -s %{_jnidir}/jansi-native/jansi-linux.jar %{buildroot}%{homedir}/lib/

- 

  install -p -m 644 %{SOURCE2} %{buildroot}%{homedir}/bin/

  gzip -9 %{buildroot}%{homedir}/bin/mvn.1

  install -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/bash-completion/completions/mvn%{?maven_version_suffix}

@@ -234,18 +188,26 @@ 

  touch %{buildroot}%{_bindir}/{mvn,mvnDebug}

  touch %{buildroot}%{_mandir}/man1/{mvn,mvnDebug}.1

  

+ # Versioned commands and manpages

+ %if 0%{?maven_version_suffix:1}

+ ln -s %{homedir}/bin/mvn %{buildroot}%{_bindir}/mvn%{maven_version_suffix}

+ ln -s %{homedir}/bin/mvnDebug %{buildroot}%{_bindir}/mvnDebug%{maven_version_suffix}

+ ln -s %{homedir}/bin/mvn.1.gz %{buildroot}%{_mandir}/man1/mvn%{maven_version_suffix}.1.gz

+ ln -s %{homedir}/bin/mvnDebug.1.gz %{buildroot}%{_mandir}/man1/mvnDebug%{maven_version_suffix}.1.gz

+ %endif

  

- %post

+ 

+ %post -n %{?module_prefix}%{name}

  update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alternatives_priority}0 \

  --slave %{_bindir}/mvnDebug mvnDebug %{homedir}/bin/mvnDebug \

  --slave %{_mandir}/man1/mvn.1.gz mvn1 %{homedir}/bin/mvn.1.gz \

  --slave %{_mandir}/man1/mvnDebug.1.gz mvnDebug1 %{homedir}/bin/mvn.1.gz \

  

- %postun

+ %postun -n %{?module_prefix}%{name}

  [[ $1 -eq 0 ]] && update-alternatives --remove %{name} %{homedir}/bin/mvn

  

  

- %files lib -f .mfiles

+ %files -n %{?module_prefix}%{name}-lib -f .mfiles

  %doc README.md

  %license LICENSE NOTICE

  %{homedir}

@@ -255,15 +217,18 @@ 

  %config(noreplace) %{confdir}/settings.xml

  %config(noreplace) %{confdir}/logging/simplelogger.properties

  

- %files

+ %files -n %{?module_prefix}%{name}

  %ghost %{_bindir}/mvn

  %ghost %{_bindir}/mvnDebug

  %{_datadir}/bash-completion

  %ghost %{_mandir}/man1/mvn.1.gz

  %ghost %{_mandir}/man1/mvnDebug.1.gz

- 

- %files javadoc -f .mfiles-javadoc

- %license LICENSE NOTICE

+ %if 0%{?maven_version_suffix:1}

+ %{_bindir}/mvn%{maven_version_suffix}

+ %{_bindir}/mvnDebug%{maven_version_suffix}

+ %{_mandir}/man1/mvn%{maven_version_suffix}.1.gz

+ %{_mandir}/man1/mvnDebug%{maven_version_suffix}.1.gz

+ %endif

  

  

  %changelog