Thanks Jan...
Just what I was looking for... some nice advice on where to go from here and to make sure I'm doing things correctly...
I have no problems as such, as in the task works fine (as far as I am aware), although I'm a stickler for things being done 'properly' and trying to follow previous conventions...
Anyway when I get a chance I'll have a mess around with what you said, and then post again...
Thanks again..
John..
[EMAIL PROTECTED] wrote:
Because I havenīt a flash compiler I canīt try your task or your buildfile.
But for better testing you should convert your buildfile to JUnit-tests.
Sounds more complicated than it is. Extend oata.BuildFileTest and use the existing test-buildfile. Something like:
// compare the CopyTest in src\testcases\org\apache\tools\ant\taskdefs public class FlashTest extends BuildFileTest {
public FlashTest(String name) { super(name); }
public void setUp() { configureProject("flash.xml"); // the renamed build.xml }
public void testTarget1() {
executeTarget("target1");
// check whether the compiler has done its work in the right way
}
// more tests. Single jsfl file, multiple jsfl files, missing compiler, // missing jsfl files, empty filesets, compiler not found, creating
// jsfl file, ...
}
Advantage: integration of the test into your build process. Maybe youīll find the "Tutorial: Writing Tasks" in the manual [1] useful.
And I thing you should rename the task to <flashc>. <java> executes java programms and <javac> compiles java code. Therefore the user expects that <flash> will execute a flash file and <flashc> will compile the flash source. But thatīs just a suggestion - itīs your task. :)
A quick view on your source seems to be ok. Where is your problem? Another hint: for a "source-distro" you should provide an buildfile, so that everyone can rebuild the task. So you can try something out and suggest a patch.
Jan
[1] http://ant.apache.org/manual/tutorial-writing-tasks.html#TestingTasks
-----Original Message----- From: John Cowen [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 9:29 PM To: Ant Developers List Subject: Flash/JSFL task
Hiya guys...
I know you guys are probably massively busy, but....
I've written a Flash task for ant with the ability to execute JSFL (the javascript extensibility layer for Flash) files, and then compile..
I wouldn't mind a few pointers (I'm no java fiend by any means, although its all good fun)
Anyway if anyone could advise me where I might be going wrong etc it'd be much appreciated...
http://www.johncowen.com/mt/archives/000017.html (src included)
Cheers...
John..
--------------------------------------------------------------------- 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]