This commit is contained in:
parent
1d6a7efb8b
commit
cb6177be40
@ -12,12 +12,12 @@
|
||||
<property name="project.version" value="[UNKNOWN]"/>
|
||||
|
||||
<property name="compiler.source" value="8"/>
|
||||
<property name="javadoc.source" value="8"/>
|
||||
<property name="compiler.target" value="${compiler.source}"/>
|
||||
|
||||
<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.srcDir9" value="src/main/java9"/>
|
||||
<property name="build.resourceDir" value="src/main/resources"/>
|
||||
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
|
||||
|
||||
@ -37,8 +37,7 @@
|
||||
|
||||
<target name="compile" description="Compile the code">
|
||||
<mkdir dir="${build.outputDir}"/>
|
||||
<mkdir dir="picocli-codegen/${build.outputDir}"/>
|
||||
<mkdir dir="picocli-shell-jline2/${build.outputDir}"/>
|
||||
<!-- Build all except module-info.java with source/target 8 -->
|
||||
<javac destdir="${build.outputDir}"
|
||||
nowarn="false"
|
||||
debug="true"
|
||||
@ -54,6 +53,23 @@
|
||||
<pathelement location="${build.srcDir}"/>
|
||||
</src>
|
||||
</javac>
|
||||
<!-- Build module-info.java with release 9 -->
|
||||
<javac destdir="${build.outputDir}"
|
||||
nowarn="false"
|
||||
debug="true"
|
||||
optimize="false"
|
||||
deprecation="true"
|
||||
release="9"
|
||||
verbose="false"
|
||||
fork="false"
|
||||
encoding="UTF-8"
|
||||
createMissingPackageInfoClass="false">
|
||||
<src>
|
||||
<pathelement location="${build.srcDir9}"/>
|
||||
</src>
|
||||
</javac>
|
||||
<!-- Build all except module-info.java with source/target 8 -->
|
||||
<mkdir dir="picocli-codegen/${build.outputDir}"/>
|
||||
<javac destdir="picocli-codegen/${build.outputDir}"
|
||||
nowarn="false"
|
||||
debug="true"
|
||||
@ -68,10 +84,31 @@
|
||||
<src>
|
||||
<pathelement location="picocli-codegen/${build.srcDir}"/>
|
||||
</src>
|
||||
<classpath>
|
||||
<pathelement location="${build.outputDir}"/>
|
||||
</classpath>
|
||||
</javac>
|
||||
<!-- Build module-info.java with release 9 -->
|
||||
<javac destdir="picocli-codegen/${build.outputDir}"
|
||||
nowarn="false"
|
||||
debug="true"
|
||||
optimize="false"
|
||||
deprecation="true"
|
||||
release="9"
|
||||
verbose="false"
|
||||
fork="false"
|
||||
encoding="UTF-8"
|
||||
createMissingPackageInfoClass="false">
|
||||
<src>
|
||||
<pathelement location="picocli-codegen/${build.srcDir9}"/>
|
||||
</src>
|
||||
<include name="**/module-info.java"/>
|
||||
<modulepath>
|
||||
<pathelement location="${build.outputDir}"/>
|
||||
</modulepath>
|
||||
</javac>
|
||||
<!-- Build all except module-info.java with source/target 8 -->
|
||||
<mkdir dir="picocli-shell-jline2/${build.outputDir}"/>
|
||||
<javac destdir="picocli-shell-jline2/${build.outputDir}"
|
||||
nowarn="false"
|
||||
debug="true"
|
||||
@ -85,6 +122,25 @@
|
||||
createMissingPackageInfoClass="false">
|
||||
<src>
|
||||
<pathelement location="picocli-shell-jline2/${build.srcDir}"/>
|
||||
</src>
|
||||
<classpath>
|
||||
<pathelement location="${build.outputDir}"/>
|
||||
<pathelement location="${jline2.jar}"/>
|
||||
</classpath>
|
||||
</javac>
|
||||
<!-- Build module-info.java with release 9 -->
|
||||
<javac destdir="picocli-shell-jline2/${build.outputDir}"
|
||||
nowarn="false"
|
||||
debug="true"
|
||||
optimize="false"
|
||||
deprecation="true"
|
||||
release="9"
|
||||
verbose="false"
|
||||
fork="false"
|
||||
encoding="UTF-8"
|
||||
createMissingPackageInfoClass="false">
|
||||
<src>
|
||||
<pathelement location="picocli-shell-jline2/${build.srcDir9}"/>
|
||||
</src>
|
||||
<modulepath>
|
||||
<pathelement location="${build.outputDir}"/>
|
||||
@ -118,7 +174,7 @@
|
||||
charset="UTF-8"
|
||||
linksource="false"
|
||||
breakiterator="false"
|
||||
source="${javadoc.source}"
|
||||
source="${compiler.source}"
|
||||
>
|
||||
<sourcepath>
|
||||
<pathelement location="${build.srcDir}"/>
|
||||
|
45
picocli.spec
45
picocli.spec
@ -31,8 +31,9 @@ Source4: https://repo1.maven.org/maven2/info/%{name}/%{name}-shell-jline2
|
||||
BuildRequires: ant
|
||||
BuildRequires: aqute-bnd
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: java-devel >= 9
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: mvn(jline:jline)
|
||||
BuildRequires: jline >= 2
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
@ -40,6 +41,29 @@ Java command line parser with both an annotations API and a programmatic API.
|
||||
Usage help with ANSI styles and colors. Autocomplete. Nested subcommands.
|
||||
Easily included as source to avoid adding a dependency.
|
||||
|
||||
%package codegen
|
||||
Summary: Picocli Code Generation
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%description codegen
|
||||
Java command line parser with both an annotations API and a programmatic API.
|
||||
Usage help with ANSI styles and colors. Autocomplete. Nested subcommands.
|
||||
Easily included as source to avoid adding a dependency.
|
||||
|
||||
Tools to generate documentation, configuration, source code and other files
|
||||
from a picocli model.
|
||||
|
||||
%package shell-jline2
|
||||
Summary: Picocli Shell JLine2
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%description shell-jline2
|
||||
Java command line parser with both an annotations API and a programmatic API.
|
||||
Usage help with ANSI styles and colors. Autocomplete. Nested subcommands.
|
||||
Easily included as source to avoid adding a dependency.
|
||||
|
||||
Library to build interactive shell applications with JLine 2 and picocli.
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
Group: Documentation/HTML
|
||||
@ -51,21 +75,10 @@ This package contains the API documentation for %{name}.
|
||||
%setup -q
|
||||
cp %{SOURCE1} build.xml
|
||||
|
||||
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
|
||||
mv src/main/java9/module-info.java src/main/java
|
||||
mv picocli-codegen/src/main/java9/module-info.java picocli-codegen/src/main/java
|
||||
mv picocli-shell-jline2/src/main/java9/module-info.java picocli-shell-jline2/src/main/java
|
||||
%else
|
||||
sed -i -e 's/\<modulepath\>/classpath/g' build.xml
|
||||
%endif
|
||||
|
||||
%build
|
||||
%{ant} \
|
||||
-Dproject.version=%{version} \
|
||||
-Djline2.jar=$(find-jar jline/jline) \
|
||||
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
|
||||
-Dcompiler.source=9 \
|
||||
%endif
|
||||
jar javadoc
|
||||
|
||||
# Convert to OSGi bundle
|
||||
@ -91,8 +104,8 @@ install -pm0644 %{SOURCE3} %{buildroot}%{_mavenpomdir}/%{name}/%{name}-codegen.p
|
||||
install -pm0644 %{SOURCE4} %{buildroot}%{_mavenpomdir}/%{name}/%{name}-shell-jline2.pom
|
||||
|
||||
%add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar
|
||||
%add_maven_depmap %{name}/%{name}-codegen.pom %{name}/%{name}-codegen.jar
|
||||
%add_maven_depmap %{name}/%{name}-shell-jline2.pom %{name}/%{name}-shell-jline2.jar
|
||||
%add_maven_depmap %{name}/%{name}-codegen.pom %{name}/%{name}-codegen.jar -f codegen
|
||||
%add_maven_depmap %{name}/%{name}-shell-jline2.pom %{name}/%{name}-shell-jline2.jar -f shell-jline2
|
||||
|
||||
#javadoc
|
||||
install -dm0755 %{buildroot}%{_javadocdir}/%{name}
|
||||
@ -103,6 +116,10 @@ cp -r target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
|
||||
%files codegen -f .mfiles-codegen
|
||||
|
||||
%files shell-jline2 -f .mfiles-shell-jline2
|
||||
|
||||
%files javadoc
|
||||
%{_javadocdir}/%{name}
|
||||
%license LICENSE
|
||||
|
Loading…
Reference in New Issue
Block a user