Re: Building fop from source using qdox 1.11

2012-05-14 Thread Vincent Hennebert
Hi Mathieu,

It doesn’t seem to be a QDox issue here. It seems like you are missing
the Apache Commons IO dependency. It is necessary to build the list of
parameters for those testcases that @RunWith(Parameterized.class). By
adding Commons IO to the build path you should be able to build FOP
successfully.

Vincent


On 02/05/12 09:48, Mathieu Malaterre wrote:
 Hi all,
 
 On Mon, Aug 29, 2011 at 1:37 PM, Simon Pepping spepp...@leverkruid.eu wrote:
 It would be good if alternative builds of fop would run a number of
 our junit tests. The fop team should look into this to formulate a
 recommendation.
 
 I saw some activities on some of the bug I reported in fop 1.0. So I
 am resurecting this old thread. Here is the output of running the fop
 test suite during debian installation:
 
 Simply go to:
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=639683#24
 
 You'll find the stripped foptest.log there.
 
 Thanks,

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Building fop from source using qdox 1.11

2012-05-02 Thread Mathieu Malaterre
Hi all,

On Mon, Aug 29, 2011 at 1:37 PM, Simon Pepping spepp...@leverkruid.eu wrote:
 It would be good if alternative builds of fop would run a number of
 our junit tests. The fop team should look into this to formulate a
 recommendation.

I saw some activities on some of the bug I reported in fop 1.0. So I
am resurecting this old thread. Here is the output of running the fop
test suite during debian installation:

Simply go to:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=639683#24

You'll find the stripped foptest.log there.

Thanks,
-- 
Mathieu

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



running fop tests (Re: Building fop from source using qdox 1.11)

2011-09-16 Thread Mathieu Malaterre
Hi Simon,

On Mon, Aug 29, 2011 at 1:37 PM, Simon Pepping spepp...@leverkruid.eu wrote:
 It would be good if alternative builds of fop would run a number of
 our junit tests. The fop team should look into this to formulate a
 recommendation.

AFAIK running fop tests simply involved running the 'junit' ant target
? Right ? In this case the code does not compile for me:

