Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » API to add war file to an ear project
API to add war file to an ear project [message #223071] Fri, 24 October 2008 16:35 Go to next message
Nitha is currently offline NithaFriend
Messages: 16
Registered: July 2009
Junior Member
Hi

I am creating a plugin that needs to add an external war file to an ear
project without having to go through the UI. After some digging, I think I
understand some of the basics, but not sure. So far, I am lost on how the
various providers such as WebComponentImportDataModelProvider class can be
created.

WebComponentImportDataModelProvider dataModelProvider = new
WebComponentImportDataModelProvider();;
dataModelProvider.propertySet(dataModelProvider.PROJECT_NAME ,
"ucf17");
dataModelProvider.propertySet(dataModelProvider.FILE_NAME,
"C:\\Documents and Settings\\alladp\\Desktop\\ucf.war");



/* ?? */ IDataModel dataModel = dataModelProvider.getDataModel();
/*?? */ dataModel =
DataModelFactory.createDataModel(dataModelProvider);
WebComponentImportOperation importer = new
WebComponentImportOperation(dataModel);
importer.execute(monitor, null);

Is this the right way?

I also found an API article that has import, export opertions, but this
seems to be pretty old and couldn't find the corresponding new API, could
you point me the right API.
http://www.eclipse.org/webtools/jst/components/j2ee/api/j2ee _operationsAPI.html


Thanks much,
Nitha
Re: API to add war file to an ear project [message #223119 is a reply to message #223071] Fri, 24 October 2008 19:43 Go to previous message
Nitha is currently offline NithaFriend
Messages: 16
Registered: July 2009
Junior Member
If someone else is also looking into something like this, here is what I
found:

http://www.eclipse.org/webtools/jst/components/j2ee/scenario s/WTPApis.html


However, I still need to figure out how to import a war into EAR Project
as unexploded war and associate the war to EAR.

Thanks,
Previous Topic:Re: starting tomcat 5.5.27 from Ganymede
Next Topic:Import war file into EAR Project programatically using API J2EE Operations API
Goto Forum:
  


Current Time: Tue Mar 19 03:52:01 GMT 2024

Powered by FUDForum. Page generated in 0.01903 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top