This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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..
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?
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.
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.
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.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com