Java Code Examples for org.eclipse.wst.server.core.ServerCore#findServerType()
The following examples show how to use
org.eclipse.wst.server.core.ServerCore#findServerType() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BOSWebServerManager.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
protected IServer createServer(final IProgressMonitor monitor, final IProject confProject, final IRuntime runtime) throws CoreException { final IServerType sType = ServerCore.findServerType(TOMCAT_SERVER_TYPE); final IFile file = confProject.getFile("bonitaTomcatServerSerialization"); final IFolder configurationFolder = confProject .getFolder("tomcat_conf"); final File sourceFolder = new File(tomcatInstanceLocation, "conf"); PlatformUtil.copyResource(configurationFolder.getLocation().toFile(), sourceFolder, Repository.NULL_PROGRESS_MONITOR); configurationFolder.refreshLocal(IResource.DEPTH_INFINITE, Repository.NULL_PROGRESS_MONITOR); final IServer server = configureServer(runtime, sType, file, configurationFolder, monitor); portConfigurator = newPortConfigurator(server); portConfigurator.configureServerPort(Repository.NULL_PROGRESS_MONITOR); return server; }
Example 2
Source File: LocalAppEnginePublishOperationTest.java From google-cloud-eclipse with Apache License 2.0 | 5 votes |
/** * Verify that multi-web-module works. */ @Test public void testPublishingSubmodules() throws CoreException { IServerType serverType = ServerCore.findServerType("com.google.cloud.tools.eclipse.appengine.standard.server"); IServerWorkingCopy serverWorkingCopy = serverType.createServer(getClass().getName(), null, null); serverWorkingCopy.modifyModules(new IModule[] {serverModule}, null, null); server = serverWorkingCopy.saveAll(true, null); assertTrue(server.canPublish().isOK()); assertTrue("publish failed", server.publish(IServer.PUBLISH_CLEAN, null).isOK()); LocalAppEngineServerBehaviour serverBehaviour = server.getAdapter(LocalAppEngineServerBehaviour.class); assertNotNull(serverBehaviour); // now verify the result IPath deployDirectory = serverBehaviour.getModuleDeployDirectory(serverModule); File publishedModule = deployDirectory.toFile(); assertTrue(publishedModule.isDirectory()); File webInf = new File(publishedModule, "WEB-INF"); assertTrue(webInf.isDirectory()); assertTrue(new File(webInf, "appengine-web.xml").isFile()); assertTrue(new File(webInf, "web.xml").isFile()); assertTrue(new File(webInf, "classes/sox/server/GreetingServiceImpl.class").isFile()); assertTrue(new File(webInf, "lib/servlet-2.5.jar").isFile()); assertTrue(new File(webInf, "lib/sox-shared.jar").isFile()); }
Example 3
Source File: LaunchHelper.java From google-cloud-eclipse with Apache License 2.0 | 5 votes |
private IServer createServer(IModule[] modules, SubMonitor progress) throws CoreException { IServerType serverType = ServerCore.findServerType(LocalAppEngineServerDelegate.SERVER_TYPE_ID); IServerWorkingCopy serverWorkingCopy = serverType.createServer(null, null, progress.newChild(4)); serverWorkingCopy.modifyModules(modules, null, progress.newChild(4)); return serverWorkingCopy.save(false, progress.newChild(2)); }