Hello Martin, Sorry, had to remove your flex-config.xml from this message. ANT Mailing List was failing my reply with an error - too long message!
From the error that you are getting, it seems like ANT is unable to locate
the mxmlc Task in the flexTasks.jar. Just to be sure, try pasting the following two lines right after the taskdef for flexTasks.jar - <available classname="flex2.ant.MxmlcTask" property="mxmlcAvailable"/> <fail unless="mxmlcAvailable" message="unable to locate the flex mxmlc Task"/> If it fails here, then try pasting the flexTasks.jar into the ANT_HOME/lib and try again. It might just work. Or else, as you said, running mxmlc from <exec> is always an option. - Varun Bhambri On 6/13/07, Martin Gainty <[EMAIL PROTECTED]> wrote:
yes.. works at command line (produces *.swf file) but doesnt as standalone Ant mxlmc task so for now Im going to use the <exec> with mxlmc <!-- Sample build.xml --> <?xml version="1.0" encoding="utf-8"?> <project name="mybuild" default="build" basedir="."> <!-- target name="build" --> <taskdef resource="flexTasks.tasks" classpath="C:/ANT/APACHE~1.5/lib/flexTasks.jar" /> <property name="FLEX_HOME" value="C:/flexTasks/FlexBuilder2/frameworks"/> <!-- property name="FLEX_HOME" value="C:\Program Files\Adobe\Flex Builder 2\Flex SDK 2"/ --> <property name="APP_ROOT" value="${basedir}"/> <property name="DEPLOY_DIR" value="C:/flexTasks"/> <target name="build"> <mxmlc file="${basedir}/AMFPHPDrupal.mxml" keep-generated-actionscript="true"> <load-config filename="${FLEX_HOME}/flex-config.xml"/> <source-path path-element="${basedir}"/> </mxmlc> </target> </project> BUILD FAILED C:\flexTasks\VumarBuild.xml:12: Command not found: mxmlc at flex2.ant.FlexTask.execute(FlexTask.java:151) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:341) at org.apache.tools.ant.Target.performTasks(Target.java:369) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) at org.apache.tools.ant.Project.executeTarget(Project.java:1185) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe cutor.java:40) at org.apache.tools.ant.Project.executeTargets(Project.java:1068) at org.apache.tools.ant.Main.runBuild(Main.java:668) at org.apache.tools.ant.Main.startAnt(Main.java:187) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67) Total time: 1 second Thanks Paul! M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. ----- Original Message ----- From: "Paul Barnes-Hoggett" <[EMAIL PROTECTED]> To: "Ant Users List" <user@ant.apache.org> Sent: Wednesday, June 13, 2007 9:48 AM Subject: Re: flextasks anomalies > Hi Martin, > it sounds like you need to get hold of the Flex SDK: > http://www.adobe.com/products/flex/downloads/ > > Download this, and set FLEX_HOME to point to this folder and you should be > good to go... > > Cheers > > PBH > > > On 6/13/07 9:35 AM, "Martin Gainty" <[EMAIL PROTECTED]> wrote: > >> Good Morning Varun >> >> the only flex-config.xml I have is supplied from CFUSION ..23260 bytes >> dated >> 06/12/2007 ..I dont see any other copies >> Would you know where I can obtain the flex-config.xml which works with >> flextasks.jar mxlmc task? >> >> Thanks! >> M- >> This email message and any files transmitted with it contain confidential >> information intended only for the person(s) to whom this email message is >> addressed. If you have received this email message in error, please >> notify >> the sender immediately by telephone or email and destroy the original >> message without making a copy. Thank you. >> >> ----- Original Message ----- >> From: "Varun Bhambri" <[EMAIL PROTECTED]> >> To: "Ant Users List" <user@ant.apache.org>; "Martin Gainty" >> <[EMAIL PROTECTED]> >> Sent: Wednesday, June 13, 2007 1:20 AM >> Subject: Re: flextasks anomalies >> >> >>> Hello Martin, >>> >>> Is there anything that you've changed in the flexconfig.xml? I am also >>> using >>> the same Flex ANT Tasks and the latest Flex ANT Libraries. I haven't >>> changed >>> anything in the flexconfig file. I just copied the flexTasks.jar in my >>> ANT_HOME/lib. So, I dont need to use a classpath to find the mxmlc task. >>> Following is my build file to compile all the mxml files in a directory >>> structure. It works for me. You may skip the ant-contrib part, i.e the >>> for >>> loops. >>> >>> /*** Start my build file ****/ >>> <project name="mybuild" default="build" basedir="."> >>> >>> <target name="build"> >>> <taskdef resource="flexTasks.tasks" /> >>> <taskdef resource="net/sf/antcontrib/antlib.xml"/> >>> <property name="FLEX_HOME" value="C:\Program >>> Files\Adobe\Flex >>> Builder 2\Flex SDK 2"/> >>> <property name="APP_ROOT" value="${basedir}"/> >>> >>> <for param="files"> >>> <fileset dir="${APP_ROOT}\src"> >>> <include name="**/*.mxml"/> >>> </fileset> >>> <sequential> >>> <for list="en_US,fr_FR" param="locale"> >>> <sequential> >>> <mxmlc file="@{files}" >>> keep-generated-actionscript="false"> >>> <load-config >>> filename="${FLEX_HOME}/frameworks/flex-config.xml"/> >>> <source-path >>> path-element="${FLEX_HOME}/frameworks"/> >>> <!-- This defines where the locale >>> classpath >>> needs to be --> >>> >>> <compiler.source-pathpath-element="[EMAIL PROTECTED]"/> >>> </mxmlc> >>> >>> <mkdir dir="[EMAIL PROTECTED]"/> >>> >>> <move todir="[EMAIL PROTECTED]"> >>> <fileset dir="${APP_ROOT}\src"> >>> <include name="**\*.swf"/> >>> </fileset> >>> </move> >>> </sequential> >>> </for> >>> </sequential> >>> </for> >>> </target> >>> </project> >>> >>> /*** End of mybuild file ****/ >>> >>> All I need to do to run this is just say ant at the command prompt. >>> >>> I hope it helps. >>> >>> Varun Bhambri >>> >>> >>> On 6/13/07, Martin Gainty <[EMAIL PROTECTED]> wrote: >>>> >>>> Good Evening All >>>> >>>> Just started to use this package and cant get FLEX_HOME to set >>>> or mxlmc to execute properly >>>> /********attached mySimpleBuild.xml************/ >>>> <?xml version="1.0" encoding="utf-8"?> >>>> <!-- mySimpleBuild.xml --> >>>> <project name="My App Builder" basedir="."> >>>> <taskdef resource="flexTasks.tasks" >>>> classpath="C:/ANT/flexTasks/lib/flexTasks.jar" /> >>>> <property name="FLEX_HOME" >>>> value="C:/CFusion/CFUSIO~1/wwwroot/WEB-INF/cfform"/> >>>> <property name="APP_ROOT" value="myApp"/> >>>> <target name="main"> >>>> <mxmlc file="${APP_ROOT}/Main.mxml" >>>> keep-generated-actionscript="true"> >>>> <load-config >>>> filename="${FLEX_HOME}/frameworks/flex-config.xml"/> >>>> <source-path path-element="${FLEX_HOME}/frameworks"/> >>>> </mxmlc> >>>> </target> >>>> </project> >>>> /******************end mySimpleBuild.xml***************/ >>>> >>>> >>>> Now Here is the invocation.......... >>>> >>>> C:\flexTasks>ant -lib >>>> c:/ANT/apache-ant-1.6.5/lib/flexTasks.jar -buildfile >>>> mySimpleBuild.xml main >>>> Buildfile: mySimpleBuild.xml >>>> >>>> main: >>>> [mxmlc] Warning: FLEX_HOME does not exist >>>> [mxmlc] Warning: FLEX_HOME does not exist >>>> >>>> BUILD FAILED >>>> C:\flexTasks\mySimpleBuild.xml:8: Command not found: mxmlc >>>> >>>> Total time: 0 seconds >>>> >>>> Any ideas? >>>> M-- >>>> This email message and any files transmitted with it contain >>>> confidential >>>> information intended only for the person(s) to whom this email message >>>> is >>>> addressed. If you have received this email message in error, please >>>> notify >>>> the sender immediately by telephone or email and destroy the original >>>> message without making a copy. Thank you. >>>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]