xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Pepping <spepp...@leverkruid.eu>
Subject Re: Building fop from source using qdox 1.11
Date Sat, 27 Aug 2011 18:50:37 GMT
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-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message