API to add war file to an ear project [message #223071] |
Fri, 24 October 2008 16:35 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Nitha![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=nithatech%40gmail.com) 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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03112 seconds