Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-26694

Server adapter: should be able to freely set a war name



      For the server adapters in tools/as we have UI that allows a user to set the name of the deployment archive. We're missing this feature for the OpenShift server adapters currently. We're asked to add it.


      1. EXEC: create a new app by using the jboss-webserver31-tomcat8-openshift:1.2 builder image
      2. ASSERT: websocket-chat application is imported into your workspace
      3. ASSERT: server adapter jboss-webserver31-tomcat is created
      4. ASSERT: In OpenShift explorer, below the service jboss-webserver31-tomcat*, you have the running pod (build is finished, pod running)
      5. EXEC: start the server adapter
      6. ASSERT: RSync is executed and the output is visible in the "Console"

      If you look closely at the output you see that the project is synced to the pod in a folder called websocket-chat.war (webapp is accessible at <host>/websocket-chat/)

      Expected result:
      I should be able to set the output folder to anything I want. Ex. we have a customer that wants the application war to be synced up into a folder ROOT (without the extension .war).

      Currently, to achieve this I have to do the following:

      1. EXEC: create the following xml snippet (notice the outputName property for the module)
        and make sure it reads as follows:
        <?xml version="1.0" encoding="UTF-8"?>
              <module id="org.eclipse.jst.jee.server:websocket-chat">
                 <property key="tempLocation" value="" />
                 <property key="location" value="" />
                 <property key="outputName" value="ROOT" />
      2. EXEC: html-encode, join it into a single line and copy it (into the clipboard)
      3. EXEC: open the properties for the server adapter and hit "Switch Location"
      4. ASSERT: in my workspace, a new project Servers is created. It contains the configuration for my server adapter.
      5. EXEC: open the file with the XML Editor
      6. EXEC: in your XML Editor: go to the end of the line <server auto-publish-setting="2" and insert your html-encoded xml as a value to the attribute org.jboss.ide.eclipse.as.core.util.deploymentPreferenceKey="
        <?xml version="1.0" encoding="UTF-8" standalone="no"?>
        <server auto-publish-setting="2" auto-publish-time="2" hostname="jboss-webserver31-tomcat-test." id="test@jboss-webserver31-tomcat" id-set="true" name="jboss-webserver31-tomcat (Service) at OpenShift 3 (" org.jboss.ide.eclipse.as.core.server.IGNORE_LAUNCH_COMMANDS="true" org.jboss.ide.eclipse.as.core.server.deployDirectoryType="custom" org.jboss.ide.eclipse.as.core.server.serverMode="openshift3" org.jboss.ide.eclipse.as.core.server.webPort="80" org.jboss.ide.eclipse.as.core.server.webPortAutoDetect="false" org.jboss.ide.eclipse.as.core.server.zipDeploymentsPreference="true" org.jboss.tools.openshift.Connection="https://developer@" org.jboss.tools.openshift.DeployProject="websocket-chat" org.jboss.tools.openshift.PodPath="/opt/webserver/webapps" org.jboss.tools.openshift.SERVER_START_ON_CREATION="false" org.jboss.tools.openshift.Service="test@jboss-webserver31-tomcat" org.jboss.tools.openshift.SourcePath="${workspace_loc:/websocket-chat}" port="80" runtime-id="test@jboss-webserver31-tomcat" server-type="org.jboss.tools.openshift.server.type" server-type-id="org.jboss.tools.openshift.server.type" start-timeout="450" stop-timeout="450" timestamp="2" org.jboss.ide.eclipse.as.core.util.deploymentPreferenceKey="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;deployment&gt; &lt;local&gt; &lt;module id=&quot;org.eclipse.jst.jee.server:websocket-chat&quot;&gt; &lt;property key=&quot;tempLocation&quot; value=&quot;&quot; /&gt; &lt;property key=&quot;location&quot; value=&quot;&quot; /&gt; &lt;property key=&quot;outputName&quot; value=&quot;ROOT&quot; /&gt; &lt;/module&gt; &lt;/local&gt; &lt;/deployment&gt;">
          <list key="modules" value0="websocket-chat::org.eclipse.jst.jee.server:websocket-chat::jst.web::3.0"/>
      7. EXEC: Save the editor and restart the server

      Syncing now happens into a folder ROOT

        Gliffy Diagrams


          1. console-output-1.png
            127 kB
          2. console-output-2.png
            22 kB
          3. deployment-page-edit-war-name.png
            39 kB
          4. server-adapter-configuration.png
            10 kB
          5. switch-location.png
            39 kB

            Issue Links



                • Assignee:
                  adietish André Dietisheim
                  adietish André Dietisheim
                • Votes:
                  1 Vote for this issue
                  4 Start watching this issue


                  • Created: