Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Create a Deployment programmatically
Create a Deployment programmatically [message #117740] Fri, 09 November 2007 12:29 Go to previous message
Eclipse User
Originally posted by: ddesseignet.axway.com

Hello,

I'am trying to create a Deployment programmatically in the
org.eclipse.hyades.automation.client.adapters.shell.Automati onClientAdapter
class. Indeed, I would like to run a test with the automation module but I
haven't created a deployment with Eclipse before. So I need to create it
programmatically before running my tests through a shell (in the
AutomationClientAdapter class). The problem is I can't recover the
Workspace (because I launch my Test through the command line) when I try
to do that:

IProject project =
ResourcesPlugin.getWorkspace().getRoot().getProject(projectN ame);
URI uri = URI.createPlatformResourceURI(absoluteDeployPath);
org.eclipse.emf.ecore.resource.Resource.Factory factory =
EMFUtil.getResourceFactory(ICommonConstants.DEPLOYMENT_FILE_ EXTENSION);
Resource resource = null;
TPFDeployment deployment = null;
resource = factory.createResource(uri);
deployment = Common_TestprofileFactory.eINSTANCE.createTPFDeployment();
resource.getContents().add(deployment);
deployment.setName("test");
deployment.setDescription("");

Do you have any idea to help me ?

Thanks.

Regards.

Damien
 
Read Message
Read Message
Previous Topic:Substitution of Datapool contents with Deployment?
Next Topic:Problems when profiling a standalone tomcat
Goto Forum:
  


Current Time: Tue May 21 16:11:44 EDT 2013

Powered by FUDForum. Page generated in 0.10117 seconds