Hi Konstantine,
The build file was the solution.
But I have to grieve you about including new hyml-templates in jar.
You can't do it without modifying HtmlWrapperTask.java class. All the
six templates are hardcoded in the class. I see only two ways to do
it:
- modifying existing template and rebuilding jar.
- modifying HtmlWrapperTask class.
Don't sure if license allows it.
I have added my new template to the resources folder and modified the
HtmlWrapperTask Class and all works fine.
As i don't intend to distribute this modified version of the
flexTasks.jar or src, this should not be in breach of any license
criteria?
regards,
Bjorn
On 30/01/2007, at 7:30 PM, Constantiner wrote:
Hello Bjorn,
You are right - there are some errors in build.xml in Flex Ant Tasks
package from Adobe Labs. It not include html-templates in resulting
jar. Here modified build.xml which produce working jar:
<?xml version="1.0"?>
<project name="Flex Ant Tasks" default="main" basedir=".">
<property
file="local.properties"/>
<target name="main" depends="clean, jar" />
<target name="compile">
<fail>
<condition>
<not>
<isset
property="ANT_HOME" />
</not>
</condition>
Error!
You need to set ANT_HOME property (path to Ant dir)
in local.properties file
located in the same dir as build.xml!
For example:
ANT_HOME = D:\\Program Files\\ANT\\
</fail>
<mkdir dir="classes" />
<javac
classpath="${ANT_HOME}/lib"
srcdir="src"
destdir="classes"/>
</target>
<target name="jar" depends="compile">
<copy todir="resources/html-templates/">
<fileset dir="resources/"
includes="**"/>
</copy>
<echo file="flexTasks.tasks">mxmlc=flex2.ant.MxmlcTask
compc=flex2.ant.CompcTask
html-wrapper=flex2.ant.HtmlWrapperTask</echo>
<jar destfile="lib/flexTasks.jar">
<fileset dir="."
includes="flexTasks.tasks" />
<fileset dir="classes"
includes="**/*.class, flexTasks.tasks"/>
<fileset dir="."
includes="resources/html-templates/**" />
</jar>
<delete dir="resources/html-templates/" />
<delete file="flexTasks.tasks" />
</target>
<target name="clean">
<delete dir="classes" />
<!-- Clean up VIM and Emacs backup files -->
<delete>
<fileset dir="src" includes="**/*~" defaultexcludes="false" />
</delete>
</target>
</project>
But I have to grieve you about including new hyml-templates in jar.
You can't do it without modifying HtmlWrapperTask.java class. All the
six templates are hardcoded in the class. I see only two ways to do
it:
- modifying existing template and rebuilding jar.
- modifying HtmlWrapperTask class.
Don't sure if license allows it.
--
Best regards,
Constantiner mailto:[EMAIL PROTECTED]
BS> Hey all,
BS>
BS> I wanted to add new html templates to the html-wrapper tasks
within
BS> the flex_ant_tasks.
BS> I added them the Java src, recompiled the flexTasks jar and when
BS> running my ant builds all fail.
BS> I tried to compile an 'unchanged' version of the flexTasks src
and it
BS> still fails.
BS>
BS> It seems the jar supplied in the zip is 72kb and after a build the
BS> new jar is only 32kb.
BS>
BS> Can anyone suggest a solution here?
BS>
BS> regards,
BS>
BS> Bjorn