Replacing shell script with ant tasks.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jason_Malmstadt
Posted On:   Monday, June 30, 2008 06:31 PM

I've just started managing a build that currently uses a shell script (actually a series of scripts) to launch ant. This seems like unnecessary complexity to me. I'm also looking at utilizing build automation tools such as CruiseControl, which usually require that your build can be launched directly from ant, not custom shell scripts. Thus, I'm trying to eliminate the need for the shell script with ant tasks. I'm new to ant, so please excuse any stupid questions. Here's what the shell script does: # Set Basedir setenv BASEDIR = /blah # Set JAVA_HOME & ANT_HOME setenv JAVA_HOME /blah/blah/jdk1.5.0_14/linux setenv ANT_HOM /blah/blah/ant/apache-ant-1.7.0 # Set/prepend $VAR1 = 'asdf'    More>>

I've just started managing a build that currently uses a shell script (actually a series of scripts) to launch ant. This seems like unnecessary complexity to me. I'm also looking at utilizing build automation tools such as CruiseControl, which usually require that your build can be launched directly from ant, not custom shell scripts. Thus, I'm trying to eliminate the need for the shell script with ant tasks. I'm new to ant, so please excuse any stupid questions.



Here's what the shell script does:



			
# Set Basedir
setenv BASEDIR = /blah

# Set JAVA_HOME & ANT_HOME
setenv JAVA_HOME /blah/blah/jdk1.5.0_14/linux
setenv ANT_HOM /blah/blah/ant/apache-ant-1.7.0

# Set/prepend $VAR1 = 'asdf'
if ${?VAR1} then
setenv VAR1 asdf:$VAR1
else
setenv VAR1 asdf

#Set PATH
setenv PATH ${ANT_HOME}/bin:${JAVA_HOME}/bin:$PATH

#Run ANT
$ANT_HOME/bin/ant -DBASEDIR=$BASEDIR $1 $2 $3 $4


I'm new to ant but this my gut tells me this is a lazy way of passing variables and paths to ant properly by just making them environment variables and putting ant and java in the PATH variable.



Suggestions on ant tasks to replace this csh script?

   <<Less
About | Sitemap | Contact