WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: [jira] Created: (CARGO-364) Ant task should use the spawn option on exec/java to enable the app server to outlive ant

[jira] (CARGO-364) Ant task/Maven2 plugin should use the spawn option on exec/java to enable the app server to outlive ant

by JIRA jira@codehaus.org :: Rate this Message:

| View in Thread


    [ https://jira.codehaus.org/browse/CARGO-364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=294454#comment-294454 ]

Eduardo Horai commented on CARGO-364:
-------------------------------------

Hi Ali,

I believe this is what is being done.

In the class AbstractInstalledLocalContainer#addSpawn, it does:
{code}
private void addSpawn(JvmLauncher java)
    {
        boolean spawn = Boolean.parseBoolean(
                getConfiguration().getPropertyValue(GeneralPropertySet.SPAWN_PROCESS));
        java.setSpawn(spawn);
    }

{code}

Boolean.parseBoolean(string) "parses the string argument as a boolean. The boolean returned represents the value true if the string argument is not null and is equal, ignoring case, to the string 'true'" (Javadoc), therefore, if it's null or any value other than true, it won't spawn.

Am I right?
               

> Ant task/Maven2 plugin should use the spawn option on exec/java to enable the app server to outlive ant
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CARGO-364
>                 URL: https://jira.codehaus.org/browse/CARGO-364
>             Project: Cargo
>          Issue Type: Improvement
>          Components: Ant, Maven2
>    Affects Versions: 0.8
>         Environment: Java1.5, ant1.7alpha., winxp SP2, ethernet.
>            Reporter: Steve Loughran
>             Fix For: 1.3.0
>
>         Attachments: CARGO-364 Spawn.patch
>
>
> Since Java1.5, the exec and java tasks have had a spawn option, that ensures that an application will outlive the ant run. It's pretty brutal how it is done, as there is no way to chain up the output channel of the spawned process and have it outlive ant.
> if the <cargo> task somehow exposed the spawn option, cargo could be used to launch the app server, so ant itself could act as a launcher script.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: [jira] Created: (CARGO-364) Ant task should use the spawn option on exec/java to enable the app server to outlive ant