[javac]
/home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/util/text/LocatorFormatter.java
[javac] 
/home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:64:
generics are not supported in -source 1.4
[javac] (use -source 5 or higher to enable generics)
[javac] private ListAFMCharMetrics charMetrics = new
java.util.ArrayListAFMCharMetrics();
[javac] ^
[javac] 
/home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:418:
for-each loops are not supported in -source 1.4
[javac] (use -source 5 or higher to enable for-each loops)
[javac] for (Map.EntryString, MapString, Dimension2D
entryFrom : this.kerningMap.entrySet()) {
[javac]^
[javac] 
/home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:500:
annotations are not supported in -source 1.4
[javac] (use -source 5 or higher to enable annotations)
[javac] @Override
[javac]  ^
[javac] 3 errors


Can I switch the target version ?

Thanks
-- 
Mathieu

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Building fop from source using qdox 1.11

2011-08-31 Thread Simon Pepping
I made some notes about possible alternative build procedures on the FOP wiki,
http://wiki.apache.org/xmlgraphics-fop/HowTo/BuildFOPAlternatively

Simon

On Mon, Aug 29, 2011 at 01:37:56PM +0200, Simon Pepping wrote:
 I see that you resolved the problem by copying qdox.jar from
 /usr/share/java to lib/build before the build process. I installed the
 resulting package fop_1.0.dfsg2-2 and ran it on a few test files. The
 result was OK.
 
 It would be good if alternative builds of fop would run a number of
 our junit tests. The fop team should look into this to formulate a
 recommendation.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Building fop from source using qdox 1.11

2011-08-29 Thread Simon Pepping
I see that you resolved the problem by copying qdox.jar from
/usr/share/java to lib/build before the build process. I installed the
resulting package fop_1.0.dfsg2-2 and ran it on a few test files. The
result was OK.

It would be good if alternative builds of fop would run a number of
our junit tests. The fop team should look into this to formulate a
recommendation.

Simon

On Sat, Aug 27, 2011 at 08:50:37PM +0200, Simon Pepping wrote:
 It is an interesting observation that fop can be compiled with
 qdox-1.12 in the lib/build directory, but not in the CLASSPATH
 variable. It even works with FOP's own jar files:
 
 CLASSPATH=lib/build/qdox-1.6.3.jar ant clean resourcegen
 
 in fop-1.0 fails, while
 
 ant clean resourcegen
 
 succeeds. The same error can be provoked in fop's development version.
 This problem is not a problem of qdox version, but of the way ant
 deals with the CLASSPATH variable, and the way qdox reacts to that.
 Somehow it does not have the effect of simply placing those jars in
 front of the classpath constructed in the build script.
 
 I cannot tell you how you should set your CLASSPATH variable for a
 variant build environment. It all depends on your requirements. If you
 wish to build fop with fop's build script but with jar files in the
 system, you might best edit the classpath variables in the build
 script: libs-build-classpath, libs-tools-build-classpath,
 libs-run-classpath. A quick scan of the build script suggests that
 almost all classpaths are constructed using these variables, plus the
 build directories created by earlier stages of the build. Exceptions
 are javadocs, which also uses ${java.class.path}, and findbugs, which
 uses ${libs-findbugs}.
 
 Simon
 

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Building fop from source using qdox 1.11

2011-08-27 Thread Simon Pepping
It is an interesting observation that fop can be compiled with
qdox-1.12 in the lib/build directory, but not in the CLASSPATH
variable. It even works with FOP's own jar files:

CLASSPATH=lib/build/qdox-1.6.3.jar ant clean resourcegen

in fop-1.0 fails, while

ant clean resourcegen

succeeds. The same error can be provoked in fop's development version.
This problem is not a problem of qdox version, but of the way ant
deals with the CLASSPATH variable, and the way qdox reacts to that.
Somehow it does not have the effect of simply placing those jars in
front of the classpath constructed in the build script.

I cannot tell you how you should set your CLASSPATH variable for a
variant build environment. It all depends on your requirements. If you
wish to build fop with fop's build script but with jar files in the
system, you might best edit the classpath variables in the build
script: libs-build-classpath, libs-tools-build-classpath,
libs-run-classpath. A quick scan of the build script suggests that
almost all classpaths are constructed using these variables, plus the
build directories created by earlier stages of the build. Exceptions
are javadocs, which also uses ${java.class.path}, and findbugs, which
uses ${libs-findbugs}.

Simon

On Fri, Aug 26, 2011 at 11:46:39PM +0200, Mathieu Malaterre wrote:
 Hi Simon,
 
   Great we are making some progress. Since you are using debian, this
 will be even easier. Try the attached script.
 
   If you are on a debian machine with:
 
 $ apt-cache policy libqdox-java
 libqdox-java:
   Installed: 1.12-1
 
   You should quickly discover that indeed qdox-1.12 from debian allows
 proper compilation of fop, *if and only if* copied to lib/build.
 
   When using the second version (via export CLASSPATH), one indeed get
 the error you have seen. I could even reproduce the error using some
 precompile qdox jar file:
 
 mkdir /tmp/cp
 cd /tmp/cp
 wget 
 http://mirrors.ibiblio.org/pub/mirrors/maven2/com/thoughtworks/qdox/qdox/1.12/qdox-1.12.jar
 export CLASSPATH=/tmp/cp/qdox-1.12.jar
 
 leads also to the exact same error (*).
 
 So now the question, is how did I misread the instructions from:
 
 http://xmlgraphics.apache.org/fop/1.0/compiling.html#env-classpath
 
 How should I be setting up my CLASSPATH to compile fop ?
 
 Thanks again very much for your time,
 
 
 (*)
 BUILD FAILED
 /tmp/clean/fop-1.0/build.xml:374: java.lang.NullPointerException
   at 
 org.apache.fop.tools.EventProducerCollector.createMethodModel(EventProducerCollector.java:142)
   at 
 org.apache.fop.tools.EventProducerCollector.processEventProducerInterface(EventProducerCollector.java:130)
   at 
 org.apache.fop.tools.EventProducerCollector.scanFile(EventProducerCollector.java:100)
   at 
 org.apache.fop.tools.EventProducerCollectorTask.processFileSets(EventProducerCollectorTask.java:213)
   at 
 org.apache.fop.tools.EventProducerCollectorTask.execute(EventProducerCollectorTask.java:69)
   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
   at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:616)
   at 
 org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   at org.apache.tools.ant.Task.perform(Task.java:348)
   at org.apache.tools.ant.Target.execute(Target.java:390)
   at org.apache.tools.ant.Target.performTasks(Target.java:411)
   at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
   at org.apache.tools.ant.Project.executeTarget(Project.java:1329)
   at 
 org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
   at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
   at org.apache.tools.ant.Main.runBuild(Main.java:801)
   at org.apache.tools.ant.Main.startAnt(Main.java:218)
   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Building fop from source using qdox 1.11

2011-08-26 Thread Mathieu Malaterre
Dear all,

  I am trying to build fop from source using qdox 1.11. On my debian
system here is what I did:

$ wget 
http://mir2.ovh.net/ftp.apache.org/dist//xmlgraphics/fop/source/fop-1.0-src.tar.gz
$ tar xfz fop-1.0-src.tar.gz
$ cd fop-1.0
$ export CLASSPATH=/usr/share/java/qdox.jar:/usr/share/java/commons-io.jar
$ ant resourcegen

This leads to the following error (*). I would like to know whether:

