You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Martin Gainty <mg...@hotmail.com> on 2009/04/02 22:51:02 UTC
ANT fop task
has Anyone been able to get fop ant task to work Here are 2 classes from fop.jar 2211KB 09/15/2008
I have
<taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop" classpathref="run-classpath"/>
where Fop class doesnt have main() method
<taskdef name="fop" classname="org.apache.fop.cli.Main" classpathref="run-classpath"/>
does'nt have execute() method
as a fallback I can exec it..but was wondering if the fop exec interface was already written?
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung / Disclaimer and confidentiality note
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
This message is confidential and may be privileged. If you are not the intended recipient, we kindly ask you to please inform the sender. Any unauthorised dissemination or copying hereof is prohibited. This message serves for information purposes only and shall not have any legally binding effect. Given that e-mails can easily be subject to manipulation, we can not accept any liability for the content provided.
_________________________________________________________________
Rediscover HotmailĀ®: Get e-mail storage that grows with you.
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009
RE: AW: ANT fop task
Posted by Martin Gainty <mg...@hotmail.com>.
<target name="newTestFiles">
<echo>mimetype=${mimetype}</echo>
<echo>outDir=${outDir}</echo>
<property name="msglevel" value="9"/>
<echo>msglevel=${msglevel}</echo>
<property name="src" value="."/>
<echo>src=${src}</echo>
<property name="input" value="foo.fo"/>
<echo>input=${input}</echo>
<property name="output" value="foo.pdf"/>
<echo>output=${output}</echo>
<property name="outdir" value="." />
<echo>outdir=${outdir}</echo>
<property name="foDir" value="fo"/>
<path id="run-classpath">
<fileset dir="F:/FOP/fop-0.95/src/build">
<include name="*.jar"/>
</fileset>
</path>
<taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop" classpathref="run-classpath"/>
<fop fofile="${input}" format="${mimetype}" outfile="${output}" messagelevel="${msglevel}" relativebase="true">
<fileset dir="basic">
<include name="**/*.fo"/>
</fileset>
<fileset dir="footnotes">
<include name="**/*.fo"/>
</fileset>
<fileset dir="pagination">
<include name="**/*.fo"/>
</fileset>
<fileset dir="keeps_and_breaks">
<include name="**/*.fo"/>
</fileset>
<fileset dir="markers">
<include name="**/*.fo"/>
</fileset>
<fileset dir="region_body">
<include name="**/*.fo"/>
</fileset>
<fileset dir="tables">
<include name="**/*.fo"/>
</fileset>
<fileset dir="svg">
<include name="**/*.fo"/>
</fileset>
<fileset dir="advanced">
<include name="**/giro.fo"/>
</fileset>
</fop>
</target>
Vielen Danke Jan,
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Subject: AW: ANT fop task
> Date: Fri, 3 Apr 2009 07:04:28 +0200
> From: Jan.Materne@rzf.fin-nrw.de
> To: user@ant.apache.org
>
> > I have
> > <taskdef name="fop"
> > classname="org.apache.fop.tools.anttasks.Fop"
> > classpathref="run-classpath"/>
> > where Fop class doesnt have main() method
>
>
> A task implementation doesnt have to have a main method.
> The tasks 'main' is the
> public void execute();
> method.
> From the class name I would think that this should be
> an Ant task (...anttasks.Fop) - if it has the execute method.
>
> Manual: http://xmlgraphics.apache.org/fop/0.94/anttask.html
>
>
> > <taskdef name="fop" classname="org.apache.fop.cli.Main"
> > classpathref="run-classpath"/>
> > does'nt have execute() method
>
> Maybe (surely) not a task.
> From the name I would think it is intended to be started from the
> command line.
> (...cli.Main: CommandLineInterface MAIN-class)
>
>
> Jan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
_________________________________________________________________
Quick access to your favorite MSN content and Windows Live with Internet Explorer 8.
http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A
AW: ANT fop task
Posted by Ja...@rzf.fin-nrw.de.
> I have
> <taskdef name="fop"
> classname="org.apache.fop.tools.anttasks.Fop"
> classpathref="run-classpath"/>
> where Fop class doesnt have main() method
A task implementation doesnt have to have a main method.
The tasks 'main' is the
public void execute();
method.
>From the class name I would think that this should be
an Ant task (...anttasks.Fop) - if it has the execute method.
Manual: http://xmlgraphics.apache.org/fop/0.94/anttask.html
> <taskdef name="fop" classname="org.apache.fop.cli.Main"
> classpathref="run-classpath"/>
> does'nt have execute() method
Maybe (surely) not a task.
>From the name I would think it is intended to be started from the
command line.
(...cli.Main: CommandLineInterface MAIN-class)
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: ANT fop task
Posted by Martin Gainty <mg...@hotmail.com>.
_________________________________________________________________
Rediscover HotmailĀ®: Get quick friend updates right in your inbox.
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Updates1_042009
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: ANT fop task
Posted by Gilles Scokart <gs...@gmail.com>.
The first one seems indeed to be an ant task, and so doesn't require a
main() method. You have to use the task that you have defined.
The second one is a Main, that you can invoke using the java task. If you
want, you can build a fop task based on it by defining a macrodef that
contains the java invocation.
Gilles Scokart
2009/4/2 Martin Gainty <mg...@hotmail.com>
>
> has Anyone been able to get fop ant task to work Here are 2 classes from
> fop.jar 2211KB 09/15/2008
> I have
> <taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop"
> classpathref="run-classpath"/>
> where Fop class doesnt have main() method
>
> <taskdef name="fop" classname="org.apache.fop.cli.Main"
> classpathref="run-classpath"/>
> does'nt have execute() method
>
> as a fallback I can exec it..but was wondering if the fop exec interface
> was already written?
>
> Martin
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung / Disclaimer and confidentiality note
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> This message is confidential and may be privileged. If you are not the
> intended recipient, we kindly ask you to please inform the sender. Any
> unauthorised dissemination or copying hereof is prohibited. This message
> serves for information purposes only and shall not have any legally binding
> effect. Given that e-mails can easily be subject to manipulation, we can not
> accept any liability for the content provided.
>
>
>
>
>
> _________________________________________________________________
> Rediscover HotmailĀ®: Get e-mail storage that grows with you.
>
> http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009
>