ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shailesh Sharma <shailesh_s...@yahoo.com>
Subject passing paramter from ANT to shell script doesn't seems to work for me; Help !!!
Date Tue, 30 Sep 2003 16:26:39 GMT


Hi,
Thanks everybody for setting my unix environment. Although i have another email stating the
following problem but aim starting this as a new thread so as to be clear what my problem
is:

 

what iam "trying" to do is to pass some variables from my ANT script to the shell script.
This is what iam doing with my 3 files.

 


1) build.xml file:

 

<?xml version="1.0" encoding="iso-8859-1"?>
<project name="dev" default="all" basedir=".">

    <!-- (2) Create the class path -->
    <path id="common.class.path">
        <pathelement location="/opt/bea/weblogic81/server/lib/weblogic.jar"/>
    </path>

 

    <!-- create a reference for the class path utilized -->

    <property file="./myAnt.properties"/>
    <property name="common.class.path" refid="common.class.path" />
    <property name="Deploy.scripts.folder" value= "/opt/bea/weblogic81/server/bin/applicat
ions" />
    
    <property name="1" value="${ANTPATCH}" />
    <property name="2" value="${WEBLOGICJAR}" />
    <property name="3" value="${ADMINPORTNUMBER}" />
    <property name="4" value="${HOSTNAME}" />

    


    <target name="xyz">
        <echo message="***********shailesh deployment"/>
        <property name="general.deployment.script.name" value="${general.script}" />
    </target>

    <target name="shaileshtest">
        <echo message="This is the TESTNET box"/>
        <exec dir="${Deploy.scripts.folder}" executable="${Deploy.scripts.folder}/${genera
l.deployment.script.name}" />
        <arg line="${1}"/>
        <arg line="${2}"/>
        <arg line="${3}"/>
        <arg line="${4}"/>
    </target>

    <target name="all" depends="xyz,shaileshtest" />

</project>

 

---------------------------------------
2) myAnt.properties file:

general.script=deployScript.sh
ANTPATCH=/opt/bea/wlserver6.1/lib/latest_deploy.jar
WEBLOGICJAR=/opt/bea/wlserver6.1/lib/weblogic.jar
ADMINPORT-NUMBER1=7001
HOSTNAME=reliant2


-----------------------------------------
3) deployScript.sh file:

export ANTPATCH=$1
export WEBLOGICJAR=$2
export ADMINPORTNUMBER=$3
export HOSTNAME=$4


java -cp "$ANT-PATCH":"$WEBLOGIC-JAR" weblogic.deploy -port "$ADMIN-PORT-NUMBER" -host "$HOSTNAME"
-component testMon:beamon_biko_s1 deploy weblogic testMon /export/home/ext5sxs/applications/beamon/beaMon.war


-------------------


 

any help in this matter ??

reagards,

shailesh

 


---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message