• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Automation Task:Help Required

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
 
author & internet detective
Posts: 42055
926
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Nikhil Nagrani
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@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.

 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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/
 
Nikhil Nagrani
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@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.
 
Jeanne Boyarsky
author & internet detective
Posts: 42055
926
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Is this the real life? Is this just fantasy? Is this a tiny ad?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic