Fridrich Strba 2019-03-29 13:49:04 +00:00 committed by Git OBS Bridge
commit af524006f6
7 changed files with 449 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,72 @@
From 2f414c5566febf44beb77c43340eafccad1547e2 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Tue, 17 Jul 2018 11:57:16 +0200
Subject: [PATCH] Remove dependency on junit-addons
---
pom.xml | 6 ------
.../apache/maven/reporting/AbstractMavenReportRenderer.java | 2 +-
.../maven/reporting/AbstractMavenReportRendererTest.java | 10 ++--------
3 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/pom.xml b/pom.xml
index 239742e..dc75ecd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -135,12 +135,6 @@
<version>3.8.2</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>junit-addons</groupId>
- <artifactId>junit-addons</artifactId>
- <version>1.4</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
diff --git a/src/main/java/org/apache/maven/reporting/AbstractMavenReportRenderer.java b/src/main/java/org/apache/maven/reporting/AbstractMavenReportRenderer.java
index 6f954ae..c11acd3 100644
--- a/src/main/java/org/apache/maven/reporting/AbstractMavenReportRenderer.java
+++ b/src/main/java/org/apache/maven/reporting/AbstractMavenReportRenderer.java
@@ -597,7 +597,7 @@ public abstract class AbstractMavenReportRenderer
* @param text a text with or without the pattern <code>{text, url}</code>
* @return a map of text/href
*/
- private static List<String> applyPattern( String text )
+ static List<String> applyPattern( String text )
{
if ( StringUtils.isEmpty( text ) )
{
diff --git a/src/test/java/org/apache/maven/reporting/AbstractMavenReportRendererTest.java b/src/test/java/org/apache/maven/reporting/AbstractMavenReportRendererTest.java
index cdb9299..e8dce8f 100644
--- a/src/test/java/org/apache/maven/reporting/AbstractMavenReportRendererTest.java
+++ b/src/test/java/org/apache/maven/reporting/AbstractMavenReportRendererTest.java
@@ -24,7 +24,8 @@ import java.util.List;
import junit.framework.Assert;
import junit.framework.TestCase;
-import junitx.util.PrivateAccessor;
+
+import static org.apache.maven.reporting.AbstractMavenReportRenderer.applyPattern;
/**
* Test case for some public method in AbstractMavenReportRenderer.
@@ -32,13 +33,6 @@ import junitx.util.PrivateAccessor;
public class AbstractMavenReportRendererTest
extends TestCase
{
- private static List<String> applyPattern( String pattern )
- throws Throwable
- {
- return (List<String>) PrivateAccessor.invoke( AbstractMavenReportRenderer.class, "applyPattern",
- new Class[] { String.class }, new Object[] { pattern } );
- }
-
private static void checkPattern( String pattern, String[] expectedResult ) throws Throwable
{
List<String> result = applyPattern( pattern );
--
2.14.3

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9d9fab3ffa5271f569262b1fdc752d64021854a5f9be163293add5c51b32f0c2
size 43634

View File

@ -0,0 +1,233 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="maven-reporting-impl" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property file="build.properties"/>
<property name="project.groupId" value="org.apache.maven.reporting"/>
<property name="project.artifactId" value="maven-reporting-impl"/>
<property name="project.name" value="Apache Maven Reporting Implementation"/>
<property name="project.version" value="3.0.0"/>
<property name="spec.version" value="3.0"/>
<property name="project.organization.name"
value="The Apache Software Foundation"/>
<property name="compiler.source" value="1.6"/>
<property name="compiler.target" value="${compiler.source}"/>
<property name="build.finalName"
value="${project.artifactId}-${project.version}"/>
<property name="build.dir" value="target"/>
<property name="build.outputDir" value="${build.dir}/classes"/>
<property name="build.srcDir" value="src/main/java"/>
<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"/>
<!-- ====================================================================== -->
<!-- Defining classpaths -->
<!-- ====================================================================== -->
<path id="build.classpath">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="build.test.classpath">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- ====================================================================== -->
<!-- Cleaning up target -->
<!-- ====================================================================== -->
<target name="clean" description="Clean the output directory">
<delete dir="${build.dir}"/>
</target>
<!-- ====================================================================== -->
<!-- Compilation target -->
<!-- ====================================================================== -->
<target name="compile" description="Compile the code">
<mkdir dir="${build.outputDir}"/>
<javac destdir="${build.outputDir}"
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.srcDir}"/>
</src>
<classpath refid="build.classpath"/>
</javac>
</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>
</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"/>
</fileset>
</batchtest>
<batchtest todir="${test.reports}" if="test">
<fileset dir="${build.testDir}">
<include name="**/${test}.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 -->
<!-- ====================================================================== -->
<target name="javadoc" description="Generates the Javadoc of the application">
<javadoc sourcepath="${build.srcDir}"
packagenames="*"
destdir="${reporting.outputDirectory}/apidocs"
access="protected"
source="${compiler.source}"
verbose="false"
version="true"
use="true"
author="true"
splitindex="false"
nodeprecated="false"
nodeprecatedlist="false"
notree="false"
noindex="false"
nohelp="false"
nonavbar="false"
serialwarn="false"
encoding="UTF-8"
linksource="false"
breakiterator="false">
<classpath refid="build.classpath"/>
</javadoc>
</target>
<!-- ====================================================================== -->
<!-- Package target -->
<!-- ====================================================================== -->
<target name="package" depends="compile,test" description="Package the application">
<jar jarfile="${build.dir}/${build.finalName}.jar"
compress="true"
index="false"
basedir="${build.outputDir}"
excludes="**/package.html">
<manifest>
<attribute name="Implementation-Title" value="${project.name}"/>
<attribute name="Implementation-URL" value="https://maven.apache.org/shared/${project.artifactId}/"/>
<attribute name="Implementation-Vendor" value="${project.organization.name}"/>
<attribute name="Implementation-Vendor-Id" value="${project.groupId}"/>
<attribute name="Implementation-Version" value="${project.version}"/>
<attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
<attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
<attribute name="JavaPackages-Version" value="${project.version}"/>
<attribute name="Specification-Title" value="${project.name}"/>
<attribute name="Specification-Vendor" value="${project.organization.name}"/>
<attribute name="Specification-Version" value="${spec.version}"/>
</manifest>
</jar>
</target>
<!-- ====================================================================== -->
<!-- A dummy target for the package named after the type it creates -->
<!-- ====================================================================== -->
<target name="jar" depends="package" description="Builds the jar for the application"/>
</project>

View File

@ -0,0 +1,5 @@
-------------------------------------------------------------------
Fri Mar 29 13:44:55 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of maven-reporting-impl 3.0.0
- Generate and customize ant build.xml file

112
maven-reporting-impl.spec Normal file
View File

@ -0,0 +1,112 @@
#
# spec file for package maven-reporting-impl
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%bcond_with tests
Name: maven-reporting-impl
Version: 3.0.0
Release: 0
Summary: Abstract classes to manage report generation
License: Apache-2.0
Group: Development/Libraries/Java
URL: http://maven.apache.org/shared/%{name}
Source0: http://repo1.maven.org/maven2/org/apache/maven/reporting/%{name}/%{version}/%{name}-%{version}-source-release.zip
Source1: %{name}-build.xml
Patch0: 0001-Remove-dependency-on-junit-addons.patch
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: javapackages-local
BuildRequires: maven-doxia-core
BuildRequires: maven-doxia-logging-api
BuildRequires: maven-doxia-module-xhtml
BuildRequires: maven-doxia-sink-api
BuildRequires: maven-doxia-sitetools
BuildRequires: maven-lib
BuildRequires: maven-plugin-annotations
BuildRequires: maven-reporting-api
BuildRequires: maven-shared-utils
BuildRequires: plexus-utils
BuildRequires: unzip
BuildRequires: xmvn-install
BuildRequires: xmvn-resolve
BuildRequires: mvn(org.apache.maven.shared:maven-shared-components:pom:)
BuildArch: noarch
%if %{with tests}
BuildRequires: ant-junit
%endif
%description
Abstract classes to manage report generation, which can be run both:
* as part of a site generation (as a maven-reporting-api's MavenReport),
* or as a direct standalone invocation (as a maven-plugin-api's Mojo).
This is a replacement package for maven-shared-reporting-impl
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%setup -q
cp %{SOURCE1} build.xml
%patch0 -p1
# integration tests try to download stuff from the internet
# and therefore they don't work in Build Service
%pom_remove_plugin :maven-invoker-plugin
%build
mkdir -p lib
build-jar-repository -s lib \
maven-doxia/doxia-core \
maven-doxia/doxia-logging-api \
maven-doxia/doxia-module-xhtml \
maven-doxia/doxia-sink-api \
maven-doxia-sitetools/doxia-decoration-model \
maven-doxia-sitetools/doxia-site-renderer \
maven/maven-core \
maven/maven-plugin-api \
maven-plugin-tools/maven-plugin-annotations \
maven-reporting-api/maven-reporting-api \
maven-shared-utils/maven-shared-utils \
plexus/utils
%{ant} \
%if %{without tests}
-Dtest.skip=true \
%endif
jar javadoc
%{mvn_artifact} pom.xml target/%{name}-%{version}.jar
%install
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles
%license LICENSE
%doc NOTICE
%files javadoc -f .mfiles-javadoc
%license LICENSE
%doc NOTICE
%changelog