Forums Register Login

Automation Task:Help Required

+Pie Number of slices to send: Send
Hi,

Actually i have been given a task of automating the build process of my project.For this i need to make a ant file for it i guess.

Steps to automate(These steps are done manually on daily basis):

1)Downloading latest project workspace from PVCS to a particular directory.
2)Then compiling those files and making ear for it.
3)Now deleting the ear files of the previous day of the same project from WebLogicServer(here it is deployed daily after the build process).
4)Running the build command from the command prompt for the latest ear files which i got in step-2.Hence the latest ear got updated in the Web-Logic Server.

This is process followed till now.I need to automate this by writing a ant-script for the same.

Please help me how to approach the same as i haven't worked before with ant script..Thanks..
+Pie Number of slices to send: Send
What do you know how to do? Do you know how to create an Ant build.xml that echos "Hello World"? If not, I recommend starting with the official tutorial or a book like Ant in Action.

Then you can start trying tasks. For example the PVCS task comes with documentation about each attribute and and an example at the bottom.

Give it a try and post back when you have some more specific questions. Then you can say what you tried, what the error was or why you are stuck.
+Pie Number of slices to send: Send
@Jeanne

Actually i need to automate the process i mentioned below as early as possible.

As you said i have looked through the basic examples....but going through the complete book would take time...so trying to figure out the neccessary commands which would help me to make a build file for the task given to me.

Do you know the command related to downloading the workspace from a pvcs repository to a specified folder?

Waiting for your reply.Thanks.

+Pie Number of slices to send: Send
See another possibility - use Jenkins (aka Hudson) to manager your builds. There is a PVCS plugin for Jenkins, and thus Jenkins can be configured to pull the project sources from PVCS and then run the build.
http://jenkins-ci.org/
+Pie Number of slices to send: Send
@Peter

I am confused whether to use tools like ant,maven in which i need to write scripts for the automation or to go for software tools like hudson as you mentioned or many others available in the market.

Please guide me regarding which option would be better as i don't wan't to waste time in re-work.

Please Reply.Thanks.
+Pie Number of slices to send: Send
 

Nikhil Nagrani wrote:Do you know the command related to downloading the workspace from a pvcs repository to a specified folder?


It is on the Ant PVCS task page that I linked to in my original reply.

Nikhil Nagrani wrote:Actually i need to automate the process i mentioned below as early as possible.


That doesn't change anything. You still need to understand what you are doing. The Ant manual isn't long and I can't imagine how you plan to write an Ant task without understanding Ant. That's like saying "I want to write a Java program, but don't have time to learn Java."

As far as Jenkins vs Ant/Maven, it is not that one is better or worse. Ant/Maven give you more control. Jenkins gets a project off the ground faster. Either way, you will need to learn something.
+Pie Number of slices to send: Send
And, Maven and Hudson/Jenkins are all very different.

Both Ant and Maven can build Java apps. Ant is more of a scripting tool where you have to tell it everything to do and how to do it. Maven is a black box that know how to do a certain number of things and can do those things automatically with little configuration. Usually, if I find that Maven knows how to do what I want it to, I use Maven. If it doesn't, I use Ant. And I have used Ant for some very strange tasks that had nothing to do with building Java apps.

Hudson/Jenkins, on the other hand, cannot compile or build anything. What it can do, however, is fire off scripts, either at given intervals or on detecting that someone checked changes into version control. So you still have to write the script to build the code. But at least Hudson/Jenkins can handle the checkout of the code from version control for you.

If you are really set up the build process for a team of developers, then you should use Jenkins to manage your builds and either Maven or Ant to perform the actual build. If you have multiple projects, Jenkins can manage all of them. And Jenkins gives you a nice, centralized way to view the build results.
Rototillers convert rich soil into dirt. Please note that this tiny ad is not a rototiller:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2280 times.
Similar Threads
Deploying servlets as a war file
Accessing PVCS files through ANT Script of RAD7.5
Which would be a better option for automation of a Java Project?
Help Needed in editing the war file
Ant Script for build Ibm BPEL process
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:15:15.