Accepting request 946326 from Java:packages

2.0.1

OBS-URL: https://build.opensuse.org/request/show/946326
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qdox?expand=0&rev=26
This commit is contained in:
Dominique Leuenberger 2022-01-15 20:45:06 +00:00 committed by Git OBS Bridge
commit 3c9c1319fa
6 changed files with 152 additions and 59 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:57148d2984cf47473365c86d5affe77a38b11f9982cc24456f9dd98cda820bf6
size 457511

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7656659c8ff8b4e3f6c9b5fd0164bfe2ff7211ccedaa21046e53e63005a6d37b
size 459971

View File

@ -1,19 +0,0 @@
Manifest-Version: 1.0
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.4
Bundle-Name: %pluginName
Bundle-SymbolicName: com.thoughtworks.qdox
Bundle-Version: 1.6.3.v20081201-1400
Export-Package: com.thoughtworks.qdox;version="1.6.3",com.thoughtworks
.qdox.ant;version="1.6.3",com.thoughtworks.qdox.directorywalker;versi
on="1.6.3",com.thoughtworks.qdox.junit;version="1.6.3",com.thoughtwor
ks.qdox.model;version="1.6.3",com.thoughtworks.qdox.model.util;versio
n="1.6.3",com.thoughtworks.qdox.parser;version="1.6.3",com.thoughtwor
ks.qdox.parser.impl;version="1.6.3",com.thoughtworks.qdox.parser.stru
cts;version="1.6.3",com.thoughtworks.qdox.tools;version="1.6.3"
Bundle-ManifestVersion: 2
Import-Package: junit.framework;version="[3.8.2,4.0.0)";resolution:=op
tional,org.apache.tools.ant;version="[1.7.0,2.0.0)";resolution:=optio
nal,org.apache.tools.ant.types;version="[1.7.0,2.0.0)";resolution:=op
tional

110
qdox-build.xml Normal file
View File

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="qdox" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property file="build.properties"/>
<property name="project.artifactId" value="qdox"/>
<property name="project.version" value="2.0.1"/>
<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="reporting.outputDirectory" value="${build.dir}/site"/>
<property name="compiler.source" value="1.7"/>
<property name="compiler.target" value="${compiler.source}"/>
<!-- ====================================================================== -->
<!-- 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"
optimize="false"
deprecation="true"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}">
<src>
<pathelement location="${build.srcDir}"/>
</src>
</javac>
</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"
charset="ISO-8859-1"
linksource="false"
breakiterator="false"/>
</target>
<!-- ====================================================================== -->
<!-- Package target -->
<!-- ====================================================================== -->
<target name="package" depends="compile" description="Package the application">
<jar jarfile="${build.dir}/${build.finalName}.jar"
compress="true"
index="false"
basedir="${build.outputDir}"
excludes="**/package.html">
<manifest>
<attribute name="Bundle-Localization" value="plugin"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="%pluginName"/>
<attribute name="Bundle-RequiredExecutionEnvironment" value="J2SE-${compiler.target}"/>
<attribute name="Bundle-SymbolicName" value="com.thoughtworks.qdox"/>
<attribute name="Bundle-Vendor" value="%providerName"/>
<attribute name="Bundle-Version" value="${project.version}"/>
<attribute name="Export-Package" value="com.thoughtworks.qdox.ant;version=&quot;${project.version}&quot;,com.thoughtworks.qdox.directorywalker;version=&quot;${project.version}&quot;,com.thoughtworks.qdox.junit;version=&quot;${project.version}&quot;,com.thoughtworks.qdox.model.util;version=&quot;${project.version}&quot;,com.thoughtworks.qdox.model;version=&quot;${project.version}&quot;,com.thoughtworks.qdox.parser.impl;version=&quot;${project.version}&quot;,com.thoughtworks.qdox.parser.structs;version=&quot;${project.version}&quot;,com.thoughtworks.qdox.parser;version=&quot;${project.version}&quot;,com.thoughtworks.qdox.tools;version=&quot;${project.version}&quot;,com.thoughtworks.qdox;version=&quot;${project.version}&quot;"/>
<attribute name="Import-Package" value="junit.framework;version=&quot;[3.8.2,4.0.0)&quot;;resolution:=optional,org.apache.tools.ant.types;version=&quot;[1.7.0,2.0.0)&quot;;resolution:=optional,org.apache.tools.ant;version=&quot;[1.7.0,2.0.0)&quot;;resolution:=optional"/>
</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

