Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to use the user define ant script to create save file in AS400 build?

Hi, 

When use user define ant script in RTCi build, the pre/post command can not work. Support suggests use the ant script to execute command. 
Any one can tell me or give the instruction how to use ant script to executes the System i command like create the save file. 

I also confuse that why the user define ant script overwrite the pre/post command, maybe I will submit enhancement for it. 

Thanks!

0 votes


Accepted answer

Permanent link
The pre/post commands from an IBM i Build Specification build definition are put into the generated ant script, so if you use your own ant script the pre/post commands are never run.

You can add in your own IBM i Commands to run through an Ant script as follows, by replacing COMMAND with the command you want to run:

    <target name="default">
        <ibmicommand commandString="COMMAND" systemref="SystemInstance"/>
    </target>

You will also need the following in your Ant script:

<typedef name="AS400Type" classname="com.ibm.iant.types.AS400Type"/>
<taskdef name="ibmicommand" classname="com.ibm.iant.taskdefs.build.IBMICommandTask"/>
<AS400Type systemname="" userid="" userpassword="" id="SystemInstance"/>
Jia Jia Li selected this answer as the correct answer

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 123
× 2

Question asked: Jul 23 '13, 10:38 p.m.

Question was seen: 5,423 times

Last updated: Jul 25 '13, 1:06 p.m.

Confirmation Cancel Confirm