This commit is contained in:
parent
03d4b001de
commit
9b57c5837d
@ -1,82 +0,0 @@
|
|||||||
From e3d2a29743e1b36beaf1063567da9dfd2e5a8aa8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michael Simacek <msimacek@redhat.com>
|
|
||||||
Date: Mon, 26 Feb 2018 16:21:04 +0100
|
|
||||||
Subject: [PATCH] Restore compatibility with current maven
|
|
||||||
|
|
||||||
---
|
|
||||||
.../maven/shared/utils/logging/AnsiMessageBuilder.java | 18 ++++++++++++++++++
|
|
||||||
.../maven/shared/utils/logging/MessageBuilder.java | 3 +++
|
|
||||||
.../shared/utils/logging/PlainMessageBuilder.java | 18 ++++++++++++++++++
|
|
||||||
3 files changed, 39 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/apache/maven/shared/utils/logging/AnsiMessageBuilder.java b/src/main/java/org/apache/maven/shared/utils/logging/AnsiMessageBuilder.java
|
|
||||||
index 0103a6b..23b6d14 100644
|
|
||||||
--- a/src/main/java/org/apache/maven/shared/utils/logging/AnsiMessageBuilder.java
|
|
||||||
+++ b/src/main/java/org/apache/maven/shared/utils/logging/AnsiMessageBuilder.java
|
|
||||||
@@ -153,4 +153,22 @@ class AnsiMessageBuilder
|
|
||||||
{
|
|
||||||
return ansi.toString();
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ public MessageBuilder debug(Object message) {
|
|
||||||
+ a(message);
|
|
||||||
+ return this;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ public MessageBuilder info(Object message) {
|
|
||||||
+ a(message);
|
|
||||||
+ return this;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ public MessageBuilder error(Object message) {
|
|
||||||
+ a(message);
|
|
||||||
+ return this;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
diff --git a/src/main/java/org/apache/maven/shared/utils/logging/MessageBuilder.java b/src/main/java/org/apache/maven/shared/utils/logging/MessageBuilder.java
|
|
||||||
index b60bb4e..1dc2624 100644
|
|
||||||
--- a/src/main/java/org/apache/maven/shared/utils/logging/MessageBuilder.java
|
|
||||||
+++ b/src/main/java/org/apache/maven/shared/utils/logging/MessageBuilder.java
|
|
||||||
@@ -26,6 +26,9 @@ package org.apache.maven.shared.utils.logging;
|
|
||||||
*/
|
|
||||||
public interface MessageBuilder
|
|
||||||
{
|
|
||||||
+ MessageBuilder debug( Object message );
|
|
||||||
+ MessageBuilder info( Object message );
|
|
||||||
+ MessageBuilder error( Object message );
|
|
||||||
/**
|
|
||||||
* Append message content in success style.
|
|
||||||
* By default, bold green
|
|
||||||
diff --git a/src/main/java/org/apache/maven/shared/utils/logging/PlainMessageBuilder.java b/src/main/java/org/apache/maven/shared/utils/logging/PlainMessageBuilder.java
|
|
||||||
index 2eec001..5236e99 100644
|
|
||||||
--- a/src/main/java/org/apache/maven/shared/utils/logging/PlainMessageBuilder.java
|
|
||||||
+++ b/src/main/java/org/apache/maven/shared/utils/logging/PlainMessageBuilder.java
|
|
||||||
@@ -139,4 +139,22 @@ class PlainMessageBuilder
|
|
||||||
{
|
|
||||||
return buffer.toString();
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ public MessageBuilder debug(Object message) {
|
|
||||||
+ a(message);
|
|
||||||
+ return this;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ public MessageBuilder info(Object message) {
|
|
||||||
+ a(message);
|
|
||||||
+ return this;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ public MessageBuilder error(Object message) {
|
|
||||||
+ a(message);
|
|
||||||
+ return this;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.14.3
|
|
||||||
|
|
BIN
maven-shared-utils-3.3.4-source-release.zip
(Stored with Git LFS)
BIN
maven-shared-utils-3.3.4-source-release.zip
(Stored with Git LFS)
Binary file not shown.
BIN
maven-shared-utils-3.4.2-source-release.zip
(Stored with Git LFS)
Normal file
BIN
maven-shared-utils-3.4.2-source-release.zip
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -10,13 +10,14 @@
|
|||||||
|
|
||||||
<property name="project.groupId" value="org.apache.maven.shared"/>
|
<property name="project.groupId" value="org.apache.maven.shared"/>
|
||||||
<property name="project.artifactId" value="maven-shared-utils"/>
|
<property name="project.artifactId" value="maven-shared-utils"/>
|
||||||
<property name="project.version" value="3.3.4"/>
|
<property name="project.version" value="3.4.2"/>
|
||||||
<property name="project.name" value="Apache Maven Shared Utils"/>
|
<property name="project.name" value="Apache Maven Shared Utils"/>
|
||||||
<property name="project.organization.name" value="The Apache Software Foundation"/>
|
<property name="project.organization.name" value="The Apache Software Foundation"/>
|
||||||
|
|
||||||
<property name="spec.version" value="3.3"/>
|
<property name="spec.version" value="3.4"/>
|
||||||
|
|
||||||
<property name="compiler.source" value="1.8"/>
|
<property name="compiler.release" value="8"/>
|
||||||
|
<property name="compiler.source" value="1.${compiler.release}"/>
|
||||||
<property name="compiler.target" value="${compiler.source}"/>
|
<property name="compiler.target" value="${compiler.source}"/>
|
||||||
|
|
||||||
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
|
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
|
||||||
@ -24,10 +25,7 @@
|
|||||||
<property name="build.outputDir" value="${build.dir}/classes"/>
|
<property name="build.outputDir" value="${build.dir}/classes"/>
|
||||||
<property name="build.srcDir" value="src/main/java"/>
|
<property name="build.srcDir" value="src/main/java"/>
|
||||||
<property name="build.resourceDir" value="src/main/resources"/>
|
<property name="build.resourceDir" value="src/main/resources"/>
|
||||||
<property name="build.testOutputDir" value="${build.dir}/test-classes"/>
|
|
||||||
<property name="build.testDir" value="src/test/java"/>
|
|
||||||
<property name="build.testResourceDir" value="src/test/resources"/>
|
|
||||||
<property name="test.reports" value="${build.dir}/test-reports"/>
|
|
||||||
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
|
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
|
||||||
|
|
||||||
<!-- ====================================================================== -->
|
<!-- ====================================================================== -->
|
||||||
@ -36,18 +34,6 @@
|
|||||||
|
|
||||||
<path id="build.classpath">
|
<path id="build.classpath">
|
||||||
<fileset dir="lib">
|
<fileset dir="lib">
|
||||||
<!-- jansi commons-io jsr305 plexus-utils plexus-classworlds
|
|
||||||
plexus-container-default -->
|
|
||||||
<include name="**/*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<path id="build.test.classpath">
|
|
||||||
<fileset dir="lib">
|
|
||||||
<!-- jansi commons-io jsr305 plexus-utils plexus-classworlds
|
|
||||||
plexus-container-default -->
|
|
||||||
<!-- junit hamcrest-core commons-lang3
|
|
||||||
maven-artifact maven-core maven-model
|
|
||||||
maven -plugin-testing-harness maven-resolver-api -->
|
|
||||||
<include name="**/*.jar"/>
|
<include name="**/*.jar"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</path>
|
</path>
|
||||||
@ -72,6 +58,7 @@
|
|||||||
encoding="utf-8"
|
encoding="utf-8"
|
||||||
optimize="false"
|
optimize="false"
|
||||||
deprecation="true"
|
deprecation="true"
|
||||||
|
release="${compiler.release}"
|
||||||
target="${compiler.target}"
|
target="${compiler.target}"
|
||||||
verbose="false"
|
verbose="false"
|
||||||
fork="false"
|
fork="false"
|
||||||
@ -86,103 +73,6 @@
|
|||||||
</copy>
|
</copy>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
<!-- Test-compilation target -->
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
|
|
||||||
<target name="compile-tests"
|
|
||||||
depends="compile"
|
|
||||||
description="Compile the test code"
|
|
||||||
unless="test.skip">
|
|
||||||
<mkdir dir="${build.testOutputDir}"/>
|
|
||||||
<javac destdir="${build.testOutputDir}"
|
|
||||||
nowarn="false"
|
|
||||||
debug="true"
|
|
||||||
encoding="utf-8"
|
|
||||||
optimize="false"
|
|
||||||
deprecation="true"
|
|
||||||
target="${compiler.target}"
|
|
||||||
verbose="false"
|
|
||||||
fork="false"
|
|
||||||
source="${compiler.source}">
|
|
||||||
<src>
|
|
||||||
<pathelement location="${build.testDir}"/>
|
|
||||||
</src>
|
|
||||||
<classpath>
|
|
||||||
<path refid="build.test.classpath"/>
|
|
||||||
<pathelement location="${build.outputDir}"/>
|
|
||||||
</classpath>
|
|
||||||
</javac>
|
|
||||||
<copy todir="${build.testOutputDir}">
|
|
||||||
<fileset dir="${build.testResourceDir}"/>
|
|
||||||
</copy>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
<!-- Run all tests -->
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
|
|
||||||
<target name="test"
|
|
||||||
depends="compile-tests, junit-missing"
|
|
||||||
unless="junit.skipped"
|
|
||||||
description="Run the test cases">
|
|
||||||
<mkdir dir="${test.reports}"/>
|
|
||||||
<junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
|
|
||||||
<sysproperty key="basedir" value="."/>
|
|
||||||
<formatter type="xml"/>
|
|
||||||
<formatter type="plain" usefile="false"/>
|
|
||||||
<classpath>
|
|
||||||
<path refid="build.test.classpath"/>
|
|
||||||
<pathelement location="${build.outputDir}"/>
|
|
||||||
<pathelement location="${build.testOutputDir}"/>
|
|
||||||
</classpath>
|
|
||||||
<batchtest todir="${test.reports}" unless="test">
|
|
||||||
<fileset dir="${build.testDir}">
|
|
||||||
<include name="**/Test*.java"/>
|
|
||||||
<include name="**/*Test.java"/>
|
|
||||||
<include name="**/*TestCase.java"/>
|
|
||||||
<exclude name="**/*Abstract*Test.java"/>
|
|
||||||
<exclude name="**/TestException*.java"/>
|
|
||||||
</fileset>
|
|
||||||
</batchtest>
|
|
||||||
<batchtest todir="${test.reports}" if="test">
|
|
||||||
<fileset dir="${build.testDir}">
|
|
||||||
<include name="**/${test}.java"/>
|
|
||||||
<exclude name="**/*Abstract*Test.java"/>
|
|
||||||
<exclude name="**/TestException*.java"/>
|
|
||||||
</fileset>
|
|
||||||
</batchtest>
|
|
||||||
</junit>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="test-junit-present">
|
|
||||||
<available classname="junit.framework.Test" property="junit.present" classpathref="build.test.classpath"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="test-junit-status"
|
|
||||||
depends="test-junit-present">
|
|
||||||
<condition property="junit.missing">
|
|
||||||
<and>
|
|
||||||
<isfalse value="${junit.present}"/>
|
|
||||||
<isfalse value="${test.skip}"/>
|
|
||||||
</and>
|
|
||||||
</condition>
|
|
||||||
<condition property="junit.skipped">
|
|
||||||
<or>
|
|
||||||
<isfalse value="${junit.present}"/>
|
|
||||||
<istrue value="${test.skip}"/>
|
|
||||||
</or>
|
|
||||||
</condition>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="junit-missing"
|
|
||||||
depends="test-junit-status"
|
|
||||||
if="junit.missing">
|
|
||||||
<echo>=================================== WARNING ===================================</echo>
|
|
||||||
<echo> JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed.</echo>
|
|
||||||
<echo>===============================================================================</echo>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- ====================================================================== -->
|
<!-- ====================================================================== -->
|
||||||
<!-- Javadoc target -->
|
<!-- Javadoc target -->
|
||||||
<!-- ====================================================================== -->
|
<!-- ====================================================================== -->
|
||||||
@ -216,7 +106,7 @@
|
|||||||
<!-- Package target -->
|
<!-- Package target -->
|
||||||
<!-- ====================================================================== -->
|
<!-- ====================================================================== -->
|
||||||
|
|
||||||
<target name="package" depends="compile,test" description="Package the application">
|
<target name="package" depends="compile" description="Package the application">
|
||||||
<jar jarfile="${build.dir}/${build.finalName}.jar"
|
<jar jarfile="${build.dir}/${build.finalName}.jar"
|
||||||
compress="true"
|
compress="true"
|
||||||
index="false"
|
index="false"
|
||||||
|
@ -16,9 +16,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%bcond_with tests
|
|
||||||
Name: maven-shared-utils
|
Name: maven-shared-utils
|
||||||
Version: 3.3.4
|
Version: 3.4.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Maven shared utility classes
|
Summary: Maven shared utility classes
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
@ -26,26 +25,15 @@ Group: Development/Libraries/Java
|
|||||||
URL: https://maven.apache.org/shared/maven-shared-utils
|
URL: https://maven.apache.org/shared/maven-shared-utils
|
||||||
Source0: https://repo1.maven.org/maven2/org/apache/maven/shared/%{name}/%{version}/%{name}-%{version}-source-release.zip
|
Source0: https://repo1.maven.org/maven2/org/apache/maven/shared/%{name}/%{version}/%{name}-%{version}-source-release.zip
|
||||||
Source1: %{name}-build.xml
|
Source1: %{name}-build.xml
|
||||||
# XXX temporary for maven upgrade
|
|
||||||
Patch0: 0001-Restore-compatibility-with-current-maven.patch
|
|
||||||
BuildRequires: ant
|
BuildRequires: ant
|
||||||
BuildRequires: apache-commons-io
|
BuildRequires: apache-commons-io
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: jansi
|
BuildRequires: jansi
|
||||||
BuildRequires: javapackages-local >= 6
|
BuildRequires: javapackages-local >= 6
|
||||||
BuildRequires: jsr-305
|
BuildRequires: jsr-305
|
||||||
BuildRequires: plexus-classworlds
|
BuildRequires: slf4j
|
||||||
BuildRequires: plexus-utils
|
|
||||||
BuildRequires: sisu-plexus
|
|
||||||
BuildRequires: unzip
|
BuildRequires: unzip
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if %{with tests}
|
|
||||||
BuildRequires: ant-junit
|
|
||||||
BuildRequires: apache-commons-lang3
|
|
||||||
BuildRequires: maven-lib
|
|
||||||
BuildRequires: maven-plugin-testing-harness
|
|
||||||
BuildRequires: maven-resolver-api
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This project aims to be a functional replacement for plexus-utils in Maven.
|
This project aims to be a functional replacement for plexus-utils in Maven.
|
||||||
@ -65,24 +53,11 @@ API documentation for %{name}.
|
|||||||
%setup -q
|
%setup -q
|
||||||
cp %{SOURCE1} build.xml
|
cp %{SOURCE1} build.xml
|
||||||
|
|
||||||
%patch -P 0 -p1
|
|
||||||
|
|
||||||
%pom_change_dep :plexus-container-default org.eclipse.sisu:org.eclipse.sisu.plexus:0.9.0.M2
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mkdir -p lib
|
mkdir -p lib
|
||||||
build-jar-repository -s lib commons-io jansi/jansi jsr305 \
|
build-jar-repository -s lib commons-io jansi/jansi slf4j/api jsr305
|
||||||
org.eclipse.sisu.plexus plexus/classworlds plexus/utils
|
|
||||||
%if %{with tests}
|
|
||||||
build-jar-repository -s lib commons-lang3 maven/maven-artifact maven/maven-core \
|
|
||||||
maven/maven-model maven-plugin-testing/maven-plugin-testing-harness \
|
|
||||||
maven-resolver/maven-resolver-api
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%{ant} \
|
%{ant} \
|
||||||
%if %{without tests}
|
|
||||||
-Dtest.skip=true \
|
|
||||||
%endif
|
|
||||||
jar javadoc
|
jar javadoc
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
Loading…
Reference in New Issue
Block a user