@ -1,3 +1,23 @@
-------------------------------------------------------------------
Thu Jan 13 11:45:28 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Update to version 2.0.1:
* Changes:
+ Support Lambda Expression
+ Add SEALED / NON_SEALED tokens
+ #75 CodeBlock for Annotation with FieldReference should prefix
field with canonical name
+ Add UnqualifiedClassInstanceCreationExpression
+ updating jflex-maven-plugin to 1.8.2
+ Add reference to grammar documentation and hints to transform
it
+ Support Text Blocks
+ Support Sealed Classes
+ #67 Support records
+ #76 test with an @@ in comment
+ #64 Get interface via javaProjectBuilder.getClassByName
- Generate ant build file from maven pom and build using ant
-------------------------------------------------------------------
Thu Apr 29 23:11:06 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package qdox
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,14 +17,15 @@
Name: qdox
Version: 2.0.0
Version: 2.0.1
Release: 0
Summary: Tool to extract class/interface/method definitions from sources
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://github.com/paul-hammant/qdox
Source0: https://repo1.maven.org/maven2/com/thoughtworks/qdox/qdox/%{version}/%{name}-%{version}-project.tar.bz2
Source1: qdox-MANIFEST.MF
Source1: qdox-build.xml
BuildRequires: ant
BuildRequires: byaccj
BuildRequires: fdupes
BuildRequires: java-cup-bootstrap
@ -47,64 +48,45 @@ API docs for %{name}.
%prep
%setup -q
cp %{SOURCE1} build.xml
find -name *.jar -delete
find -name *.class -delete
rm -rf bootstrap
# Fix line endings
sed -i "s|\r||" README.md
# We don't need these plugins
%pom_remove_plugin :animal-sniffer-maven-plugin
%pom_remove_plugin :maven-assembly-plugin
%pom_remove_plugin :maven-failsafe-plugin
%pom_remove_plugin :maven-jflex-plugin
%pom_remove_plugin :maven-invoker-plugin
%pom_remove_plugin :jflex-maven-plugin
%pom_remove_plugin :maven-enforcer-plugin
%pom_xpath_set pom:workingDirectory '${basedir}/src/main/java/com/thoughtworks/qdox/parser/impl'
%pom_remove_plugin :exec-maven-plugin
%pom_remove_parent .
%build
# Generate scanners (upstream does this with maven-jflex-plugin)
# Add the --inputstreamctor option if jflex is upgraded to a version 1.6 or higher
CLASSPATH=$(build-classpath java-cup) \
jflex -d src/main/java/com/thoughtworks/qdox/parser/impl src/grammar/lexer.flex
CLASSPATH=$(build-classpath java-cup) \
jflex -d src/main/java/com/thoughtworks/qdox/parser/impl src/grammar/commentlexer.flex
jflex -d src/main/java/com/thoughtworks/qdox/parser/impl src/grammar/lexer.flex
jflex -d src/main/java/com/thoughtworks/qdox/parser/impl src/grammar/commentlexer.flex
# Generate the parsers using the command-line that the exec-maven-plugin uses
GRAMMAR_PATH=$(pwd)/src/grammar/commentparser.y && \
(cd src/main/java/com/thoughtworks/qdox/parser/impl && \
byaccj -v -Jnorun -Jnoconstruct -Jclass=DefaultJavaCommentParser \
-Jpackage=com.thoughtworks.qdox.parser.impl ${GRAMMAR_PATH})
GRAMMAR_PATH=$(pwd)/src/grammar/parser.y && \
(cd src/main/java/com/thoughtworks/qdox/parser/impl && \
byaccj -v -Jnorun -Jnoconstruct -Jclass=Parser \
-Jimplements=CommentHandler -Jsemantic=Value \
-Jpackage=com.thoughtworks.qdox.parser.impl \
-Jstack=500 ${GRAMMAR_PATH})
# Generate parsers (upstream does this with exec-maven-plugin)
(cd ./src/main/java/com/thoughtworks/qdox/parser/impl
byaccj -v -Jnorun -Jnoconstruct -Jclass=DefaultJavaCommentParser -Jpackage=com.thoughtworks.qdox.parser.impl ../../../../../../../grammar/commentparser.y
byaccj -v -Jnorun -Jnoconstruct -Jclass=Parser -Jimplements=CommentHandler -Jsemantic=Value -Jpackage=com.thoughtworks.qdox.parser.impl -Jstack=500 ../../../../../../../grammar/parser.y
)
# Build artifact
mkdir -p build/classes
javac -d build/classes -source 6 -target 6 \
$(find src/main/java -name \*.java)
jar cf build/%{name}-%{version}.jar -C build/classes .
# Inject OSGi manifests
jar ufm build/%{name}-%{version}.jar %{SOURCE1}
mkdir -p build/apidoc
javadoc -d build/apidoc -source 6 -notimestamp $(find src/main/java -name \*.java)
%ant jar javadoc
%install
# jar
install -dm 0755 %{buildroot}%{_javadir}
install -pm 0644 build/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
# pom
install -dm 0755 %{buildroot}%{_mavenpomdir}
install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
%add_maven_depmap %{name}.pom %{name}.jar -a qdox:qdox
# javadoc
mkdir -p %{buildroot}%{_javadocdir}/%{name}
cp -aL build/apidoc/* %{buildroot}%{_javadocdir}/%{name}
cp -aL target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles