You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by 3akycka <pa...@yahoo.fr> on 2009/02/09 21:47:20 UTC

scite as3 + ant + flex sdk

Hello,

I'm trying this :
[URL="http://arthurdick.com/projects/as3/"]http://arthurdick.com/projects/as3/[/URL]

Scite as3 is an actionscript editor and Flex sdk build action script files.

on Ubuntu when I start the build, I got an error message from Ant:

>/usr/share/ant/bin/ant swf
Buildfile: build.xml
[taskdef] Could not load definitions from resource flexTasks.tasks. It could
not be found.

swf:

BUILD FAILED
/home/ordi/Bureau/Telechargements/scite-as3/sample/build.xml:8: Problem:
failed to create task or type mxmlc
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.


Total time: 1 second
>Exit code: 0


Do you know what append ?

Sorry my bad english
:)
-- 
View this message in context: http://www.nabble.com/scite-as3-%2B-ant-%2B-flex-sdk-tp21921594p21921594.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: AW: AW: AW: scite as3 + ant + flex sdk

Posted by 3akycka <pa...@yahoo.fr>.
:jumping:

Hello,

I don't know exactly all what I did to do it %-| but I finaly arived to make
it working.

I tried to execute directly mxmlc in the terminal, to verify if it was
running standalone, and he wasn't :
./mxmlc path/Sample.as -o path/Sample.swf

... just nothing append exactly like when I did from scite+ant.

after that I tried to remove and install again java jdk... nothing more

upgrade Ubuntu to 8.10 (independently of my problem with flex), and after
the upgrade, I don't know why when I tryed again to compile I got this error
message (may my problem was this and just did not had a message before ?) :
>/usr/share/ant/bin/ant test
Unable to locate tools.jar. Expected to find it in
/usr/lib/jvm/java-1.5.0-gcj-4.3-1.5.0.0/lib/tools.jar
Buildfile: build.xml

So, I finally fond that It was not the good version of java used on my
computer, and I did that to choose it :
sudo update-alternatives --config java

And again a new bug, the error message was very big and start like that :
[mxmlc] Loading configuration file
/home/aliya/Bureau/Telechargements/flex_sdk_3.2.0.3794/frameworks/flex-config.xml
    [mxmlc] Error: class
org.apache.xerces.util.XMLAttributesMMImpl$AttributeMMImpl cannot access its
superclass org.apache.xerces.util.XMLAttributesImpl$Attribute
..etc

And I finally find how to correct it : 
http://bauhouse.wordpress.com/2008/07/16/actionscript-compiler-error-flex-ant-tasks-bug/
ActionScript Compiler Error - Flex Ant Tasks Bug 

Thank you very much Jan and Martin for your precious help ! :handshake:
-- 
View this message in context: http://www.nabble.com/scite-as3-%2B-ant-%2B-flex-sdk-tp21921594p22264216.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: AW: AW: AW: scite as3 + ant + flex sdk

Posted by 3akycka <pa...@yahoo.fr>.
... I did try that like I saw on the internet, but nothing more appends :

<exec executable="/bin/sh" spawn="true"  > 
-- 
View this message in context: http://www.nabble.com/scite-as3-%2B-ant-%2B-flex-sdk-tp21921594p22128896.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: AW: AW: AW: scite as3 + ant + flex sdk

Posted by 3akycka <pa...@yahoo.fr>.
Thank you but I don't see how to do this, do I have to put spawn="true" as a
parameter of my build file.
How to test the mxmlc script runs standalone ?

You may will think that I should learn Ant before use it, but compile
actionscript files from Scite is my only need of Ant and I don't get time to
learn it from the start :-)


mgainty wrote:
> 
> 
> you can always exec the mxmlc task (specifically the class
> flex.ant.MxmlcTask)
> with spawn="true"
> 
> in other words make sure the mxmlc script runs standalone before
> committing 
> as a task in your build environment
> 
> 

-- 
View this message in context: http://www.nabble.com/scite-as3-%2B-ant-%2B-flex-sdk-tp21921594p22128797.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: AW: AW: AW: scite as3 + ant + flex sdk

Posted by Martin Gainty <mg...@hotmail.com>.
you can always exec the mxmlc task (specifically the class flex.ant.MxmlcTask)
with spawn="true"

in other words make sure the mxmlc script runs standalone before committing 
as a task in your build environment

HTH
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 




> Date: Fri, 20 Feb 2009 12:21:29 -0800
> From: patmails@yahoo.fr
> To: user@ant.apache.org
> Subject: Re: AW: AW: AW: scite as3 + ant + flex sdk
> 
> 
> Hello,
> 
> I just find the time to look again at all of that :-), 
> 
> I did open the .jar and effectively the 3 lines are on it :
> mxmlc=flex.ant.MxmlcTask
> compc=flex.ant.CompcTask
> html-wrapper=flex.ant.HtmlWrapperTask 
> 
> I made a new try with your path indications and now I don't get anymore the
> errors I had before,
> Ant look to find the  flexTasks correctly.
> 
> But a new problem appear, i don't know if it come from Ant know :
> the build start and than after this message nothing append anymore :
> 
> >/usr/share/ant/bin/ant test
> Buildfile: build.xml
> 
> test:
> 
> swf:
> 
> 
> at this moment this take a lot of memory of the computer and the only think
> a can do is to press the "stop" button of Scite, so the build is never
> finish...
> 
> do you see what can it be again ?
> 
> my problem with Scite, Ant and Flex is looking like a little nightmare
> :working: 
> 
> -- 
> View this message in context: http://www.nabble.com/scite-as3-%2B-ant-%2B-flex-sdk-tp21921594p22126566.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

_________________________________________________________________
Windows Liveā„¢: E-mail. Chat. Share. Get more ways to connect. 
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_allup_explore_022009

Re: AW: AW: AW: scite as3 + ant + flex sdk

Posted by 3akycka <pa...@yahoo.fr>.
Hello,

I just find the time to look again at all of that :-), 

I did open the .jar and effectively the 3 lines are on it :
mxmlc=flex.ant.MxmlcTask
compc=flex.ant.CompcTask
html-wrapper=flex.ant.HtmlWrapperTask 

I made a new try with your path indications and now I don't get anymore the
errors I had before,
Ant look to find the  flexTasks correctly.

But a new problem appear, i don't know if it come from Ant know :
the build start and than after this message nothing append anymore :

>/usr/share/ant/bin/ant test
Buildfile: build.xml

test:

swf:


at this moment this take a lot of memory of the computer and the only think
a can do is to press the "stop" button of Scite, so the build is never
finish...

do you see what can it be again ?

my problem with Scite, Ant and Flex is looking like a little nightmare
:working: 

-- 
View this message in context: http://www.nabble.com/scite-as3-%2B-ant-%2B-flex-sdk-tp21921594p22126566.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


AW: AW: AW: scite as3 + ant + flex sdk

Posted by Ja...@rzf.fin-nrw.de.
> >>In  the flex sdk folder, there is also the file : 
> >>flexTasks.tasks
> >>It contains :
> >>mxmlc=flex.ant.MxmlcTask
> >>compc=flex.ant.CompcTask
> >>html-wrapper=flex.ant.HtmlWrapperTask
> > 
> > Best place for that file is IN the jar ...
> > Could you check if the jar contains that too?
> > 
> 
> I very don't know how to do it !
> the jar file is compiled,may be it can be see in the java 
> "source" folder of the flex folder,
> but there is a lot of think on it and I don't know how all this think
> work...


Because JAR is only a ZIP file with special entries, you could open
it with any ZIP program (WinZip, 7zip, ...). Just see if there is an 
entry "/flexTasks.task" (in the root directory).




> > IMO you should
> > - create a directory "antlibs" in your project
> > - place the flexTasks.jar and flexTasks.tasks files there
> > - use <tasksdef resource="flexTasks.tasks" classpath="antlibs"/>
> > 
> 
> I did this and it seem to had resolve a part of the problem 
> as I don't have anymore my first error message, 
> but know I got a new one :
> 
> BUILD FAILED
> /home/ordi/Bureau/Telechargements/scite-as3/sample/build.xml:3
> : taskdef
> class flex.ant.CompcTask cannot be found


Ok, here the directory layout I suggested:
    |
    | build.xml
    | build.properties
    |
    +-- antlib
    ...     flexTasks.jar
            flexTasks.tasks

And build.xml contains
    <project ... basedir="."> <!-- or no 'basedir' -->
        ...
        <tasksdef resource="flexTasks.tasks" classpath="antlibs"/>
        ...

And flexTasks.tasks contains
    mxmlc=flex.ant.MxmlcTask
    compc=flex.ant.CompcTask
    html-wrapper=flex.ant.HtmlWrapperTask

So ./antlib/flexTasks.jar must contain "/flex/ant/MxmlcTask.class",
"/flex/ant/ComcTask.class"
and "/flex/ant/HtmlWrapperTask.class". (Test with ZIP-Program).