- building fop from source using qdox version != 1.6.3 is actually supported ?
- did anyone tried to compile fop with a more recent qdox version ?

If not, where can I download source code for qdox 1.6.3, I could not
find it on the official website:
http://snapshots.repository.codehaus.org/com/thoughtworks/qdox/qdox/

Thank you very much for your time,
-Mathieu

(*)
BUILD FAILED
/tmp/test/fop-1.0/build.xml:374: java.lang.NullPointerException
at 
org.apache.fop.tools.EventProducerCollector.createMethodModel(EventProducerCollector.java:142)
at 
org.apache.fop.tools.EventProducerCollector.processEventProducerInterface(EventProducerCollector.java:130)
at 
org.apache.fop.tools.EventProducerCollector.scanFile(EventProducerCollector.java:100)
at 
org.apache.fop.tools.EventProducerCollectorTask.processFileSets(EventProducerCollectorTask.java:213)
at 
org.apache.fop.tools.EventProducerCollectorTask.execute(EventProducerCollectorTask.java:69)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
at org.apache.tools.ant.Project.executeTarget(Project.java:1329)
at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
at org.apache.tools.ant.Main.runBuild(Main.java:801)
at org.apache.tools.ant.Main.startAnt(Main.java:218)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 13 seconds

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Building fop from source using qdox 1.11

2011-08-26 Thread Simon Pepping
Earlier I wrote:

I took the source code of fop-1.0, replaced lib/build/qdox-1.6.3.jar
with lib/build/qdox-1.12.jar from fop's development code, and ran ant
compile and ant junit. Both were successfull. There is a warning about
a deprecated method, but that is not fatal. The answer to your
question is: yes, fop-1.0 can be successfully built with qdox-1.12.

I now did as you describe below, on a debian testing system, and got
your error indeed.

ls -l /usr/share/java/qdox.jar
lrwxrwxrwx 1 root root 13 mei  3 23:53 /usr/share/java/qdox.jar - qdox-1.12.jar

Conclusion: There is a difference between lib/build/qdox-1.12.jar in
fop's development code and /usr/share/java/qdox-1.12.jar in debian
testing.

Looking at the code, the NPE is generated by the call
method.getReturns().isVoid(). method is not null, because it has been
referenced in the preceding line. So method.getReturns() is null.
method.getReturns() is the deprecated method, but one would expect
that such a method would always return a non-null object, since any
method has a return type, even if void.

You can check why debian's qdox-1.12 is different from fop's, or patch
fop's code at
org.apache.fop.tools.EventProducerCollector.createMethodModel(EventProducerCollector.java:142)
(src/codegen/java/org/apache/fop/tools/EventProducerCollector.java) to
use method.getReturnType() instead of method.getReturns(). FOP's
development code uses method.getReturnType() and qdox-1.12.

Simon

On Fri, Aug 26, 2011 at 01:45:04PM +0200, Mathieu Malaterre wrote:
 Dear all,
 
   I am trying to build fop from source using qdox 1.11. On my debian
 system here is what I did:
 
 $ wget 
 http://mir2.ovh.net/ftp.apache.org/dist//xmlgraphics/fop/source/fop-1.0-src.tar.gz
 $ tar xfz fop-1.0-src.tar.gz
 $ cd fop-1.0
 $ export CLASSPATH=/usr/share/java/qdox.jar:/usr/share/java/commons-io.jar
 $ ant resourcegen
 
 This leads to the following error (*). I would like to know whether:
 
 - building fop from source using qdox version != 1.6.3 is actually supported ?
 - did anyone tried to compile fop with a more recent qdox version ?
 
 If not, where can I download source code for qdox 1.6.3, I could not
 find it on the official website:
 http://snapshots.repository.codehaus.org/com/thoughtworks/qdox/qdox/
 
 Thank you very much for your time,
 -Mathieu
 
 (*)
 BUILD FAILED
 /tmp/test/fop-1.0/build.xml:374: java.lang.NullPointerException
   at 
 org.apache.fop.tools.EventProducerCollector.createMethodModel(EventProducerCollector.java:142)
   at 
 org.apache.fop.tools.EventProducerCollector.processEventProducerInterface(EventProducerCollector.java:130)
   at 
 org.apache.fop.tools.EventProducerCollector.scanFile(EventProducerCollector.java:100)
   at 
 org.apache.fop.tools.EventProducerCollectorTask.processFileSets(EventProducerCollectorTask.java:213)
   at 
 org.apache.fop.tools.EventProducerCollectorTask.execute(EventProducerCollectorTask.java:69)
   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
   at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:616)
   at 
 org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   at org.apache.tools.ant.Task.perform(Task.java:348)
   at org.apache.tools.ant.Target.execute(Target.java:390)
   at org.apache.tools.ant.Target.performTasks(Target.java:411)
   at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
   at org.apache.tools.ant.Project.executeTarget(Project.java:1329)
   at 
 org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
   at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
   at org.apache.tools.ant.Main.runBuild(Main.java:801)
   at org.apache.tools.ant.Main.startAnt(Main.java:218)
   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
 
 Total time: 13 seconds
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Building fop from source using qdox 1.11

