Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (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 12:35 Go to next message
Nitha is currently offline Nitha
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 15:43 Go to previous message
Nitha is currently offline Nitha
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: Sat Aug 23 15:58:50 EDT 2014

Powered by FUDForum. Page generated in 0.02102 seconds