(Maybe you want to try a (Java+Ant) tutorial for warming up with Ant.
http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html but this
requires
a basic knowledge of Java. But the sources are all there.)






> I saw that there is a problem with compcTask on linux on this page :
> http://labs.adobe.com/wiki/index.php/Talk:Flex_Ant_Tasks labsadobe 
> near the end of the page : Problem with compc task on linux ('unknown
> configuration variable compiler.source-path'
> But I don't know if it could have a link with my problem, I 
> don't understand what they say... :-)

quotes:
   "The compc task fails on linux (but works on windows) with the error:

    ...
   [compc] command line: Error: unknown configuration variable
'compiler.source-path .'
    ..."

   "I fixed this by changing the compc script as follows:
      java $VMARGS -jar "$FLEX_HOME/lib/compc.jar"
+flexlib="$FLEX_HOME/frameworks" "$@"
    to:
      java $VMARGS -jar "$FLEX_HOME/lib/compc.jar"
+flexlib="$FLEX_HOME/frameworks" $@
    i.e. removing the quotes from the variable arguments passed to
Java."


This is not Ant or Java related. The author changed the wrapper script,
Adobe provides to call the compc compiler. The last argument of the
instruction was "passing all parameters from the command line to the
java program": $@. The original quoted this "@*" which result in ONE
parameter for Java. Without the quotes $@ Java gets multiple values. And
this seems to be required.

I dont know if you use that wrapper script (a Unix batch file).
But I you get the same error and you use the script, you could give it a
try.



Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: AW: AW: scite as3 + ant + flex sdk

Posted by 3akycka <pa...@yahoo.fr>.
Hello,

Thank you very much for your attention,


Jan.Materne wrote:
> 
>>In  the flex sdk folder, there is also the file : 
>>flexTasks.tasks
>>It contains :
>>mxmlc=flex.ant.MxmlcTask
>>compc=flex.ant.CompcTask
>>html-wrapper=flex.ant.HtmlWrapperTask
> 
> Best place for that file is IN the jar ...
> Could you check if the jar contains that too?
> 

I very don't know how to do it !
the jar file is compiled,may be it can be see in the java "source" folder of
the flex folder,
but there is a lot of think on it and I don't know how all this think
work...



> After loading that resource <taskdef> tries to load the implementation
> classes, which should be in the JAR you copied to ANT/lib.
> 
Again,I very don't know how to check this.



> IMO you should
> - create a directory "antlibs" in your project
> - place the flexTasks.jar and flexTasks.tasks files there
> - use <tasksdef resource="flexTasks.tasks" classpath="antlibs"/>
> 

I did this and it seem to had resolve a part of the problem as I don't have
anymore my first error message, 
but know I got a new one :

BUILD FAILED
/home/ordi/Bureau/Telechargements/scite-as3/sample/build.xml:3: taskdef
class flex.ant.CompcTask cannot be found

I saw that there is a problem with compcTask on linux on this page :
http://labs.adobe.com/wiki/index.php/Talk:Flex_Ant_Tasks labsadobe 
near the end of the page : Problem with compc task on linux ('unknown
configuration variable compiler.source-path'
But I don't know if it could have a link with my problem, I don't understand
what they say... :-)

Sorry to take your time with my questions, but I very don't know Ant and I
very need to make Actionscript on Linux

-- 
View this message in context: http://www.nabble.com/scite-as3-%2B-ant-%2B-flex-sdk-tp21921594p21984711.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


AW: AW: scite as3 + ant + flex sdk

Posted by Ja...@rzf.fin-nrw.de.
>In the flex sdk folder, there is a "Ant" folder, on this 
>folder there is :
>Lib/flexTasks.jar, I copied this file into : /usr/share/ant/lib

With this copy you publishes its content to all Ant users ...



>In  the flex sdk folder, there is also the file : 
>flexTasks.tasks, I stay it
>here, don't know if it need to be move ?
>It contains :
>mxmlc=flex.ant.MxmlcTask
>compc=flex.ant.CompcTask
>html-wrapper=flex.ant.HtmlWrapperTask

Best place for that file is IN the jar ...
Could you check if the jar contains that too?



>With scite as3 there is a folder with an example, it contains an
>actionscript main class file and a build.xml file,
>I copy the the original file but I did changed it a bit to point to the
>right folder of the different applications :
>
><?xml version="1.0" encoding="utf-8"?>
><project name="Sample" basedir=".">

>	<taskdef resource="flexTasks.tasks"
classpath="${basedir}/flexTasks/lib/flexTasks.jar" />   
> (Here I don't know if it have to stay, if I did put the flexTasks.jar
file into the Ant folder ?)

<taskdef> should load a resource name "flexTask.tasks". And it should
search only on the 
specified classpath. Does that JAR contain the file? In the correct
directory (inside the jar)?

After loading that resource <taskdef> tries to load the implementation
classes, which should be
in the JAR you copied to ANT/lib.


IMO you should
- create a directory "antlibs" in your project
- place the flexTasks.jar and flexTasks.tasks files there
- use <tasksdef resource="flexTasks.tasks" classpath="antlibs"/>
That classpath is relative. And relative paths are resolved agaings
${basedir}.
${basedir} is specified on <project basedir>, but that is optional. It
defaults to 
the directory of the buildfile.


>	<property name="FLEX_HOME" 
>value="/usr/share/flex_sdk_3.0.0.477"/> (Here I
>did put the well path to the flex sdk folder on my computer)

Seems to be ok for the use of FlexSDK.



Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: AW: scite as3 + ant + flex sdk

Posted by 3akycka <pa...@yahoo.fr>.

Jan.Materne wrote:
> 
> Maybe we should print another "action":
>   Action: Check that the Jar containing the task is available.
> 

Thank you for your answer !
I did look at your links but didn't find how to repair my problem.

Here what I did :

In the flex sdk folder, there is a "Ant" folder, on this folder there is :
Lib/flexTasks.jar, I copied this file into : /usr/share/ant/lib

In  the flex sdk folder, there is also the file : flexTasks.tasks, I stay it
here, don't know if it need to be move ?
It contains :
mxmlc=flex.ant.MxmlcTask
compc=flex.ant.CompcTask
html-wrapper=flex.ant.HtmlWrapperTask

With scite as3 there is a folder with an example, it contains an
actionscript main class file and a build.xml file,
I copy the the original file but I did changed it a bit to point to the
right folder of the different applications :

<?xml version="1.0" encoding="utf-8"?>
<project name="Sample" basedir=".">
	<taskdef resource="flexTasks.tasks"
classpath="${basedir}/flexTasks/lib/flexTasks.jar" />   (Here  I don't know
if it have to stay, if I did put the flexTasks.jar file into the Ant folder
?)
	<property name="FLEX_HOME" value="/usr/share/flex_sdk_3.0.0.477"/> (Here I
did put the well path to the flex sdk folder on my computer)
	<property name="APP_ROOT" value="."/>
	
	<target name="swf">
		<mxmlc file="${APP_ROOT}/Sample.as" compiler.optimize="true"
output="${APP_ROOT}/sample.swf"> 
			<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
		</mxmlc>
	</target>
	
	<target name="test">
		<antcall target="swf"/>
		
		<exec
executable="/usr/share/flash_player_9_linux_dev/standalone/release/flashplayer">
(and here again)
			<arg value="${APP_ROOT}/sample.swf"/>
		</exec>
	</target>
	
	<target name="debug">
		<mxmlc file="${APP_ROOT}/Sample.as" compiler.optimize="true" debug="true"
output="${APP_ROOT}/sample-debug.swf">
			<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
		</mxmlc>
		
		<exec executable="/bin/sh">
			<arg line='-c "x-terminal-emulator -e ${FLEX_HOME}/bin/fdb
${APP_ROOT}/sample-debug.swf"'/>
		</exec>
	</target>
</project>

May be I'm not doing something well in that file ?

If there is some thing more to install for Ant to work, I can't find what it
is ?

:-)







-- 
View this message in context: http://www.nabble.com/scite-as3-%2B-ant-%2B-flex-sdk-tp21921594p21939704.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


AW: scite as3 + ant + flex sdk

Posted by Ja...@rzf.fin-nrw.de.
>>/usr/share/ant/bin/ant swf
>Buildfile: build.xml
>[taskdef] Could not load definitions from resource flexTasks.tasks. It
could not be found.
>
>Action: Check the spelling.
>Action: Check that any custom tasks/types have been declared.
>Action: Check that any <presetdef>/<macrodef> declarations 
>have taken place.

Also check if the required library with your tasks is available.
http://ant.apache.org/manual/install.html#optionalTasks
http://ant.apache.org/manual/CoreTypes/antlib.html
http://ant.apache.org/manual/CoreTasks/typedef.html

Maybe we should print another "action":
  Action: Check that the Jar containing the task is available.


>Sorry my bad english
>:)

No problem. My English is not best too. (I think here should be another
word than 'too' ...)
Main fact: we know what you mean ;)


Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org