Avatar of CodingExperts
CodingExperts
 asked on

ANT : Creating deployment profile

Hi all,

The challange is to incorporate and automate the build mechanism for any project in Eclipse, and it should be transparent to the developers. I need to automate the creation of war/ear  using which the developers can include/exclude the files/ filesets.

It is basically like creating deployment profile.

I could have done it using ANT scripts which I give to the devlopers and they could change the script acc to generate the war/ear.But I would pre4fer a transparent mechanism.

All I need is the best stratergy to acheive this. Implementation details can be an add-on.

-CE
JavaJava EE

Avatar of undefined
Last Comment
CEHJ

8/22/2022 - Mon
CEHJ

What kind of interface are you talking about - drag and drop?
CodingExperts

ASKER
>> drag and drop?

Nope, may be a JTree kinda thing with checkboxes.

I want to do smthg to automate the inclusion and exclusion of files for war/ear creation, it need not be an GUI implementation.

All i want to do is make the ANT script transparent to the developers, say i can read from a file etc.
I hope you understand. One important thing is that they should be able to save this profile, for later use, and can be used across for all developers.

-CE
CEHJ

All you need to do is build the Ant task programmatically with its API
Your help has saved me hundreds of hours of internet surfing.
fblack61
CEHJ

(much like the guy a few questions down is doing)
CEHJ

(Or *up* i should say ;-))
CodingExperts

ASKER
One more important thing. I want to launch it from Eclipse IDE as though a part of IDE.

What kind of strategy/design do you propose ???

-CE
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
CEHJ

Well i'm not really familiar with Eclipse, but you'd probably have to use *its* API too
HulaBula

mh, what about using lomboz (http://forge.objectweb.org/projects/lomboz) for developing your J2EE webapplications? There it is simple to deploy/undeploy any web-project you like to specified application server.
HulaBula

Do you have in mind, to develop a eclipse plugin?
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
CodingExperts

ASKER
I have that thing in mind. How much time do you think it should take??.

for the moment I am trying to Load an XML file in ANT and then process the input.

http://ant.apache.org/manual/CoreTasks/loadfile.html
http://ant.apache.org/manual/CoreTypes/filterchain.html

If you have seen the war/ear deployment profile creator in JDeveloper you can easily figure out what i am looking for.

-CE
CEHJ

There are several useful links here, including ones about plugin development
CEHJ

>>If you have seen the war/ear deployment profile creator in JDeveloper

You could probably link into:

http://ant.apache.org/manual/CoreTasks/ear.html
http://ant.apache.org/manual/CoreTasks/war.html
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
CodingExperts

ASKER
CEHJ, I have already read the entire ANT mannual.

-CE
CEHJ

>>I have already read the entire ANT mannual

Useful, but it's the ANT api that's key here i would imagine ...
CodingExperts

ASKER
>>Useful, but it's the ANT api that's key here i would imagine ...

I have worked with ANT api before too, and extended them too so that should not be a problem.


CEHJ, I have decided on the stratergy,
I am trying to make a small program which will parse an XML file which will include
<defaultfilesexcluded>
</defaultfilesexcluded>

<filepatternexcluded>
</filepatternsexcluded>

<projectdir>
</projectdir>

etc. entries, which are parsed and a custom build file is generated on the fly, which is then run to get the desired effect. I plan to convert it to a plugin in Eclipse.Do you think this is a right way to do what i wanted to acheive??

Look my plans are to deploy the ear file from the eclipse directly to our dev environment, which is on Oracle9iAS. We already have certain Deploment tasks (Java web application) running on our development environment , which we plan to expose as web-services. Can you suggest How should we go about this entire thing???How much is it feasible ?? (Again i am simply looking for a stratergy or design. i'll code it myself, don't worry about that. ;-) )

-CE


All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
CEHJ

>>I am trying to make a small program which will parse an XML file which will include ...

But there's already a program that does that - it's called  .... Ant :-)

I don't see at first glance what adding a layer of indirection to Ant is going to do for you
CodingExperts

ASKER
>>I don't see at first glance what adding a layer of indirection to Ant is going to do for you
I donot want the Development teams to fiddle with the ANT script.

-CE
CEHJ

OK - i see - you'd like to keep the build script as a template and simply alter parts of it?

In that case you could simply fill the template with parameters, e.g.:

                  <fileset file="${up}" />
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
HulaBula

and to obtain these parameters, you could code a plugin which delivers a new view to the eclipse ide...
some resources are:

SWT in eclipse:
http://www.developer.com/java/other/article.php/10936_3330861_6

rcp tutorial (plugin development basics, the references on the bottom of the page will take you further):
http://www.eclipse.org/articles/Article-RCP-1/tutorial1.html

google delivers some good resources, too!
ASKER CERTIFIED SOLUTION
CEHJ

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.