This commit is contained in:
parent
fa83c802cb
commit
dcfdf2ff36
@ -69,6 +69,28 @@
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Sisu javax.inject.Named generation target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="sisu"
|
||||
depends="compile"
|
||||
description="Generate javax.inject.Name index">
|
||||
<sequential>
|
||||
<java classname="org.eclipse.sisu.space.SisuIndex"
|
||||
failonerror="true"
|
||||
fork="true">
|
||||
<classpath>
|
||||
<path refid="build.classpath"/>
|
||||
</classpath>
|
||||
<arg value="${build.outputDir}"/>
|
||||
</java>
|
||||
<move todir="${build.outputDir}/META-INF">
|
||||
<fileset dir="META-INF"/>
|
||||
</move>
|
||||
</sequential>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Javadoc target -->
|
||||
<!-- ====================================================================== -->
|
||||
@ -102,7 +124,7 @@
|
||||
<!-- Package target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="package" depends="compile" description="Package the application">
|
||||
<target name="package" depends="sisu" description="Package the application">
|
||||
<jar jarfile="${build.dir}/${build.finalName}.jar"
|
||||
compress="true"
|
||||
index="false"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package plexus-cipher
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# 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
|
||||
@ -29,10 +29,14 @@ URL: https://github.com/codehaus-plexus/plexus-cipher
|
||||
# git archive --format tar --prefix=plexus-cipher-1.7/ 0cff29e6b2e | gzip -9 > plexus-cipher-1.7.tar.gz
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source1: %{name}-build.xml
|
||||
BuildRequires: fdupes ant
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: cdi-api
|
||||
BuildRequires: ant
|
||||
BuildRequires: atinject
|
||||
BuildRequires: cdi-api
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: sisu-inject
|
||||
BuildRequires: xmvn-install
|
||||
BuildRequires: xmvn-resolve
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
@ -40,6 +44,7 @@ Plexus Cipher: encryption/decryption Component
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%description javadoc
|
||||
API documentation for %{name}.
|
||||
@ -62,35 +67,25 @@ cp %{SOURCE1} build.xml
|
||||
|
||||
%pom_remove_parent .
|
||||
|
||||
%mvn_file : plexus/%{name}
|
||||
|
||||
%build
|
||||
mkdir -p lib
|
||||
build-jar-repository -s lib cdi-api atinject
|
||||
build-jar-repository -s lib cdi-api atinject org.eclipse.sisu.inject
|
||||
|
||||
%ant compile
|
||||
# generate the META-INF/sisu/javax.inject.Named
|
||||
mkdir -p target/classes/META-INF/sisu
|
||||
grep -rl @Named src/main/java/ | sed 's#src/main/java/##g' | sed 's#\.java##g' | sed -s 's#/#\.#g' \
|
||||
>target/classes/META-INF/sisu/javax.inject.Named
|
||||
%ant jar javadoc
|
||||
|
||||
%mvn_artifact pom.xml target/%{name}-%{version}.jar
|
||||
|
||||
%install
|
||||
# jar
|
||||
install -dm 0755 %{buildroot}%{_javadir}/plexus
|
||||
install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/plexus/%{name}.jar
|
||||
# pom
|
||||
install -dm 0755 %{buildroot}%{_mavenpomdir}/plexus
|
||||
install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/plexus/%{name}.pom
|
||||
%add_maven_depmap plexus/%{name}.pom plexus/%{name}.jar
|
||||
# javadoc
|
||||
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
|
||||
%mvn_install
|
||||
%fdupes -s %{buildroot}%{_javadocdir}
|
||||
|
||||
%files -f .mfiles
|
||||
%license LICENSE.txt NOTICE.txt
|
||||
|
||||
%files javadoc
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%license LICENSE.txt NOTICE.txt
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user