forked from pool/plexus-containers
167 lines
5.8 KiB
RPMSpec
167 lines
5.8 KiB
RPMSpec
#
|
|
# spec file for package plexus-containers-component-metadata
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
%global base_name plexus-containers
|
|
%global comp_name component-metadata
|
|
%bcond_with tests
|
|
Name: %{base_name}-%{comp_name}
|
|
Version: 1.7.1
|
|
Release: 0
|
|
Summary: Component metadata from %{base_name}
|
|
# Most of the files are either under ASL 2.0 or MIT
|
|
# The following files are under xpp:
|
|
# plexus-component-metadata/src/main/java/org/codehaus/plexus/metadata/merge/Driver.java
|
|
# plexus-component-metadata/src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java
|
|
License: Apache-2.0 AND MIT AND xpp
|
|
Group: Development/Libraries/Java
|
|
URL: https://github.com/codehaus-plexus/plexus-containers
|
|
Source0: https://github.com/codehaus-plexus/%{base_name}/archive/%{base_name}-%{version}.tar.gz
|
|
Source1: http://www.apache.org/licenses/LICENSE-2.0.txt
|
|
Source2: LICENSE.MIT
|
|
Source100: %{base_name}-build.tar.xz
|
|
Patch0: 0001-Port-to-current-qdox.patch
|
|
BuildRequires: ant
|
|
BuildRequires: apache-commons-cli
|
|
BuildRequires: fdupes
|
|
BuildRequires: javapackages-local
|
|
BuildRequires: jdom2
|
|
BuildRequires: junit
|
|
BuildRequires: maven-lib
|
|
BuildRequires: maven-project
|
|
BuildRequires: mvn(org.codehaus.plexus:plexus:pom:)
|
|
BuildRequires: objectweb-asm
|
|
BuildRequires: plexus-classworlds
|
|
BuildRequires: plexus-cli
|
|
BuildRequires: plexus-containers-component-annotations
|
|
BuildRequires: plexus-containers-container-default
|
|
BuildRequires: plexus-utils mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
|
|
BuildRequires: qdox >= 2
|
|
BuildRequires: xbean
|
|
BuildConflicts: java-devel >= 9
|
|
Requires: mvn(org.codehaus.plexus:plexus:pom:)
|
|
BuildArch: noarch
|
|
%if %{with tests}
|
|
BuildRequires: ant-junit
|
|
%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: API documentation for %{name}
|
|
Group: Documentation/HTML
|
|
|
|
%description javadoc
|
|
%{summary}.
|
|
|
|
%prep
|
|
%setup -q -n %{base_name}-%{base_name}-%{version} -a100
|
|
|
|
mkdir -p lib
|
|
build-jar-repository -s lib %{base_name} maven objectweb-asm/asm objectweb-asm/asm-commons plexus/classworlds plexus/utils jdom2/jdom2 commons-cli qdox plexus/cli maven-plugin-tools/maven-plugin-annotations
|
|
%if %{with tests}
|
|
build-jar-repository -s lib hamcrest/core
|
|
%endif
|
|
|
|
%patch0 -p1
|
|
|
|
cp %{SOURCE1} .
|
|
cp %{SOURCE2} .
|
|
|
|
rm -rf plexus-container-default/src/test/java/org/codehaus/plexus/hierarchy
|
|
|
|
%pom_remove_plugin -r :maven-site-plugin
|
|
|
|
# For Maven 3 compat
|
|
%pom_add_dep org.apache.maven:maven-core plexus-component-metadata
|
|
|
|
%pom_change_dep -r :google-collections com.google.guava:guava:20.0
|
|
|
|
# ASM dependency was changed to "provided" in XBean 4.x, so we need to provide ASM
|
|
%pom_add_dep org.ow2.asm:asm:5.0.3:runtime plexus-container-default
|
|
%pom_add_dep org.ow2.asm:asm-commons:5.0.3:runtime plexus-container-default
|
|
|
|
%pom_remove_dep com.sun:tools plexus-component-javadoc
|
|
%pom_add_dep com.sun:tools plexus-component-javadoc
|
|
|
|
# Generate OSGI info
|
|
%pom_xpath_inject "pom:project" "
|
|
<packaging>bundle</packaging>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.felix</groupId>
|
|
<artifactId>maven-bundle-plugin</artifactId>
|
|
<extensions>true</extensions>
|
|
<configuration>
|
|
<instructions>
|
|
<_nouses>true</_nouses>
|
|
<Export-Package>org.codehaus.plexus.component.annotations.*</Export-Package>
|
|
</instructions>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>" plexus-component-annotations
|
|
|
|
# to prevent ant from failing
|
|
mkdir -p plexus-component-annotations/src/test/java
|
|
|
|
# integration tests fix
|
|
sed -i "s|<version>2.3</version>|<version> %{javadoc_plugin_version}</version>|" plexus-component-javadoc/src/it/basic/pom.xml
|
|
|
|
# plexus-component-api has been merged into plexus-container-default
|
|
# %{mvn_alias} ":plexus-container-default" "org.codehaus.plexus:containers-component-api"
|
|
|
|
%build
|
|
pushd plexus-%{comp_name}
|
|
ant \
|
|
%if %{without tests}
|
|
-Dtest.skip=true \
|
|
%endif
|
|
jar javadoc
|
|
popd
|
|
|
|
%install
|
|
# jars
|
|
install -dm 0755 %{buildroot}%{_javadir}/%{base_name}
|
|
install -pm 0644 plexus-component-metadata/target/plexus-component-metadata-%{version}.jar %{buildroot}%{_javadir}/%{base_name}/plexus-component-metadata.jar
|
|
|
|
# poms
|
|
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{base_name}
|
|
install -pm 0644 plexus-component-metadata/pom.xml %{buildroot}%{_mavenpomdir}/%{base_name}/plexus-component-metadata.pom
|
|
%add_maven_depmap %{base_name}/plexus-component-metadata.pom %{base_name}/plexus-component-metadata.jar
|
|
|
|
# javadoc
|
|
install -dm 0755 %{buildroot}%{_javadocdir}/%{base_name}
|
|
cp -pr plexus-component-metadata/target/site/apidocs %{buildroot}%{_javadocdir}/%{base_name}/plexus-component-metadata
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
|
|
|
%files -f .mfiles
|
|
%license LICENSE-2.0.txt LICENSE.MIT
|
|
|
|
%files javadoc
|
|
%license LICENSE-2.0.txt LICENSE.MIT
|
|
%{_javadocdir}/%{base_name}
|
|
|
|
%changelog
|