Hi Arik,

On 10 Oct 2005, at 14:37, Arik Kfir wrote:

If you activate the jaxme via "main", then I assume you could just as
easily fork it to another process, no?

Not sure how I do this. Here is my current method:

public void executeXjc(String targetPackage, String outputDirectory, String schema) throws Exception {
             // do stuff
            Main.main(getArgs(arrayList));
             // do more stuff
        }

so somehow I would have to fork that one line in the middle of my execute method.

Otherwise, perhaps you could try going around its "main" and use its
api (assuming it has one?)

There is an API but I'm effectively delegating to Main - the whole purpose of the plugin. Therefore I find myself copying and pasting (forking) the jaxme Main class just to remove occurrences of System.exit. After all I couldn't write
the code any better!

Which can't be right.

In Ant, tasks usually either fork it or use the underlying product's
api...I don't think you can override the System.exit method.

In Ant, would you normally do stuff before and after the call to main (or equivalent) though?

On 10/10/05, Ashley Williams <[EMAIL PROTECTED]> wrote:

I'm writing a plugin whose job it is to call Main.main in the jaxme
jar file. However at the end of main, a call to System.exit() is made
therefore stopping my plugin in its tracks. How would I handle this
situation? I would imagine anyone who writes custom Ant taga (not me)
must come across this all the time.

Thanks
AW

---------------------------------------------------------------------
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]

Reply via email to