From ccadbd6e7f2a6c9dffb1379df96c0064cfdef72d Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Wed, 9 Jan 2013 16:17:31 +0100 Subject: [PATCH] Run jflex manually before Maven build is started - Resolves: rhbz#879653 --- qdox-disable-xsite.patch | 60 ---------------------------------------- qdox.spec | 59 +++++++++++++++++++++++++++------------ 2 files changed, 41 insertions(+), 78 deletions(-) delete mode 100644 qdox-disable-xsite.patch diff --git a/qdox-disable-xsite.patch b/qdox-disable-xsite.patch deleted file mode 100644 index 7e4c6c9..0000000 --- a/qdox-disable-xsite.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- pom.xml.sav 2010-06-11 19:17:14.000000000 +0300 -+++ pom.xml 2010-10-05 22:53:09.146608222 +0300 -@@ -282,8 +282,8 @@ - ${basedir}/src/site/templates/site-template.vm - - -- -- org.codehaus.xsite -+ - - maven-resources-plugin - 2.3 -- -+ - - - org.apache.maven.plugins -@@ -371,7 +371,7 @@ - - - -- ant -+ org.apache.ant - ant - 1.5.1 - compile -@@ -384,12 +384,12 @@ - compile - true - -- -+ - - - diff --git a/qdox.spec b/qdox.spec index cc4ff3f..acce8a1 100644 --- a/qdox.spec +++ b/qdox.spec @@ -31,14 +31,13 @@ Summary: Extract class/interface/method definitions from sources Name: qdox Version: 1.12.1 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 0 License: ASL 2.0 URL: http://qdox.codehaus.org/ Group: Development/Libraries Source0: http://repo2.maven.org/maven2/com/thoughtworks/qdox/qdox/%{version}/%{name}-%{version}-project.tar.bz2 Source1: qdox-MANIFEST.MF -Patch0: %{name}-disable-xsite.patch BuildRequires: jpackage-utils >= 0:1.7.4 BuildRequires: java-devel >= 1:1.6.0 @@ -48,8 +47,6 @@ BuildRequires: junit >= 0:3.8.1 BuildRequires: byaccj BuildRequires: jflex BuildRequires: maven -BuildRequires: maven-ant-plugin -BuildRequires: maven-antrun-plugin BuildRequires: maven-assembly-plugin BuildRequires: maven-compiler-plugin BuildRequires: maven-changes-plugin @@ -61,14 +58,12 @@ BuildRequires: maven-install-plugin BuildRequires: maven-jar-plugin BuildRequires: maven-javadoc-plugin BuildRequires: maven-site-plugin -BuildRequires: maven-resources-plugin BuildRequires: maven-surefire-plugin BuildRequires: maven-surefire-provider-junit -BuildRequires: maven-jflex-plugin BuildRequires: maven-release-plugin BuildRequires: zip -Requires: java >= 1:1.6.0 +Requires: java >= 1:1.6.0 BuildArch: noarch Obsoletes: qdox-manual <= 0:1.9.2 @@ -92,22 +87,46 @@ API docs for %{name}. %prep %setup -q -%patch0 -b .sav -for j in $(find . -name "*.jar"); do - mv $j $j.no -done -rm bootstrap/yacc.* -ln -s /usr/bin/byaccj bootstrap/yacc.linux -ln -s /usr/bin/byaccj bootstrap/yacc.linux.x86_64 -ln -s $(build-classpath jflex) bootstrap -#ln -s $(build-classpath java-cup) bootstrap +find -name *.jar -delete +rm -rf bootstrap + +# Ant changed groupId +%pom_remove_dep ant:ant +%pom_add_dep org.apache.ant:ant + +# We don't need these plugins +%pom_remove_plugin :maven-antrun-plugin +%pom_remove_plugin :maven-jflex-plugin +%pom_remove_plugin :maven-resources-plugin +%pom_remove_plugin :xsite-maven-plugin %build +# Generate scanner (upstream does this with maven-jflex-plugin) +jflex \ + -d src/java \ + --skel src/grammar/skeleton.inner \ + src/grammar/lexer.flex + +# Generate parser (upstream does this with maven-antrun-plugin) +dir=src/java/com/thoughtworks/qdox/parser/impl +mkdir -p $dir +(cd ./$dir +byaccj \ + -v \ + -Jnorun \ + -Jnoconstruct \ + -Jclass=Parser \ + -Jsemantic=Value \ + -Jpackage=com.thoughtworks.qdox.parser.impl \ + ../../../../../../grammar/parser.y) + +# Build artifact mvn-rpmbuild \ -Dmaven.test.skip=true \ - ant:ant install javadoc:javadoc + install \ + javadoc:aggregate -# inject OSGi manifests +# Inject OSGi manifests mkdir -p META-INF cp -p %{SOURCE1} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF @@ -139,6 +158,10 @@ cp -pr target/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} %doc %{_javadocdir}/%{name} %changelog +* Wed Jan 9 2013 Mikolaj Izdebski - 0:1.12.1-2 +- Run jflex manually before Maven build is started +- Resolves: rhbz#879653 + * Tue Dec 11 2012 Alexander Kurtakov 0:1.12.1-1 - Update to latest upstream release.