users@glassfish.java.net

Re: Running asadmin using ant

From: kalyanilla <godfather547_at_gmail.com>
Date: Mon, 16 Feb 2009 03:08:22 -0800 (PST)

hi sahoo,

i tried by the code given by you.the ant executes it successfully but i
didn't find the server up.

i tried as follows,
1)
<target name="glassfish-start">
<exec executable="C:/Sun/AppServer/bin/asadmin.bat">
  <arg value="start-domain" />
  <arg value="domain1" />
  </exec>
  </target>
        
2) <!-- Start Application Server-->
        <target name="StartServer">
                <parallel>
                <daemons>
                <exec executable="${asadmin}" spawn="false" >
                        <arg value="start-domain"/>
                        <arg value="domain1"/>
                </exec>
                </daemons>
                </parallel>

                <echo message="server started"/>
    
                
        </target>

3) <target name="start-domain" description="Start GlassFish">
        <parallel>
                <daemons>
<exec executable="C:/Sun/AppServer/bin/asadmin" failonerror="true"
 spawn="true">
<arg line="start-domain domain1"/>
</exec>
</daemons>
                </parallel>
</target>
but still i didn't get any solution.can u please help me in this regard
where i went wrong.

thanks and regards,
kalyan

Sahoo wrote:
>
> Why can't you directly invoke asadmin program using "exec" task.
> Something like this will do:
> <target name="start-domain" description="Start GlassFish">
> <exec executable="${glassfish.home}/bin/asadmin" failonerror="true"
> vmlauncher="false">
> <arg line="start-domain domain1"/>
> </exec>
> </target>
>
> Thanks,
> Sahoo
> Manish Gupta wrote:
>> I am trying to run "asadmin" command using ant for GF v3. It hangs
>> during server start. Do I need to do any change?
>>
>> <?xml version="1.0"?>
>>
>> <project name="test" basedir="." default="glassfish_v3_setup" >
>> <property name="gf_v3_location"
>> value="D:/GlassFishV3/prelude_build28/glassfishv3-prelude/glassfish" />
>>
>> <target name="glassfish_v3_setup">
>> <antcall target="start_glassfish_v3"/>
>> <antcall target="stop_glassfish_v3"/>
>> </target>
>> <target name="start_glassfish_v3">
>> <java
>> jar="${gf_v3_location}/modules/admin-cli.jar"
>> fork="true"
>> >
>> <arg value="start-domain"/>
>> <arg value="domain1"/>
>> </java>
>> </target>
>> <target name="stop_glassfish_v3">
>> <java
>> jar="${gf_v3_location}/modules/admin-cli.jar"
>> fork="true"
>> >
>> <arg value="stop-domain"/>
>> </java>
>> </target>
>>
>> </project>
>>
>> Manish.
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>

-- 
View this message in context: http://www.nabble.com/Running-asadmin-using-ant-tp19973171p22035307.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.