2011-08-26 Thread Mathieu Malaterre
Hi Simon,

  Great we are making some progress. Since you are using debian, this
will be even easier. Try the attached script.

  If you are on a debian machine with:

$ apt-cache policy libqdox-java
libqdox-java:
  Installed: 1.12-1

  You should quickly discover that indeed qdox-1.12 from debian allows
proper compilation of fop, *if and only if* copied to lib/build.

  When using the second version (via export CLASSPATH), one indeed get
the error you have seen. I could even reproduce the error using some
precompile qdox jar file:

mkdir /tmp/cp
cd /tmp/cp
wget 
http://mirrors.ibiblio.org/pub/mirrors/maven2/com/thoughtworks/qdox/qdox/1.12/qdox-1.12.jar
export CLASSPATH=/tmp/cp/qdox-1.12.jar

leads also to the exact same error (*).

So now the question, is how did I misread the instructions from:

http://xmlgraphics.apache.org/fop/1.0/compiling.html#env-classpath

How should I be setting up my CLASSPATH to compile fop ?

Thanks again very much for your time,


(*)
BUILD FAILED
/tmp/clean/fop-1.0/build.xml:374: java.lang.NullPointerException
at 
org.apache.fop.tools.EventProducerCollector.createMethodModel(EventProducerCollector.java:142)
at 
org.apache.fop.tools.EventProducerCollector.processEventProducerInterface(EventProducerCollector.java:130)
at 
org.apache.fop.tools.EventProducerCollector.scanFile(EventProducerCollector.java:100)
at 
org.apache.fop.tools.EventProducerCollectorTask.processFileSets(EventProducerCollectorTask.java:213)
at 
org.apache.fop.tools.EventProducerCollectorTask.execute(EventProducerCollectorTask.java:69)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
at org.apache.tools.ant.Project.executeTarget(Project.java:1329)
at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
at org.apache.tools.ant.Main.runBuild(Main.java:801)
at org.apache.tools.ant.Main.startAnt(Main.java:218)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)


On Fri, Aug 26, 2011 at 8:09 PM, Simon Pepping spepp...@leverkruid.eu wrote:
 Earlier I wrote:

 I took the source code of fop-1.0, replaced lib/build/qdox-1.6.3.jar
 with lib/build/qdox-1.12.jar from fop's development code, and ran ant
 compile and ant junit. Both were successfull. There is a warning about
 a deprecated method, but that is not fatal. The answer to your
 question is: yes, fop-1.0 can be successfully built with qdox-1.12.

 I now did as you describe below, on a debian testing system, and got
 your error indeed.

ls -l /usr/share/java/qdox.jar
 lrwxrwxrwx 1 root root 13 mei  3 23:53 /usr/share/java/qdox.jar - 
 qdox-1.12.jar

 Conclusion: There is a difference between lib/build/qdox-1.12.jar in
 fop's development code and /usr/share/java/qdox-1.12.jar in debian
 testing.

 Looking at the code, the NPE is generated by the call
 method.getReturns().isVoid(). method is not null, because it has been
 referenced in the preceding line. So method.getReturns() is null.
 method.getReturns() is the deprecated method, but one would expect
 that such a method would always return a non-null object, since any
 method has a return type, even if void.

 You can check why debian's qdox-1.12 is different from fop's, or patch
 fop's code at
 org.apache.fop.tools.EventProducerCollector.createMethodModel(EventProducerCollector.java:142)
 (src/codegen/java/org/apache/fop/tools/EventProducerCollector.java) to
 use method.getReturnType() instead of method.getReturns(). FOP's
 development code uses method.getReturnType() and qdox-1.12.

 Simon

 On Fri, Aug 26, 2011 at 01:45:04PM +0200, Mathieu Malaterre wrote:
 Dear all,

   I am trying to build fop from source using qdox 1.11. On my debian
 system here is what I did:

 $ wget 
 http://mir2.ovh.net/ftp.apache.org/dist//xmlgraphics/fop/source/fop-1.0-src.tar.gz
 $ tar xfz fop-1.0-src.tar.gz
 $ cd fop-1.0
 $ export CLASSPATH=/usr/share/java/qdox.jar:/usr/share/java/commons-io.jar
 $ ant resourcegen

 This leads to the following error (*). I would like to know whether:

 - building fop from source using qdox version != 1.6.3 is actually supported 
 ?
 - did anyone tried to compile fop with a more recent qdox version ?

 If not, where can I