From ccf7cb7830bd9f0ac29bc68e0dcf17a575d20415 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 29 Nov 2018 13:02:12 +0000 Subject: [PATCH 01/16] Remove explicit Epoch --- qdox.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/qdox.spec b/qdox.spec index ef7ca09..e19f68a 100644 --- a/qdox.spec +++ b/qdox.spec @@ -4,7 +4,6 @@ Summary: Extract class/interface/method definitions from sources Name: qdox Version: 2.0 Release: 3.%{vertag}%{?dist} -Epoch: 0 License: ASL 2.0 URL: https://github.com/paul-hammant/qdox BuildArch: noarch From 084ef10191d825502e6070b77294d26b6b6c9e28 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 24 May 2019 17:01:39 +0200 Subject: [PATCH 02/16] Mass rebuild for javapackages-tools 201901 --- qdox.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qdox.spec b/qdox.spec index e19f68a..a44080a 100644 --- a/qdox.spec +++ b/qdox.spec @@ -3,7 +3,7 @@ Summary: Extract class/interface/method definitions from sources Name: qdox Version: 2.0 -Release: 3.%{vertag}%{?dist} +Release: 4.%{vertag}%{?dist} License: ASL 2.0 URL: https://github.com/paul-hammant/qdox BuildArch: noarch @@ -75,6 +75,9 @@ jar ufm target/%{name}-%{version}*.jar %{SOURCE1} %doc LICENSE.txt %changelog +* Fri May 24 2019 Mikolaj Izdebski - 2.0-4.M9 +- Mass rebuild for javapackages-tools 201901 + * Tue Jul 31 2018 Michael Simacek - 0:2.0-3.M9 - Repack tarball to remove possibly proprietary binaries From 992e3f8df123fd63b16da6c4dab7bd52bc1544b5 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 7 Jun 2019 09:49:41 +0200 Subject: [PATCH 03/16] Don't use deprecated inputstreamctor option --- qdox.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qdox.spec b/qdox.spec index a44080a..237c5ac 100644 --- a/qdox.spec +++ b/qdox.spec @@ -3,7 +3,7 @@ Summary: Extract class/interface/method definitions from sources Name: qdox Version: 2.0 -Release: 4.%{vertag}%{?dist} +Release: 5.%{vertag}%{?dist} License: ASL 2.0 URL: https://github.com/paul-hammant/qdox BuildArch: noarch @@ -56,8 +56,8 @@ rm -rf bootstrap %build # Generate scanners (upstream does this with maven-jflex-plugin) -jflex --inputstreamctor -d src/main/java/com/thoughtworks/qdox/parser/impl src/grammar/lexer.flex -jflex --inputstreamctor -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 # Build artifact %mvn_build -f -- -Dqdox.byaccj.executable=byaccj @@ -75,6 +75,9 @@ jar ufm target/%{name}-%{version}*.jar %{SOURCE1} %doc LICENSE.txt %changelog +* Fri Jun 07 2019 Mikolaj Izdebski - 2.0-5.M9 +- Don't use deprecated inputstreamctor option + * Fri May 24 2019 Mikolaj Izdebski - 2.0-4.M9 - Mass rebuild for javapackages-tools 201901 From 256bc86d4e0714e0c84a1933db4c4a9c17a863e5 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 7 Jun 2019 10:02:22 +0200 Subject: [PATCH 04/16] Make the code compile with JFlex 1.7 --- qdox.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qdox.spec b/qdox.spec index 237c5ac..ad0f4d4 100644 --- a/qdox.spec +++ b/qdox.spec @@ -54,6 +54,10 @@ rm -rf bootstrap %pom_xpath_set pom:workingDirectory '${basedir}/src/main/java/com/thoughtworks/qdox/parser/impl' +# Compatibility with JFlex 1.7.0 +sed -i 's/JFlexLexer(\(.*\))/JFlexLexer(new java.io.InputStreamReader((\1), java.nio.charset.Charset.forName("UTF-8")))/' \ + src/main/java/com/thoughtworks/qdox/library/ClassLoaderLibrary.java + %build # Generate scanners (upstream does this with maven-jflex-plugin) jflex -d src/main/java/com/thoughtworks/qdox/parser/impl src/grammar/lexer.flex From 456c83d1c957ae6986f981e2cdbbd26b47038ca5 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 7 Jun 2019 10:40:23 +0200 Subject: [PATCH 05/16] Port to JFlex 1.7.0 --- 0001-Port-to-JFlex-1.7.0.patch | 39 ++++++++++++++++++++++++++++++++++ qdox.spec | 8 +++---- 2 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 0001-Port-to-JFlex-1.7.0.patch diff --git a/0001-Port-to-JFlex-1.7.0.patch b/0001-Port-to-JFlex-1.7.0.patch new file mode 100644 index 0000000..441858b --- /dev/null +++ b/0001-Port-to-JFlex-1.7.0.patch @@ -0,0 +1,39 @@ +From 31f530b26bd4625ffe41aa16c48836455ef81c23 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Fri, 7 Jun 2019 10:39:34 +0200 +Subject: [PATCH] Port to JFlex 1.7.0 + +--- + src/grammar/lexer.flex | 2 +- + .../java/com/thoughtworks/qdox/library/ClassLoaderLibrary.java | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/grammar/lexer.flex b/src/grammar/lexer.flex +index 9b567ff..cd9d5b6 100644 +--- a/src/grammar/lexer.flex ++++ b/src/grammar/lexer.flex +@@ -168,7 +168,7 @@ import java.util.*; + } + + public JFlexLexer( java.io.InputStream stream, java.io.Writer writer ) { +- this( stream ); ++ this( new java.io.InputStreamReader( stream, java.nio.charset.Charset.forName( "UTF-8" ) ) ); + this.writer = writer; + } + +diff --git a/src/main/java/com/thoughtworks/qdox/library/ClassLoaderLibrary.java b/src/main/java/com/thoughtworks/qdox/library/ClassLoaderLibrary.java +index c947f9b..5b415c0 100644 +--- a/src/main/java/com/thoughtworks/qdox/library/ClassLoaderLibrary.java ++++ b/src/main/java/com/thoughtworks/qdox/library/ClassLoaderLibrary.java +@@ -112,7 +112,7 @@ public class ClassLoaderLibrary + if ( sourceStream != null ) + { + Builder builder = getModelBuilder(); +- JavaLexer lexer = new JFlexLexer( sourceStream ); ++ JavaLexer lexer = new JFlexLexer( new java.io.InputStreamReader( sourceStream, java.nio.charset.Charset.forName( "UTF-8" ) ) ); + Parser parser = new Parser( lexer, builder ); + parser.setDebugLexer( debugLexer ); + parser.setDebugParser( debugParser ); +-- +2.21.0 + diff --git a/qdox.spec b/qdox.spec index ad0f4d4..7b35e0a 100644 --- a/qdox.spec +++ b/qdox.spec @@ -14,6 +14,7 @@ Source1: qdox-MANIFEST.MF # Remove bundled binaries which are possibly proprietary Source2: generate-tarball.sh +Patch0: 0001-Port-to-JFlex-1.7.0.patch BuildRequires: maven-local BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin) @@ -40,6 +41,7 @@ API docs for %{name}. %prep %setup -q -n %{name}-%{version}-%{vertag} +%patch0 -p1 find -name *.jar -delete rm -rf bootstrap @@ -54,10 +56,6 @@ rm -rf bootstrap %pom_xpath_set pom:workingDirectory '${basedir}/src/main/java/com/thoughtworks/qdox/parser/impl' -# Compatibility with JFlex 1.7.0 -sed -i 's/JFlexLexer(\(.*\))/JFlexLexer(new java.io.InputStreamReader((\1), java.nio.charset.Charset.forName("UTF-8")))/' \ - src/main/java/com/thoughtworks/qdox/library/ClassLoaderLibrary.java - %build # Generate scanners (upstream does this with maven-jflex-plugin) jflex -d src/main/java/com/thoughtworks/qdox/parser/impl src/grammar/lexer.flex @@ -80,7 +78,7 @@ jar ufm target/%{name}-%{version}*.jar %{SOURCE1} %changelog * Fri Jun 07 2019 Mikolaj Izdebski - 2.0-5.M9 -- Don't use deprecated inputstreamctor option +- Port to JFlex 1.7.0 * Fri May 24 2019 Mikolaj Izdebski - 2.0-4.M9 - Mass rebuild for javapackages-tools 201901 From edef7d98bb5b4c58ca3de8243f1f1b21570b65a3 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 18 Sep 2019 14:29:42 +0200 Subject: [PATCH 06/16] Update to upstream version 2.0~M10 --- .gitignore | 1 + generate-tarball.sh | 9 ++++----- qdox.spec | 19 +++++++++---------- sources | 2 +- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 02ce7c3..77ef64d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ qdox-1.12-project.tar.bz2 /qdox-2.0-M7-project.tar.gz /qdox-2.0-M9-project.tar.gz /qdox-2.0-M9.tar.gz +/qdox-2.0~M10.tar.gz diff --git a/generate-tarball.sh b/generate-tarball.sh index 7e63681..6fb2053 100755 --- a/generate-tarball.sh +++ b/generate-tarball.sh @@ -3,15 +3,14 @@ set -e name=qdox version="$(sed -n 's/Version:\s*//p' *.spec)" -vertag="$(sed -n 's/%global\s*vertag\s*//p' *.spec)" # RETRIEVE -wget "http://repo2.maven.org/maven2/com/thoughtworks/qdox/qdox/${version}-${vertag}/${name}-${version}-${vertag}-project.tar.gz" -O "${name}-${version}-${vertag}.orig.tar.gz" +wget "http://repo2.maven.org/maven2/com/thoughtworks/qdox/qdox/${version/'~'/'-'}/${name}-${version/'~'/'-'}-project.tar.gz" -O "${name}-${version}.orig.tar.gz" rm -rf tarball-tmp mkdir tarball-tmp cd tarball-tmp -tar xf "../${name}-${version}-${vertag}.orig.tar.gz" +tar xf "../${name}-${version}.orig.tar.gz" # CLEAN TARBALL find -name '*.jar' -delete @@ -19,6 +18,6 @@ find -name '*.class' -delete # contains possibly proprietary binaries of YACC rm -r */bootstrap -tar cf "../${name}-${version}-${vertag}.tar.gz" * +tar cf "../${name}-${version}.tar.gz" * cd .. -rm -r tarball-tmp "${name}-${version}-${vertag}.orig.tar.gz" +rm -r tarball-tmp "${name}-${version}.orig.tar.gz" diff --git a/qdox.spec b/qdox.spec index 7b35e0a..e320342 100644 --- a/qdox.spec +++ b/qdox.spec @@ -1,15 +1,13 @@ -%global vertag M9 - -Summary: Extract class/interface/method definitions from sources Name: qdox -Version: 2.0 -Release: 5.%{vertag}%{?dist} +Version: 2.0~M10 +Release: 1%{?dist} +Summary: Extract class/interface/method definitions from sources License: ASL 2.0 URL: https://github.com/paul-hammant/qdox BuildArch: noarch # ./generate-tarball.sh -Source0: %{name}-%{version}-%{vertag}.tar.gz +Source0: %{name}-%{version}.tar.gz Source1: qdox-MANIFEST.MF # Remove bundled binaries which are possibly proprietary Source2: generate-tarball.sh @@ -38,12 +36,9 @@ Summary: Javadoc for %{name} %description javadoc API docs for %{name}. - %prep -%setup -q -n %{name}-%{version}-%{vertag} +%setup -q -n %{name}-%(echo %{version} | tr '~' '-') %patch0 -p1 -find -name *.jar -delete -rm -rf bootstrap # We don't need these plugins %pom_remove_plugin :animal-sniffer-maven-plugin @@ -65,6 +60,7 @@ jflex -d src/main/java/com/thoughtworks/qdox/parser/impl src/grammar/commentlexe %mvn_build -f -- -Dqdox.byaccj.executable=byaccj # Inject OSGi manifests +# Even if the version contains the ~ milestone, the output is the same jar ufm target/%{name}-%{version}*.jar %{SOURCE1} %install @@ -77,6 +73,9 @@ jar ufm target/%{name}-%{version}*.jar %{SOURCE1} %doc LICENSE.txt %changelog +* Wed Sep 18 2019 Marian Koncek - 2.0~M10-1 +- Update to upstream version 2.0~M10 + * Fri Jun 07 2019 Mikolaj Izdebski - 2.0-5.M9 - Port to JFlex 1.7.0 diff --git a/sources b/sources index 3d2be3a..bcfedc3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qdox-2.0-M9.tar.gz) = 739f80beb5c9096774923a29731a93754be9b6d434c2fcdaced70dd2f43f102041c53f6b405b88fa2482f3a8f4e8ede701ffc6b14dcbc77c5030c1e0060149f9 +SHA512 (qdox-2.0~M10.tar.gz) = f0f2c7f5d37bd4d4b20a41bdeb538a4ddb5c303c974a2c1b17be92fcd6875ddd9de2a629c8e724ecef7e318cfb993c8bf6a743fb6fcffc4a2a5cbb9ac4917560 From 84fd84a54d567d5f8229a477c721ad772369ab75 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 18 Sep 2019 15:01:39 +0200 Subject: [PATCH 07/16] Fix OSGI generation --- qdox.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qdox.spec b/qdox.spec index e320342..14a5db7 100644 --- a/qdox.spec +++ b/qdox.spec @@ -1,3 +1,5 @@ +%global upstream_version %(echo %{version} | tr '~' '-') + Name: qdox Version: 2.0~M10 Release: 1%{?dist} @@ -37,7 +39,7 @@ Summary: Javadoc for %{name} API docs for %{name}. %prep -%setup -q -n %{name}-%(echo %{version} | tr '~' '-') +%setup -q -n %{name}-%{upstream_version} %patch0 -p1 # We don't need these plugins @@ -60,8 +62,7 @@ jflex -d src/main/java/com/thoughtworks/qdox/parser/impl src/grammar/commentlexe %mvn_build -f -- -Dqdox.byaccj.executable=byaccj # Inject OSGi manifests -# Even if the version contains the ~ milestone, the output is the same -jar ufm target/%{name}-%{version}*.jar %{SOURCE1} +jar ufm target/%{name}-%{upstream_version}.jar %{SOURCE1} %install %mvn_install From d82dca5e37c6e27a4d325b1d3c7b8d834d43399e Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 5 Nov 2019 17:29:28 +0100 Subject: [PATCH 08/16] Mass rebuild for javapackages-tools 201902 --- qdox.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qdox.spec b/qdox.spec index 14a5db7..089320a 100644 --- a/qdox.spec +++ b/qdox.spec @@ -2,7 +2,7 @@ Name: qdox Version: 2.0~M10 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Extract class/interface/method definitions from sources License: ASL 2.0 URL: https://github.com/paul-hammant/qdox @@ -74,6 +74,9 @@ jar ufm target/%{name}-%{upstream_version}.jar %{SOURCE1} %doc LICENSE.txt %changelog +* Tue Nov 05 2019 Mikolaj Izdebski - 2.0~M10-2 +- Mass rebuild for javapackages-tools 201902 + * Wed Sep 18 2019 Marian Koncek - 2.0~M10-1 - Update to upstream version 2.0~M10 From 01aff73b77bf64107bcdfc4ced46d14fbc51a6f8 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Mon, 27 Jan 2020 16:23:32 +0100 Subject: [PATCH 09/16] Properly compress tarballs --- generate-tarball.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generate-tarball.sh b/generate-tarball.sh index 6fb2053..5e841b3 100755 --- a/generate-tarball.sh +++ b/generate-tarball.sh @@ -9,7 +9,7 @@ wget "http://repo2.maven.org/maven2/com/thoughtworks/qdox/qdox/${version/'~'/'-' rm -rf tarball-tmp mkdir tarball-tmp -cd tarball-tmp +pushd tarball-tmp tar xf "../${name}-${version}.orig.tar.gz" # CLEAN TARBALL @@ -18,6 +18,6 @@ find -name '*.class' -delete # contains possibly proprietary binaries of YACC rm -r */bootstrap -tar cf "../${name}-${version}.tar.gz" * -cd .. +tar -czf "../${name}-${version}.tar.gz" * +popd rm -r tarball-tmp "${name}-${version}.orig.tar.gz" From b4fa8dfdffe7d346888b7f234aea3074e40a717c Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 26 Feb 2020 14:34:04 +0100 Subject: [PATCH 10/16] Update to upstream version 2.0.0 --- .gitignore | 1 + generate-tarball.sh | 4 ++-- qdox.spec | 12 ++++++++---- sources | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 77ef64d..b55a586 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ qdox-1.12-project.tar.bz2 /qdox-2.0-M9-project.tar.gz /qdox-2.0-M9.tar.gz /qdox-2.0~M10.tar.gz +/qdox-2.0.0.tar.gz diff --git a/generate-tarball.sh b/generate-tarball.sh index 5e841b3..dea833b 100755 --- a/generate-tarball.sh +++ b/generate-tarball.sh @@ -5,12 +5,12 @@ name=qdox version="$(sed -n 's/Version:\s*//p' *.spec)" # RETRIEVE -wget "http://repo2.maven.org/maven2/com/thoughtworks/qdox/qdox/${version/'~'/'-'}/${name}-${version/'~'/'-'}-project.tar.gz" -O "${name}-${version}.orig.tar.gz" +wget "https://repo1.maven.org/maven2/com/thoughtworks/qdox/qdox/${version/'~'/'-'}/${name}-${version/'~'/'-'}-project.tar.gz" -O "${name}-${version}.orig.tar.gz" rm -rf tarball-tmp mkdir tarball-tmp pushd tarball-tmp -tar xf "../${name}-${version}.orig.tar.gz" +tar -xf "../${name}-${version}.orig.tar.gz" # CLEAN TARBALL find -name '*.jar' -delete diff --git a/qdox.spec b/qdox.spec index 089320a..c59c361 100644 --- a/qdox.spec +++ b/qdox.spec @@ -1,8 +1,8 @@ %global upstream_version %(echo %{version} | tr '~' '-') Name: qdox -Version: 2.0~M10 -Release: 2%{?dist} +Version: 2.0.0 +Release: 1%{?dist} Summary: Extract class/interface/method definitions from sources License: ASL 2.0 URL: https://github.com/paul-hammant/qdox @@ -68,12 +68,16 @@ jar ufm target/%{name}-%{upstream_version}.jar %{SOURCE1} %mvn_install %files -f .mfiles -%doc LICENSE.txt README.md +%license LICENSE.txt +%doc README.md %files javadoc -f .mfiles-javadoc -%doc LICENSE.txt +%license LICENSE.txt %changelog +* Wed Feb 26 2020 Marian Koncek - 2.0.0-1 +- Update to upstream version 2.0.0 + * Tue Nov 05 2019 Mikolaj Izdebski - 2.0~M10-2 - Mass rebuild for javapackages-tools 201902 diff --git a/sources b/sources index bcfedc3..36d0ac0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qdox-2.0~M10.tar.gz) = f0f2c7f5d37bd4d4b20a41bdeb538a4ddb5c303c974a2c1b17be92fcd6875ddd9de2a629c8e724ecef7e318cfb993c8bf6a743fb6fcffc4a2a5cbb9ac4917560 +SHA512 (qdox-2.0.0.tar.gz) = 2ea7bd97ca720856a3f61aa12d4ec681708b599fe87c8942ac19e41b59cb56d3583f0953dc280d6244334d19762b7fe0c5693ee7acbaff2a4b421a3c959139b6 From e36a51727b5574eab96eef4a04bddda591e7cb79 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 21 Apr 2020 05:49:29 +0200 Subject: [PATCH 11/16] Drop dependency maven-invoker-plugin --- qdox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qdox.spec b/qdox.spec index c59c361..7076dfe 100644 --- a/qdox.spec +++ b/qdox.spec @@ -18,7 +18,6 @@ Patch0: 0001-Port-to-JFlex-1.7.0.patch BuildRequires: maven-local BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin) -BuildRequires: mvn(org.apache.maven.plugins:maven-invoker-plugin) BuildRequires: mvn(org.codehaus.mojo:exec-maven-plugin) BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) @@ -45,6 +44,7 @@ API docs for %{name}. # We don't need these plugins %pom_remove_plugin :animal-sniffer-maven-plugin %pom_remove_plugin :maven-failsafe-plugin +%pom_remove_plugin :maven-invoker-plugin %pom_remove_plugin :maven-jflex-plugin %pom_remove_plugin :maven-enforcer-plugin From f7eb4eb5716bac86bf328b1df1c0006046489ab8 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 23 Apr 2020 13:20:41 +0200 Subject: [PATCH 12/16] Remove use of exec-maven-plugin --- qdox.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/qdox.spec b/qdox.spec index 7076dfe..6012993 100644 --- a/qdox.spec +++ b/qdox.spec @@ -18,7 +18,6 @@ Patch0: 0001-Port-to-JFlex-1.7.0.patch BuildRequires: maven-local BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin) -BuildRequires: mvn(org.codehaus.mojo:exec-maven-plugin) BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) BuildRequires: byaccj @@ -47,19 +46,24 @@ API docs for %{name}. %pom_remove_plugin :maven-invoker-plugin %pom_remove_plugin :maven-jflex-plugin %pom_remove_plugin :maven-enforcer-plugin +%pom_remove_plugin :exec-maven-plugin %mvn_file : %{name} %mvn_alias : qdox:qdox -%pom_xpath_set pom:workingDirectory '${basedir}/src/main/java/com/thoughtworks/qdox/parser/impl' - %build # Generate scanners (upstream does this with maven-jflex-plugin) 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 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 -%mvn_build -f -- -Dqdox.byaccj.executable=byaccj +%mvn_build -f # Inject OSGi manifests jar ufm target/%{name}-%{upstream_version}.jar %{SOURCE1} From 7a2c7629ef541068732dba90238ecf59457c7e06 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 18 May 2020 16:42:50 +0200 Subject: [PATCH 13/16] Remove dependency on maven-assembly-plugin --- qdox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qdox.spec b/qdox.spec index 6012993..12ac045 100644 --- a/qdox.spec +++ b/qdox.spec @@ -17,7 +17,6 @@ Source2: generate-tarball.sh Patch0: 0001-Port-to-JFlex-1.7.0.patch BuildRequires: maven-local -BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin) BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) BuildRequires: byaccj @@ -42,6 +41,7 @@ API docs for %{name}. # 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-invoker-plugin %pom_remove_plugin :maven-jflex-plugin From 9c28b8103801c0e2ad1a231fa25cc35655d0a5ec Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 16 Apr 2021 15:33:13 +0200 Subject: [PATCH 14/16] Conditionalize buildrequires in bootstrap mode --- qdox.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qdox.spec b/qdox.spec index 12ac045..2d11af1 100644 --- a/qdox.spec +++ b/qdox.spec @@ -1,3 +1,5 @@ +%bcond_without bootstrap + %global upstream_version %(echo %{version} | tr '~' '-') Name: qdox @@ -17,10 +19,13 @@ Source2: generate-tarball.sh Patch0: 0001-Port-to-JFlex-1.7.0.patch BuildRequires: maven-local -BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) - BuildRequires: byaccj +%if %{with bootstrap} +BuildRequires: javapackages-bootstrap +%else BuildRequires: jflex +BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) +%endif %description QDox is a high speed, small footprint parser From b563d6f9893c17c8704379b891abbd256aab47c2 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 16 Apr 2021 18:39:22 +0200 Subject: [PATCH 15/16] Set PATH when calling jflex in bootstrap mode --- qdox.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qdox.spec b/qdox.spec index 2d11af1..bbb3c2f 100644 --- a/qdox.spec +++ b/qdox.spec @@ -57,6 +57,8 @@ API docs for %{name}. %mvn_alias : qdox:qdox %build +%{?jpb_env} + # Generate scanners (upstream does this with maven-jflex-plugin) 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 From bad386b93c101b3d8a1658aa4914aca385bc2832 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 13 May 2021 19:08:43 +0200 Subject: [PATCH 16/16] Turn off bootstrap mode by default --- qdox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qdox.spec b/qdox.spec index bbb3c2f..0a025de 100644 --- a/qdox.spec +++ b/qdox.spec @@ -1,4 +1,4 @@ -%bcond_without bootstrap +%bcond_with bootstrap %global upstream_version %(echo %{version} | tr '~' '-')