This commit is contained in:
commit
c2314a67c0
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
55
0001-Remove-support-for-snappy.patch
Normal file
55
0001-Remove-support-for-snappy.patch
Normal file
@ -0,0 +1,55 @@
|
||||
From bd1055a190a1a64374f4aeb3bfde138d9c3d965f Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Sat, 23 Sep 2017 11:43:45 +0200
|
||||
Subject: [PATCH] Remove support for snappy
|
||||
|
||||
---
|
||||
src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java | 3 +--
|
||||
src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java | 3 +--
|
||||
2 files changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java b/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java
|
||||
index 398ecf1..0d46cfc 100644
|
||||
--- a/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java
|
||||
+++ b/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java
|
||||
@@ -38,7 +38,6 @@
|
||||
import org.codehaus.plexus.components.io.resources.PlexusIoResource;
|
||||
import org.codehaus.plexus.util.IOUtil;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
-import org.iq80.snappy.SnappyOutputStream;
|
||||
import static org.codehaus.plexus.archiver.util.Streams.bufferedOutputStream;
|
||||
|
||||
/**
|
||||
@@ -489,7 +488,7 @@ else if ( TarCompressionMethod.bzip2.equals( tarCompressionMethod ) )
|
||||
}
|
||||
else if ( TarCompressionMethod.snappy.equals( tarCompressionMethod ) )
|
||||
{
|
||||
- return new SnappyOutputStream( bufferedOutputStream( ostream ) );
|
||||
+ throw new UnsupportedOperationException( "This version of plexus-archiver does not support snappy compression" );
|
||||
}
|
||||
else if ( TarCompressionMethod.xz.equals( tarCompressionMethod ) )
|
||||
{
|
||||
diff --git a/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java b/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java
|
||||
index 4bc94a4..15f0494 100644
|
||||
--- a/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java
|
||||
+++ b/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java
|
||||
@@ -30,7 +30,6 @@
|
||||
import org.codehaus.plexus.archiver.ArchiverException;
|
||||
import org.codehaus.plexus.archiver.util.Streams;
|
||||
import org.codehaus.plexus.util.IOUtil;
|
||||
-import org.iq80.snappy.SnappyInputStream;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:evenisse@codehaus.org">Emmanuel Venisse</a>
|
||||
@@ -153,7 +152,7 @@ else if ( compression == UntarCompressionMethod.BZIP2 )
|
||||
}
|
||||
else if ( compression == UntarCompressionMethod.SNAPPY )
|
||||
{
|
||||
- return new SnappyInputStream( istream, true );
|
||||
+ throw new UnsupportedOperationException( "This version of plexus-archiver does not support snappy compression" );
|
||||
}
|
||||
else if ( compression == UntarCompressionMethod.XZ )
|
||||
{
|
||||
--
|
||||
2.13.5
|
||||
|
11
logger-level.patch
Normal file
11
logger-level.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- plexus-archiver-plexus-archiver-3.6.0/src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java 2018-05-06 14:13:22.000000000 +0200
|
||||
+++ plexus-archiver-plexus-archiver-3.6.0/src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java 2019-03-08 07:35:58.658910163 +0100
|
||||
@@ -31,7 +31,7 @@
|
||||
throws Exception
|
||||
{
|
||||
super.setUp();
|
||||
- getContainer().getLoggerManager().setThreshold( Logger.LEVEL_DEBUG );
|
||||
+ ((org.codehaus.plexus.DefaultPlexusContainer)getContainer()).getLoggerManager().setThreshold( Logger.LEVEL_DEBUG );
|
||||
}
|
||||
|
||||
public void testZipArchiver()
|
3
plexus-archiver-3.6.0.tar.gz
Normal file
3
plexus-archiver-3.6.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2c023487c261e07d11c874bc437a33e2fdefccf679af55cf8c579aa819a9e4f4
|
||||
size 564479
|
239
plexus-archiver-build.xml
Normal file
239
plexus-archiver-build.xml
Normal file
@ -0,0 +1,239 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="plexus-archiver" default="package" basedir=".">
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Build environment properties -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<property file="build.properties"/>
|
||||
|
||||
<property name="project.groupId" value="org.codehaus.plexus"/>
|
||||
<property name="project.artifactId" value="plexus-archiver"/>
|
||||
<property name="project.version" value="3.6.0"/>
|
||||
|
||||
<property name="compiler.source" value="1.7"/>
|
||||
<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">
|
||||
<!-- plexus-container-default-1.0-alpha-30 plexus-classworlds-1.2-alpha-9
|
||||
plexus-utils-3.1.0 plexus-io-3.0.1 commons-io-2.6
|
||||
commons-compress-1.16.1 objenesis-2.6 jsr305-3.0.2 -->
|
||||
<include name="**/*"/>
|
||||
</fileset>
|
||||
</path>
|
||||
<path id="build.test.classpath">
|
||||
<fileset dir="lib">
|
||||
<!-- plexus-container-default-1.0-alpha-30 plexus-classworlds-1.2-alpha-9
|
||||
plexus-utils-3.1.0 plexus-io-3.0.1 commons-io-2.6
|
||||
commons-compress-1.16.1 objenesis-2.6 jsr305-3.0.2
|
||||
junit-4.12 hamcrest-core-1.3 xz-1.8 -->
|
||||
<include name="**/*"/>
|
||||
</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>
|
||||
<copy todir="${build.outputDir}">
|
||||
<fileset dir="${build.resourceDir}"/>
|
||||
</copy>
|
||||
</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="."/>
|
||||
<!-- Because of some test file names, the tests must run in UTF-8 environment -->
|
||||
<env key="LC_ALL" value="en_US.UTF-8"/>
|
||||
<env key="LANG" value="en_US.UTF-8"/>
|
||||
<env key="LANGUAGE" value="en_US.UTF-8"/>
|
||||
<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="**/Base*ArchiverTest.java"/>
|
||||
</fileset>
|
||||
</batchtest>
|
||||
<batchtest todir="${test.reports}" if="test">
|
||||
<fileset dir="${build.testDir}">
|
||||
<include name="**/${test}.java"/>
|
||||
<exclude name="**/*Abstract*Test.java"/>
|
||||
<exclude name="**/Base*ArchiverTest.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="JavaPackages-ArtifactId" value="${project.artifactId}"/>
|
||||
<attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
|
||||
<attribute name="JavaPackages-Version" value="${project.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>
|
15
plexus-archiver.changes
Normal file
15
plexus-archiver.changes
Normal file
@ -0,0 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 8 07:53:43 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Initial packaging of plexus-archiver 3.6.0
|
||||
- Generate and customize ant build file
|
||||
- Make running of tests optional
|
||||
- Added patches:
|
||||
* 0001-Remove-support-for-snappy.patch
|
||||
+ When built without snappy support and trying to use Snappy,
|
||||
throw UnsupportedOperationException
|
||||
* logger-level.patch
|
||||
+ Cast the result of getContainer() call, because the
|
||||
getLoggerManager() method is not a method of the
|
||||
PlexusContainer interface, but of the DefaultPlexusContainer
|
||||
implementation
|
125
plexus-archiver.spec
Normal file
125
plexus-archiver.spec
Normal file
@ -0,0 +1,125 @@
|
||||
#
|
||||
# spec file for package plexus-archiver
|
||||
#
|
||||
# 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
|
||||
%bcond_with snappy
|
||||
Name: plexus-archiver
|
||||
Version: 3.6.0
|
||||
Release: 0
|
||||
Summary: Plexus Archiver Component
|
||||
License: Apache-2.0
|
||||
Group: Development/Libraries/Java
|
||||
URL: http://codehaus-plexus.github.io/plexus-archiver
|
||||
Source0: https://github.com/codehaus-plexus/plexus-archiver/archive/plexus-archiver-%{version}.tar.gz
|
||||
Source1: %{name}-build.xml
|
||||
Patch0: 0001-Remove-support-for-snappy.patch
|
||||
Patch1: logger-level.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: apache-commons-compress
|
||||
BuildRequires: apache-commons-io
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: jsr-305
|
||||
BuildRequires: plexus-containers-container-default
|
||||
BuildRequires: plexus-io
|
||||
BuildRequires: plexus-utils
|
||||
BuildRequires: xz-java
|
||||
Requires: mvn(org.apache.commons:commons-compress)
|
||||
Requires: mvn(org.codehaus.plexus:plexus-io)
|
||||
Requires: mvn(org.codehaus.plexus:plexus-utils)
|
||||
Requires: mvn(org.tukaani:xz)
|
||||
BuildArch: noarch
|
||||
%if %{with snappy}
|
||||
BuildRequires: mvn(org.iq80.snappy:snappy)
|
||||
%endif
|
||||
%if %{with tests}
|
||||
BuildRequires: ant-junit
|
||||
BuildRequires: guava20
|
||||
BuildRequires: plexus-classworlds
|
||||
BuildRequires: xbean
|
||||
BuildRequires: xz-java
|
||||
%endif
|
||||
|
||||
%description
|
||||
The Plexus project seeks to create end-to-end developer tools for
|
||||
writing applications. At the core is the container, which can be
|
||||
embedded or for a full scale application server. There are many
|
||||
reusable components for hibernate, form processing, jndi, i18n,
|
||||
velocity, etc. Plexus also includes an application server which
|
||||
is like a J2EE application server, without all the baggage.
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
Group: Documentation/HTML
|
||||
|
||||
%description javadoc
|
||||
Javadoc for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{name}-%{version}
|
||||
cp %{SOURCE1} build.xml
|
||||
|
||||
%if %{without snappy}
|
||||
%patch0 -p1
|
||||
%pom_remove_dep org.iq80.snappy:snappy
|
||||
rm -rf src/main/java/org/codehaus/plexus/archiver/snappy
|
||||
rm -rf src/test/java/org/codehaus/plexus/archiver/snappy
|
||||
rm -f src/main/java/org/codehaus/plexus/archiver/tar/SnappyTarFile.java
|
||||
rm -f src/main/java/org/codehaus/plexus/archiver/tar/PlexusIoTarSnappyFileResourceCollection.java
|
||||
rm -r src/test/java/org/codehaus/plexus/archiver/tar/TarSnappyUnArchiverTest.java
|
||||
%endif
|
||||
%patch1 -p1
|
||||
|
||||
%pom_remove_plugin :maven-enforcer-plugin
|
||||
|
||||
%pom_remove_parent .
|
||||
%pom_xpath_inject "pom:project" "<groupId>org.codehaus.plexus</groupId>" .
|
||||
|
||||
%build
|
||||
mkdir -p lib
|
||||
build-jar-repository -s lib plexus-containers/plexus-container-default jsr-305 commons-compress commons-io plexus/utils plexus/io
|
||||
%if %{with tests}
|
||||
build-jar-repository -s lib plexus/classworlds guava20/guava-20.0 xbean/xbean-reflect xz-java
|
||||
%endif
|
||||
%{ant} \
|
||||
%if %{without tests}
|
||||
-Dtest.skip=true \
|
||||
%endif
|
||||
jar javadoc
|
||||
|
||||
%install
|
||||
# jar
|
||||
install -dm 0755 %{buildroot}%{_javadir}/plexus
|
||||
install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/plexus/archiver.jar
|
||||
# pom
|
||||
install -dm 0755 %{buildroot}%{_mavenpomdir}/plexus
|
||||
install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/plexus/archiver.pom
|
||||
%add_maven_depmap plexus/archiver.pom plexus/archiver.jar
|
||||
# javadoc
|
||||
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
|
||||
%fdupes -s %{buildroot}%{_javadocdir}
|
||||
|
||||
%files -f .mfiles
|
||||
%license LICENSE
|
||||
|
||||
%files javadoc
|
||||
%license LICENSE
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user