com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Adding a Server

Follow the instructions below to integrate a new server to Developer Studio Kernel, where you can manipulate artifacts inside the server. You can start, restart and stop the server via Developer Studio Kernel, and deploy artifacts to the new server.

First, you develop a basic plug-in as an Eclipse plug-in using Developer Studio Kernel. The plug-in should extend the extension points used to integrate servers to Developer Studio Kernel.

Configuring the plugin.xml file

A sample plugin.xml file is shown below, with descriptions for each extension point used.

The built-in server extension features in Eclipse are used to integrate carbon servers with Developer Studio Kernel and all the extension points used are generic Eclipse extension points.

org.eclipse.wst.server.core.runtimeType

Example:

 <extension
         point="org.eclipse.wst.server.core.runtimeTypes">
      <runtimeType
            class="org.eclipse.jst.server.generic.core.internal.GenericServerRuntime"
            description="WSO2 Carbon 5.0 based server"
            id="org.wso2.developerstudio.eclipse.carbon.runtime50"
            name="WSO2 Carbon 5.0 based server"
            vendor="WSO2"
            vendorId="wso2"
            version="5.0.0">
         <moduleType
               types="org.wso2.developerstudio.eclipse.carbon.module"
               versions="1.0">
         </moduleType>
          <moduleType
               types="jst.web"
               versions="2.2, 2.3, 2.4">
     	</moduleType>
      </runtimeType>
   </extension>

The attributes given in this extension are as follows:

  • id - specifies a unique identifier for this extension point

  • name - a translatable name used to identify the runtime type

  • description - a translatable description of the runtime type

  • vendor - a translatable vendor name

  • version - a translatable version number

  • vendorId - an id used to identify the vendor

  • class - specifies the fully qualified name of the Java class that extends RuntimeDelegate. Runtime instances of this type will delegate to instances of this class. Delegates must also have a public 0-arg constructor.

org.eclipse.wst.server.core.serverTypes

This extension point is used to support a new server type.

Example:

<extension point="org.eclipse.wst.server.core.serverTypes">
      <serverType            behaviourClass="org.wso2.developerstudio.eclipse.carbonserver50.internal.CarbonServerBehavior50"
            class="org.wso2.developerstudio.eclipse.carbonserver50.internal.CarbonServer50"
            description="WSO2 Carbon 5.0 based server"
            hasConfiguration="false"
            id="org.wso2.developerstudio.eclipse.carbon.server50"
            initialState="stopped"
            launchConfigId="org.eclipse.jst.server.generic.core.launchConfigurationType"
            launchModes="run, debug"
            name="WSO2 Carbon 5.0 based server"
            runtime="true"
            runtimeTypeId="org.wso2.developerstudio.eclipse.carbon.runtime50"
            startBeforePublish="true"
            startTimeout="600000"
            stopTimeout="15000"
            supportsRemoteHosts="false">
      </serverType>
   </extension>

The attributes given in this extension are as follows:

  • id - unique identifier for the server type

  • name - a translatable name used to identify this server type

  • description - a translatable description of this server type

  • class - specifies the fully qualified name of the Java class that extends org.wso2.developerstudio.eclipse.carbonserver50.internal.CarbonServer

  • behaviourClass - specifies the fully qualified name of the Java class that extends CarbonServerBehaviour in the org.wso2.developerstudio.eclipse.carbonserver.base.impl package. Server instances of this type will delegate to instances of this class. Delegates must also have a public 0-arg constructor

  • hasConfiguration - true if this server has server configuration files

  • runtimeTypeId - the runtime type id that this server type corresponds to

  • launchConfigId - the launch configuration id for the launch configuration that is able to start this server

  • supportsRemoteHosts - true if this server type can work with remote host names, false if this server type can only work on localhost. If unspecified, false is assumed

  • runtime - true if this server requires a runtime, and false otherwise

  • launchModes - a comma separated list of the launch modes that this server supports

  • initialState - the intial state of the server, either started, or stopped. If this attribute is not specified, the server state will be unknown

  • startTimeout - the timeout value (in ms) that the tool will wait for the server to be started. The default value is 2 minutes

  • stopTimeout - the timeout value (in ms) that the tool will wait for the server to be stopped. The default value is 2 minutes

  • startBeforePublish - boolean value true or false to specify whether the server needs to be started for publishing to occur. If true, the server is started on every call to publish() before executing the publish code
org.eclipse.jst.server.core.runtimeClasspathProviders

Example:

<extension point="org.eclipse.jst.server.core.runtimeClasspathProviders">
      <runtimeClasspathProvider
            class="org.eclipse.jst.server.generic.core.internal.GenericServerRuntimeTargetHandler"
            runtimeTypeIds="org.wso2.developerstudio.eclipse.carbon.*">
      </runtimeClasspathProvider>
   </extension>

The attributes given in this extension are as follows:

  • id - specifies a unique identifier for this extension point

  • runtimeTypeIds - a comma separated list of runtime type ids that this provider may support. Used for memory and performance reasons

  • class - specifies the fully qualified name of the Java class that extends RuntimeClasspathProviderDelegate. Runtime classpath provider instances of this type will delegate to instances of this class.
