newbie problem
CsPéter <lecso2 <at> index.hu>
2010-10-28 13:05:44 GMT
Hi!
I'm newbie to fmpp and I couldn't make a front-end application work so far. I hope someone can help me.
The ant build.xml looks like this (and works) :
<!--freemarker-->
<target name="freemarker" description="Freemarker test" depends="">
<taskdef name="freemarker" classname="freemarker.ext.ant.FreemarkerXmlTask">
<classpath>
<pathelement location="freemarker.jar" />
</classpath>
</taskdef>
<mkdir dir="sql" />
<freemarker basedir="${xml.dir}" destdir="${sql.dir}" includes="Actions.xml" template="${templates.dir}/test2.ftl" />
<!--freemarker basedir="${xml.dir}" destdir="${html.dir}" includes="**/*.xml" template="${templates.dir}/test2.ftl" /-->
</target>
My own ant task is this:
<!--excelgen-->
<target name="excelgen" description="Generates things" depends="jar">
<taskdef name="excelgen" classname="ExcelGen" classpath="${classpath}"/>
<excelgen excels="excel1, excel2" ftls="elso.ftl" outputs="html" />
</target>
And my java file:
public void execute() {
try {
File f = new File("C:/workspace/TOOLS/excelgen/");
File basedir = new File("C:/workspace/TOOLS/excelgen/xml");
File destdir = new File("C:/workspace/TOOLS/excelgen/sql");
File include = new File("C:/workspace/TOOLS/excelgen/xml/Actions.xml");
File template = new File("C:/workspace/TOOLS/excelgen/templates/");
Settings s = new Settings(f);
s.add("sourceRoot", basedir.getAbsolutePath());
s.add("outputRoot", destdir.getAbsolutePath());
s.add("dataRoot", template.getAbsolutePath());
s.execute();
} catch (Exception e1) {
e1.printStackTrace();
}
log(msg);
}
The problem is, that it's just copies the Actions.xml file to the /sql directory.
directory path:
TOOLS ------------xml/Actions.xml
-----------sql/
------------templates/test2.ftl
bulild.xml
I have tried a lot of things including set the "modes" settings, switching the directores and trying out new parameters (relative paths, put all sources to one directory etc) but I couldn't make it work.
Thank you very much for any help.
cheers,
Peter
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
fmpp-open mailing list
fmpp-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fmpp-open