org.eclipse.wst.common.project.facet.core.runtimes

This extension point is used to register the facets for server integration.

Example:

 <extension
         point="org.eclipse.wst.common.project.facet.core.runtimes">
      <runtime-component-type
            id="org.wso2.wsf.ide.server.carbon.v50">
      </runtime-component-type>
      <runtime-component-version
            type="org.wso2.wsf.ide.server.carbon.v50"
            version="1.0">
      </runtime-component-version>
      <supported>
         <facet
               id="jst.web"
               version="2.2, 2.3, 2.4">
         </facet>
         <facet
               id="org.wso2.developerstudio.eclipse.carbon.facetId"
               version="1.0">
         </facet>         
         <runtime-component
               id="org.wso2.wsf.ide.server.carbon.v50"
               version="1.0">
         </runtime-component>
      </supported>
      <adapter>
         <runtime-component
               id="org.wso2.wsf.ide.server.carbon.v50">
         </runtime-component>
         <factory
               class="org.eclipse.jst.server.core.internal.RuntimeClasspathProvider$Factory">
         </factory>
         <type
               class="org.eclipse.jst.common.project.facet.core.IClasspathProvider">
         </type>
      </adapter>
      <adapter>
         <runtime-component
               id="org.wso2.wsf.ide.server.carbon.v50">
         </runtime-component>
         <factory
               class="org.eclipse.jst.server.ui.internal.RuntimeLabelProvider$Factory">
         </factory>
         <type
               class="org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLabelProvider">
         </type>
      </adapter>
   </extension>
org.eclipse.jst.server.core.runtimeFacetMappings

Example:

 <extension
         point="org.eclipse.jst.server.core.runtimeFacetMappings">
      <runtimeFacetMapping
            runtime-component="org.wso2.wsf.ide.server.carbon.v50"
            runtimeTypeId="org.wso2.developerstudio.eclipse.carbon.runtime50"
            version="1.0">
      </runtimeFacetMapping>
   </extension>

The attributes given in this extension are as follows:

  • id - specifies a unique identifier for this extension point

  • runtimeTypeId - a runtime type id

  • runtime-component - a facet runtime component id

  • version - a facet runtime component version
org.eclipse.wst.server.ui.wizardFragments

This extension point provides a way to add pages or logic into wizards for a specific runtime, server, or server configuration type.

Example:

 <extension point="org.eclipse.wst.server.ui.wizardFragments">
      <fragment            class="org.wso2.developerstudio.eclipse.carbonserver.base.internal.CarbonRuntimeWizardFragment"
            id="org.eclipse.jst.server.generic.runtime"
            typeIds="org.wso2.developerstudio.eclipse.carbon.runtime50">
      </fragment>
      <fragment
            class="org.eclipse.jst.server.generic.ui.internal.GenericServerWizardFragment"
            id="org.eclipse.jst.server.generic.server"
            typeIds="org.wso2.developerstudio.eclipse.carbon.server50">
      </fragment>
   </extension>

The attributes given in this extension are as follows:

  • id - specifies a unique identifier for this fragment

  • class - specifies the fully qualified name of the Java class that implements org.eclipse.wst.server.ui.wizard.WizardFragment

  • typeIds - a comma separated list of runtime or server type ids that this fragment applies to
org.eclipse.wst.server.ui.serverImages

The next two extension points are used to add image icons to the server, adding wizards and runtimes. You add the icon used to the icons folder in your plug-in package. The generic icon used for all carbon servers is wsas.ico and is available in the kernel server plug-ins.

Example:

 <extension point="org.eclipse.wst.server.ui.serverImages">
      <image
            icon="icons/wsas.ico"
            id="org.eclipse.jst.server.generic.image"
            typeIds="org.wso2.developerstudio.eclipse.carbon.runtime50">
      </image>
      <image
            icon="icons/wsas.ico"
            id="org.eclipse.jst.server.generic.image"
            typeIds="org.wso2.developerstudio.eclipse.carbon.server50">
      </image>
   </extension>
   
   <extension point="org.eclipse.wst.server.ui.serverImages">
      <image
            icon="icons/wsas.ico"
            id="org.eclipse.jst.server.generic.image"
            typeIds="org.wso2.developerstudio.eclipse.carbon.runtime50">
      </image>
      <image
            icon="icons/wsas.ico"
            id="org.eclipse.jst.server.generic.image"
            typeIds="org.wso2.developerstudio.eclipse.carbon.server50">
      </image>
   </extension>
org.eclipse.jst.server.generic.core.serverdefinition

This extension point adds the server definition to the new server being integrated.

<extension point="org.eclipse.jst.server.generic.core.serverdefinition">
      <serverdefinition
            definitionfile="serverdefinition/carbon.definition.xml"
            id="org.wso2.developerstudio.eclipse.carbon.runtime50">
      </serverdefinition>
   </extension>

 


com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.