Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

This commit was manufactured by cvs2svn to create tag 'v20041207'.

  • Loading branch information...
commit c55612e3f5fd60c919853561f3e1a3517322440a 4 parents 3702b10 + 55db460 + 03d3897 + 7c6a1d9
ndai authored
Showing with 69 additions and 15,410 deletions.
  1. +0 −7 plugins/org.eclipse.jst.server.generic.core/.classpath
  2. +0 −6 plugins/org.eclipse.jst.server.generic.core/.cvsignore
  3. +0 −28 plugins/org.eclipse.jst.server.generic.core/.project
  4. +0 −12 plugins/org.eclipse.jst.server.generic.core/build.properties
  5. +0 −10 plugins/org.eclipse.jst.server.generic.core/plugin.properties
  6. +0 −110 plugins/org.eclipse.jst.server.generic.core/plugin.xml
  7. +0 −123 plugins/org.eclipse.jst.server.generic.core/servers/jboss323.server
  8. +0 −118 plugins/org.eclipse.jst.server.generic.core/servers/jonas.server
  9. +0 −149 plugins/org.eclipse.jst.server.generic.core/servers/weblogic81.server
  10. +0 −130 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/CorePlugin.java
  11. +0 −63 .../org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/GenericServerCoreMessages.java
  12. +0 −7 ...clipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/GenericServerCoreMessages.properties
  13. +0 −151 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/AntPublisher.java
  14. +0 −316 ...ins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServer.java
  15. +0 −384 ...clipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerBehaviour.java
  16. +0 −131 ...generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerLaunchConfigurationDelegate.java
  17. +0 −90 ...r.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerLaunchableAdapterDelegate.java
  18. +0 −126 ....eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerRuntime.java
  19. +0 −89 ...server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerRuntimeTargetHandler.java
  20. +0 −82 ....generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerSourcePathComputerDelegate.java
  21. +0 −68 ...e.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/ServerTypeDefinitionManager.java
  22. +0 −86 ...ipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/ServerTypeDefinitionUtil.java
  23. +0 −74 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/Trace.java
  24. +0 −174 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/xml/Resolver.java
  25. +0 −204 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/xml/XMLUtils.java
  26. +0 −80 ...g.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ArchiveType.java
  27. +0 −172 ...org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Classpath.java
  28. +0 −188 ...e.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/LaunchConfiguration.java
  29. +0 −134 ...ns/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Module.java
  30. +0 −134 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Port.java
  31. +0 −80 ...s/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Project.java
  32. +0 −191 .../org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Property.java
  33. +0 −107 ...g.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/PublishType.java
  34. +0 −135 ...org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Publisher.java
  35. +0 −413 ...eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ServerRuntime.java
  36. +0 −162 ...pse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ServerTypeFactory.java
  37. +0 −1,316 ...pse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ServerTypePackage.java
  38. +0 −107 ...eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/UnpublishType.java
  39. +0 −188 ....jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ArchiveTypeImpl.java
  40. +0 −362 ...se.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ClasspathImpl.java
  41. +0 −404 ...ver.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/LaunchConfigurationImpl.java
  42. +0 −296 ...lipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ModuleImpl.java
  43. +0 −296 ...eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/PortImpl.java
  44. +0 −188 ...ipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ProjectImpl.java
  45. +0 −404 ...pse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/PropertyImpl.java
  46. +0 −242 ....jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/PublishTypeImpl.java
  47. +0 −297 ...se.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/PublisherImpl.java
  48. +0 −881 ...st.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ServerRuntimeImpl.java
  49. +0 −211 ...erver.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ServerTypeFactoryImpl.java
  50. +0 −1,329 ...erver.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ServerTypePackageImpl.java
  51. +0 −242 ...st.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/UnpublishTypeImpl.java
  52. +0 −316 ...er.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/util/ServerTypeAdapterFactory.java
  53. +0 −89 ...neric.core/src/org/eclipse/jst/server/generic/servertype/definition/util/ServerTypeResourceFactoryImpl.java
  54. +0 −58 ...rver.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/util/ServerTypeResourceImpl.java
  55. +0 −366 ...jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/util/ServerTypeSwitch.java
  56. +0 −121 plugins/org.eclipse.jst.server.generic.core/xsd/ServerTypeDefinitionSchema.xsd
  57. +0 −400 plugins/org.eclipse.jst.server.generic.core/xsd/org.eclipse.jst.server.generic.servertype.ecore
  58. +0 −81 plugins/org.eclipse.jst.server.generic.core/xsd/servertype.genmodel
  59. +0 −132 plugins/org.eclipse.jst.server.generic.core/xsd/servertype.xsd2ecore
  60. +0 −7 plugins/org.eclipse.jst.server.generic.modules/.classpath
  61. +0 −5 plugins/org.eclipse.jst.server.generic.modules/.cvsignore
  62. +0 −28 plugins/org.eclipse.jst.server.generic.modules/.project
  63. +0 −6 plugins/org.eclipse.jst.server.generic.modules/build.properties
  64. +0 −42 plugins/org.eclipse.jst.server.generic.modules/plugin.xml
  65. +0 −140 plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/EjbModule.java
  66. +0 −148 ...rg.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/EnterpriseApplication.java
  67. +0 −103 plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/J2EEModule.java
  68. +0 −56 ...ipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/J2EESpecModuleObjectAdapter.java
  69. +0 −205 ...se.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/J2eeSpecModuleFactoryDelegate.java
  70. +0 −100 plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/ModulesPlugin.java
  71. +0 −72 plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/Trace.java
  72. +0 −78 plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/Utils.java
  73. +0 −174 plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/WebModule.java
  74. +0 −7 plugins/org.eclipse.jst.server.generic.ui/.classpath
  75. +0 −5 plugins/org.eclipse.jst.server.generic.ui/.cvsignore
  76. +0 −28 plugins/org.eclipse.jst.server.generic.ui/.project
  77. +0 −10 plugins/org.eclipse.jst.server.generic.ui/build.properties
  78. BIN  plugins/org.eclipse.jst.server.generic.ui/icons/obj16/lomboz.gif
  79. BIN  plugins/org.eclipse.jst.server.generic.ui/icons/wizban/logo.gif
  80. +0 −4 plugins/org.eclipse.jst.server.generic.ui/plugin.properties
  81. +0 −86 plugins/org.eclipse.jst.server.generic.ui/plugin.xml
  82. +0 −66 ...st.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericLaunchConfigurationTabGroup.java
  83. +0 −57 ...se.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericServerEditorPartFactory.java
  84. +0 −56 ...jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericServerEditorSectionFactory.java
  85. +0 −291 ...st.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericServerRuntimeWizardFragment.java
  86. +0 −149 ...lipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericServerWizardFragment.java
  87. +0 −73 ...rver.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/ServerDefinitionTypeAwareWizardFragment.java
  88. +0 −332 ...eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/ServerTypeDefinitionGroup.java
  89. +0 −63 plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/GenericServerUIMessages.java
  90. +0 −8 .../org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/GenericServerUIMessages.properties
  91. +0 −114 plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/GenericUiPlugin.java
  92. +3 −1 plugins/org.eclipse.jst.server.tomcat.core/plugin.properties
  93. +1 −2  ...ipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatConfiguration.java
  94. +11 −0 ...rg.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntime.java
  95. +1 −5 ...org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServer.java
  96. +0 −1  plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/SWTUtil.java
  97. +2 −0  ...eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatRuntimeComposite.java
  98. +1 −1  ...se.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/TomcatRuntimeWizardFragment.java
  99. +2 −0  ...r.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/ConfigurationWebModuleEditorPart.java
  100. +0 −1  plugins/org.eclipse.wst.internet.monitor.core/schema/contentFilters.exsd
  101. +15 −15 plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerCore.java
  102. +2 −2 plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerUtil.java
  103. +1 −0  plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Module.java
  104. +4 −1 plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerBehaviourDelegate.java
  105. +3 −2 plugins/org.eclipse.wst.server.ui/plugin.properties
  106. +4 −1 plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/ServerUIUtil.java
  107. +1 −2  plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/TerminationDialog.java
  108. +16 −1 plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/OverviewEditorPart.java
  109. +2 −2 ...s/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/wizard/page/NewServerComposite.java
View
7 plugins/org.eclipse.jst.server.generic.core/.classpath
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
View
6 plugins/org.eclipse.jst.server.generic.core/.cvsignore
@@ -1,6 +0,0 @@
-bin
-build.xml
-genericserver.jar
-org.eclipse.jst.server.generic.core_1.0.0.jar
-temp.folder
-*.settings
View
28 plugins/org.eclipse.jst.server.generic.core/.project
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.server.generic.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
View
12 plugins/org.eclipse.jst.server.generic.core/build.properties
@@ -1,12 +0,0 @@
-source.genericserver.jar = src/
-output.genericserver.jar = bin/
-bin.includes = plugin.xml,\
- genericserver.jar,\
- servers/,\
- plugin.properties,\
- xsd/ServerTypeDefinitionSchema.xsd
-src.includes = servers/,\
- src/,\
- plugin.xml,\
- plugin.properties,\
- xsd/
View
10 plugins/org.eclipse.jst.server.generic.core/plugin.properties
@@ -1,10 +0,0 @@
-pluginName= Generic Server Plugin
-providerName=Eteration.com
-pluginDescription=Provides generic server tooling with easy to develop meta data configuration files
-
-runtimeTypeName=Generic Server Runtime
-runtimeTypeDescription=This is the Lomboz type runtime support
-
-serverTypeName=Generic server support
-serverTypeDescription=Lomboz type generic server
-launchConfigurationTypeName=Generic server launch configuration type
View
110 plugins/org.eclipse.jst.server.generic.core/plugin.xml
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.jst.server.generic.core"
- name="%pluginName"
- version="1.0.0"
- provider-name="%providerName"
- class="org.eclipse.jst.server.generic.core.CorePlugin"
- description="%pluginDescription">
-
- <runtime>
- <library name="genericserver.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.debug.core"/>
- <import plugin="org.eclipse.jdt.core"/>
- <import plugin="org.eclipse.jdt.launching"/>
- <import plugin="org.eclipse.wst.server.core"/>
- <import plugin="org.eclipse.jst.server.core"/>
- <import plugin="org.eclipse.debug.ui"/>
- <import plugin="org.eclipse.ant.core"/>
- <import plugin="org.eclipse.ant.ui"/>
- <import plugin="org.eclipse.jst.server.generic.modules"/>
- <import plugin="org.eclipse.emf.common" export="true"/>
- <import plugin="org.eclipse.emf.ecore"/>
- <import plugin="org.eclipse.emf.ecore.xmi"/>
- </requires>
-
- <extension point="org.eclipse.wst.server.core.runtimeTargetHandlers">
- <runtimeTargetHandler
- id="org.eclipse.jst.server.generic.runtimeTarget"
- runtimeTypeIds="org.eclipse.jst.server.generic.runtime"
- class="org.eclipse.jst.server.generic.internal.core.GenericServerRuntimeTargetHandler"/>
- </extension>
-
- <extension point="org.eclipse.wst.server.core.moduleTypes">
- <moduleType
- id="j2ee.web"
- name="war file"/>
- <moduleType
- id="j2ee.ejb"
- name="ejb"/>
- <moduleType
- id="j2ee.ear"
- name="ear"/>
- </extension>
-
- <extension point="org.eclipse.wst.server.core.runtimeTypes">
- <runtimeType
- id="org.eclipse.jst.server.generic.runtime"
- name="%runtimeTypeName"
- description="%runtimeTypeDescription"
- vendor="All"
- version="0"
- order="100"
- class="org.eclipse.jst.server.generic.internal.core.GenericServerRuntime"
- >
- <moduleType
- types="j2ee.web"
- versions="1.2, 1.3, 1.4"/>
- </runtimeType>
- </extension>
-
-<extension point="org.eclipse.wst.server.core.serverTypes">
- <serverType
- runtime="true"
- class="org.eclipse.jst.server.generic.internal.core.GenericServer"
- order="100"
- id="org.eclipse.jst.server.generic"
- initialState="stopped"
- supportsRemoteHosts="false"
- runtimeTypeId="org.eclipse.jst.server.generic.runtime"
- description="%serverTypeDescription"
- launchConfigId="org.eclipse.jst.server.generic.core.launchConfigurationType"
- behaviourClass="org.eclipse.jst.server.generic.internal.core.GenericServerBehaviour"
- name="%serverTypeName"
- hasConfiguration="false"
- launchModes="run,debug">
-
- </serverType>
- </extension>
-
- <extension point="org.eclipse.debug.core.launchConfigurationTypes">
- <launchConfigurationType
- id="org.eclipse.jst.server.generic.core.launchConfigurationType"
- name="%launchConfigurationTypeName"
- delegate="org.eclipse.jst.server.generic.internal.core.GenericServerLaunchConfigurationDelegate"
- modes="run, debug"
- sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
- sourcePathComputerId="org.eclipse.jst.server.generic.core.sourcePathComputer"/>
- </extension>
-
- <extension point="org.eclipse.debug.core.sourcePathComputers">
- <sourcePathComputer
- id="org.eclipse.jst.server.generic.core.sourcePathComputer"
- class="org.eclipse.jst.server.generic.internal.core.GenericServerSourcePathComputerDelegate"/>
- </extension>
-
- <extension point="org.eclipse.wst.server.core.launchableAdapters">
- <launchableAdapter
- class="org.eclipse.jst.server.generic.internal.core.GenericServerLaunchableAdapterDelegate"
- id="org.eclipse.jst.server.generic.web"/>
- </extension>
-</plugin>
View
123 plugins/org.eclipse.jst.server.generic.core/servers/jboss323.server
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<tns:ServerRuntime
- xmlns:tns="http://eclipse.org/jst/server/generic/ServerTypeDefinition"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://eclipse.org/jst/server/generic/ServerTypeDefinition ServerTypeDefinitionSchema.xsd "
- name="JBOSS 3.2.3" version="v3.2.3">
-<property id="serverRootDirectory"
- label="Application Server Directory:"
- type="directory"
- context="runtime"
- default="/your_server_root/appservers/jboss-3.2.3" />
-<property id="serverAddress"
- label="Address:"
- type="string"
- context="server"
- default="127.0.0.1" />
-<property id="port"
- label="Port:"
- type="string"
- context="server"
- default="8080" />
-<property id="serverConfig"
- label="Server Configuration (minimal/default/all):"
- type="string"
- context="server"
- default="default" />
-<property id="classPath"
- label="Classpath Variable:"
- type="directory"
- context="runtime"
- default="/your_server_root/appservers/jboss-3.2.3" />
-
- <port>
- <no>${port}</no>
- <name>Http</name>
- <protocol>http</protocol>
- </port>
-
- <module>
- <type>j2ee.web</type>
- <publishDir>${serverRootDirectory}/server/${serverConfig}/deploy</publishDir>
- <publisherReference>jboss.web</publisherReference>
- </module>
-
-
- <project>
- <classpathReference>jboss.project</classpathReference>
- </project>
-
- <start>
- <class>org.jboss.Main</class>
- <workingDirectory>${serverRootDirectory}/bin</workingDirectory>
- <programArguments>-c ${serverConfig}</programArguments>
- <vmParameters></vmParameters>
- <classpathReference>jboss</classpathReference>
- </start>
-
- <stop>
- <class>org.jboss.Shutdown</class>
- <workingDirectory>${serverRootDirectory}/bin</workingDirectory>
- <programArguments>-S</programArguments>
- <vmParameters></vmParameters>
- <classpathReference>jboss</classpathReference>
- </stop>
- <publisher id="jboss.web">
- <publish>
- <task>
- <![CDATA[
-
- <project name="deployextension" default="deploy" basedir=".">
- <target name="deploy">
- <jar destfile="${deploymentUnitName}.war">
- <zipfileset dir="${moduleDir}">
- <include name="**/*.*"/>
- <exclude name="**/*.war"/>
- </zipfileset>
- </jar>
- <move file="${deploymentUnitName}.war" todir="${deployDir}"/>
- </target>
- </project>
-
- ]]>
- </task>
- <classpathReference>jboss</classpathReference>
- </publish>
- <unpublish>
- <task>
- <![CDATA[<project name="deployextension" default="deploy" basedir=".">
- <target name="deploy">
- <delete file="${deployDir}/${deploymentUnitName}.war"/>
- </target>
- </project>]]>
- </task>
- <classpathReference>jboss</classpathReference>
- </unpublish>
- </publisher>
-
- <classpath id="jboss" isLibrary="true">
- <archive path="${classPath}/bin/run.jar" />
- <archive path="${classPath}/bin/shutdown.jar" />
- <archive path="${classPath}/client/jboss-j2ee.jar" />
- <archive path="${classPath}/server/${serverConfig}/lib/javax.servlet.jar" />
- <archive path="${classPath}/lib/jboss-boot.jar" />
- <archive path="${classPath}/lib/jboss-system.jar" />
- <archive path="${classPath}/lib/concurrent.jar" />
- <archive path="${classPath}/server/${serverConfig}/lib/jboss.jar" />
- <archive path="${classPath}/server/${serverConfig}/lib/jnpserver.jar" />
- <archive path="${classPath}/server/${serverConfig}/lib/jpl-pattern.jar" />
- <archive path="${classPath}/server/${serverConfig}/lib/jpl-util.jar" />
- <archive path="${classPath}/server/${serverConfig}/lib/jboss-transaction.jar" />
- <archive path="${classPath}/server/${serverConfig}/lib/bcel.jar" />
- <archive path="${classPath}/lib/jdom.jar" />
- <archive path="${classPath}/lib/xercesImpl.jar" />
- <archive path="${classPath}/lib/xml-apis.jar" />
- <archive path="${classPath}/lib/gnu-regexp.jar" />
- <archive path="${classPath}/lib/getopt.jar" />
- </classpath>
-
- <classpath id="jboss.project" isLibrary="false">
- <archive path="${classPath}/client/jboss-j2ee.jar" />
- </classpath>
-
-</tns:ServerRuntime>
View
118 plugins/org.eclipse.jst.server.generic.core/servers/jonas.server
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<tns:ServerRuntime
- xmlns:tns="http://eclipse.org/jst/server/generic/ServerTypeDefinition"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://eclipse.org/jst/server/generic/ServerTypeDefinition ServerTypeDefinitionSchema.xsd "
- name="JonAS 4.1.4" version="v4.1.4">
- <property id="jonasRoot"
- label="JonAS Installation Directory:"
- type="directory"
- context="runtime"
- default="/your_server_root/JOnAS-4.1.4" />
- <property id="jonasBase"
- label="JonAS Configuration Directory:"
- type="directory"
- context="runtime"
- default="/your_server_root/JOnAS-4.1.4" />
- <property id="serverAddress"
- label="Address:"
- type="string"
- context="server"
- default="127.0.0.1" />
- <property id="port"
- label="Port:"
- type="string"
- context="server"
- default="9000" />
- <property id="protocols"
- label="Ejb Protocols:"
- type="string"
- context="server"
- default="jrmp" />
- <property id="mappernames"
- label="Mapper names:"
- type="string"
- context="server"
- default="" />
- <property id="classPath"
- label="Classpath Variable:"
- type="directory"
- context="runtime"
- default="/your_server_root/JOnAS-4.1.4" />
-
- <port>
- <no>${port}</no>
- <name>Http</name>
- <protocol>http</protocol>
- </port>
-
- <module>
- <type>j2ee.web</type>
- <publishDir>${jonasBase}/webapps/autoload</publishDir>
- <publisherReference>jonas.web</publisherReference>
- </module>
-
-
- <project>
- <classpathReference>jonas.project</classpathReference>
- </project>
-
- <start>
- <class>org.objectweb.jonas.server.Bootstrap</class>
- <workingDirectory>${jonasRoot}</workingDirectory>
- <programArguments>org.objectweb.jonas.server.Server</programArguments>
- <vmParameters>-Dinstall.root=${jonasRoot} -Djonas.base=${jonasBase} -Djava.security.policy=${jonasRoot}/conf/java.policy -Djonas.classpath= -Djonas.default.classloader=true -Djavax.rmi.CORBA.PortableRemoteObjectClass=org.objectweb.carol.rmi.multi.MultiPRODelegate -Djava.naming.factory.initial=org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory -Djava.security.auth.login.config=${jonasRoot}/conf/jaas.config -Djava.endorsed.dirs=${jonasRoot}/lib/endorsed -Djava.rmi.server.RMIClassLoaderSpi=org.objectweb.jonas.server.RemoteClassLoaderSpi</vmParameters>
- <classpathReference>jonas</classpathReference>
- </start>
-
- <stop>
- <class>org.objectweb.jonas.server.Bootstrap</class>
- <workingDirectory>${jonasRoot}</workingDirectory>
- <programArguments>org.objectweb.jonas.adm.JonasAdmin -s</programArguments>
- <vmParameters>-Dinstall.root=${jonasRoot} -Djonas.base=${jonasBase} -Djava.security.policy=${jonasRoot}/conf/java.policy -Djonas.classpath= -Djonas.default.classloader=true -Djavax.rmi.CORBA.PortableRemoteObjectClass=org.objectweb.carol.rmi.multi.MultiPRODelegate -Djava.naming.factory.initial=org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory -Djava.security.auth.login.config=${jonasRoot}/conf/jaas.config -Djava.endorsed.dirs=${jonasRoot}/lib/endorsed -Djava.rmi.server.RMIClassLoaderSpi=org.objectweb.jonas.server.RemoteClassLoaderSpi</vmParameters>
- <classpathReference>jonas</classpathReference>
- </stop>
- <publisher id="jonas.web">
- <publish>
- <task><![CDATA[
-
- <project name="deployextension" default="deploy" basedir=".">
- <target name="deploy">
- <jar destfile="${deploymentUnitName}.war">
- <zipfileset dir="${moduleDir}">
- <include name="**/*.*"/>
- <exclude name="**/*.war"/>
- </zipfileset>
- </jar>
- <move file="${deploymentUnitName}.war" todir="${deployDir}"/>
- </target>
- </project>
-
- ]]></task>
- <classpathReference>jonas</classpathReference>
- </publish>
- <unpublish>
- <task>
- <![CDATA[<project name="deployextension" default="deploy" basedir=".">
- <target name="deploy">
- <delete file="${deployDir}/${deploymentUnitName}.war"/>
- </target>
- </project>]]>
- </task>
- <classpathReference>weblogic.admin</classpathReference>
- </unpublish>
- </publisher>
-
- <classpath id="jonas" isLibrary="true">
- <archive path="${classPath}/lib/common/ow_jonas_bootstrap.jar" />
- <archive path="${classPath}/conf" />
- </classpath>
-
- <classpath id="jonas.project" isLibrary="false">
- <archive path="${classPath}/lib/common/ow_jonas_bootstrap.jar" />
- <archive path="${classPath}/lib/commons/j2ee/ejb-2_1-api.jar" />
- <archive path="${classPath}/lib/commons/j2ee/servlet-2_4.jar" />
- <archive path="${classPath}/lib/commons/j2ee/jms.jar" />
- </classpath>
-
-</tns:ServerRuntime>
View
149 plugins/org.eclipse.jst.server.generic.core/servers/weblogic81.server
@@ -1,149 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<tns:ServerRuntime
- xmlns:tns="http://eclipse.org/jst/server/generic/ServerTypeDefinition"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://eclipse.org/jst/server/generic/ServerTypeDefinition ServerTypeDefinitionSchema.xsd "
- name="BEA WebLogic Server v8.1" version="v8.1">
-
-
- <property id="beaHome"
- label="BEA Home Directory:"
- type="directory"
- context="runtime"
- default="C:/bea" />
- <property id="serverRootDirectory"
- label="Application Server Directory:"
- type="directory"
- context="runtime"
- default="C:/bea/weblogic81" />
- <property id="domainName"
- label="Admin Domain Name:"
- type="string"
- context="server"
- default="mydomain" />
- <property id="domainDirectory"
- label="Administration Domain Directory:"
- type="directory"
- context="server"
- default="C:/bea/user_projects/domains/mydomain" />
- <property id="serverName"
- label="Server Name:"
- type="string"
- context="server"
- default="myserver" />
- <property id="userName"
- label="User Name:"
- type="string"
- context="server"
- default="system" />
- <property id="password"
- label="Password:"
- type="string"
- context="server"
- default="weblogic" />
- <property id="productionMode"
- label="Production Mode:"
- type="boolean"
- context="server"
- default="false" />
- <property id="serverAddress"
- label="Address:"
- type="string"
- context="server"
- default="127.0.0.1" />
- <property id="port"
- label="Port:"
- type="string"
- context="server"
- default="7001" />
- <property id="classPath"
- label="Classpath Variable:"
- type="directory"
- context="runtime"
- default="C:/bea/weblogic81/server/lib" />
-
-
-
- <port>
- <no>${port}</no>
- <name>Http</name>
- <protocol>http</protocol>
- </port>
-
- <module>
- <type>j2ee.web</type>
- <publishDir>${domainDirectory}/applications</publishDir>
- <publisherReference>weblogic.web</publisherReference>
- </module>
-
-
- <project>
- <classpathReference>weblogic</classpathReference>
- </project>
-
- <start>
- <class>weblogic.Server</class>
- <workingDirectory>${domainDirectory}</workingDirectory>
- <programArguments></programArguments>
- <vmParameters>
- -Xms32m -Xmx200m -XX:MaxPermSize=128m
- -Dweblogic.Name=${serverName} -Dbea.home="${beaHome}"
- -Dweblogic.management.username=${userName}
- -Dweblogic.management.password=${password}
- -Dweblogic.ProductionModeEnabled=${productionMode}
- -Djava.security.policy=="${serverRootDirectory}/server/lib/weblogic.policy"
- </vmParameters>
- <classpathReference>weblogic</classpathReference>
- </start>
-
- <stop>
- <class>weblogic.Admin</class>
- <workingDirectory>${domainDirectory}</workingDirectory>
- <programArguments>
- -url t3://${serverAddress}:${port} -username ${userName}
- -password ${password} SHUTDOWN
- </programArguments>
- <vmParameters></vmParameters>
- <classpathReference>weblogic.admin</classpathReference>
- </stop>
- <publisher id="weblogic.web">
- <publish>
- <task>
- <![CDATA[<project name="deployextension" default="deploy" basedir=".">
- <target name="deploy">
- <jar destfile="${module.name}.war">
- <zipfileset dir="${module.dir}">
- <include name="**/*.*"/>
- <exclude name="**/jsp_servlet/*.class"/>
- <exclude name="**/*.war"/>
- </zipfileset>
- </jar>
- <move file="${module.name}.war" todir="${server.publish.dir}"/>
- </target>
- </project>]]>
- </task>
- <classpathReference>weblogic.admin</classpathReference>
- </publish>
- <unpublish>
- <task>
- <![CDATA[<project name="deployextension" default="deploy" basedir=".">
- <target name="deploy">
- <delete file="${server.publish.dir}/${module.name}.war"/>
- </target>
- </project>]]>
- </task>
- <classpathReference>weblogic.admin</classpathReference>
- </unpublish>
- </publisher>
-
- <classpath id="weblogic" isLibrary="true">
- <archive path="${classPath}/weblogic.jar" />
- <archive path="${classPath}/ojdbc14.jar" />
- <archive path="${classPath}/webservices.jar" />
- </classpath>
-
- <classpath id="weblogic.admin" isLibrary="false">
- <archive path="${classPath}/weblogic.jar" />
- </classpath>
-
-</tns:ServerRuntime>
View
130 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/CorePlugin.java
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.core;
-
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jst.server.generic.internal.core.ServerTypeDefinitionManager;
-import org.eclipse.ui.plugin.*;
-import org.osgi.framework.BundleContext;
-import java.io.IOException;
-import java.net.URL;
-import java.util.*;
-
-/**
- * The main plugin class to be used in the desktop.
- *
- * @author Gorkem Ercan
- */
-public class CorePlugin extends AbstractUIPlugin {
-
- public static final String PLUGIN_ID = "org.eclipse.jst.server.generic.core";
-
- //The shared instance.
- private static CorePlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
- private ServerTypeDefinitionManager fServerTypeDefinitionManager;
- /**
- * The constructor.
- */
- public CorePlugin() {
- super();
- plugin = this;
- try {
- resourceBundle = ResourceBundle.getBundle("org.eclipse.jst.server.generic.core.CorePluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- */
- public static CorePlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = CorePlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
- /**
- *
- * @return
- */
- public ServerTypeDefinitionManager getServerTypeDefinitionManager()
- {
- if(fServerTypeDefinitionManager==null)
- fServerTypeDefinitionManager = new ServerTypeDefinitionManager(getInstallUrl());
- return fServerTypeDefinitionManager;
- }
-
- private URL getInstallUrl()
- {
- try {
- return Platform.resolve(this.getBundle().getEntry("/"));
- } catch (IOException e) {
- return null;
- }
- }
-
-
-}
View
63 ...g.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/GenericServerCoreMessages.java
@@ -1,63 +0,0 @@
-package org.eclipse.jst.server.generic.core;
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Helper class to get messages
- *
- * @author Gorkem Ercan
- */
-public class GenericServerCoreMessages {
-
- private static final String RESOURCE_BUNDLE= "org.eclipse.jst.server.generic.core.GenericServerCoreMessages";//$NON-NLS-1$
-
- private static ResourceBundle fResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
-
- private GenericServerCoreMessages() {
- }
-
- /**
- * Return string from the resource bundle.
- *
- * @param key the string used to get the bundle value, must not be <code>null</code>
- * @return the string from the resource bundle
- */
- public static String getString(String key) {
- try {
- return fResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";
- }
- }
-
- /**
- * Gets a string from the resource bundle that is
- * formatted it with the given argument.
- *
- * @param key the string used to get the bundle value, must not be null
- * @param arg the argument used to format the string
- * @return the formatted string
- */
- public static String getFormattedString(String key, Object[] arg) {
- String format= null;
- try {
- format= fResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";
- }
- if (arg == null)
- arg= new Object[0];
- return MessageFormat.format(format, arg);
- }
-
- /**
- * Returns a resource bundle.
- *
- * @return the resource bundle
- */
- public static ResourceBundle getResourceBundle() {
- return fResourceBundle;
- }
-}
View
7 ...pse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/GenericServerCoreMessages.properties
@@ -1,7 +0,0 @@
-errorName=Invalid name.
-errorJRE=Invalid JRE.
-errorNoServerType=No server type definition
-errorDuplicateRuntimeName=Name is already in use
-errorMissingClasspathEntry=Missing classpath entry {0}
-errorPortInUse=Server port In Use {0}-{1}
-cancelNoPublish=Nothing to publish
View
151 ...s/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/AntPublisher.java
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.core;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.ant.core.AntRunner;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.server.generic.core.CorePlugin;
-import org.eclipse.jst.server.generic.modules.WebModule;
-import org.eclipse.jst.server.generic.servertype.definition.Module;
-import org.eclipse.jst.server.generic.servertype.definition.PublishType;
-import org.eclipse.jst.server.generic.servertype.definition.Publisher;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IModuleArtifact;
-/**
- * Ant based publisher.
- *
- * @author Gorkem Ercan
- */
-
-public class AntPublisher{
-
- /**
- * @param parents
- * @param module
- * @param serverDefinition
- */
- private List parents;
- private IModule module;
- private ServerRuntime serverTypeDefinition;
-
- public AntPublisher(List parents, IModule module, ServerRuntime serverDefinition) {
- this.parents = parents;
- this.module = module;
- this.serverTypeDefinition = serverDefinition;
- }
- /* (non-Javadoc)
- * @see org.eclipse.wtp.server.core.model.IPublisher#publish(org.eclipse.wtp.server.core.resources.IModuleResource[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus[] publish(IModuleArtifact[] resource,
- IProgressMonitor monitor) throws CoreException {
- Module sModule = serverTypeDefinition.getModule(this.module.getModuleType().getId());
- Publisher publisher = serverTypeDefinition.getPublisher(sModule.getPublisherReference());
- String deployAnt = ((PublishType)publisher.getPublish().get(0)).getTask();
- deployAnt = serverTypeDefinition.getResolver().resolveProperties(deployAnt);
-
- if(deployAnt == null || deployAnt.length()<1)
- return new IStatus[]{new Status(IStatus.ERROR,CorePlugin.PLUGIN_ID,0,"AntBuildFileDoesNotExist",null)};
-
-
- IPath file = CorePlugin.getDefault().getStateLocation().append("tempAnt.xml");
- try {
- createNewFile(file.toFile(),deployAnt.getBytes());
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- runAnt(file.toString(),new String[]{"deploy"},getPublishProperties(resource),monitor);
-
- file.toFile().delete();
-
- // TODO Auto-generated method stub
- return null;
- }
- private Map getPublishProperties(IModuleArtifact[] resource)
- {
- Module module = serverTypeDefinition.getModule(this.module.getModuleType().getId());
-
- Map props = new HashMap();
- String modDir = module.getPublishDir();
- modDir = serverTypeDefinition.getResolver().resolveProperties(modDir);
-
- props.put("deploymentUnitName",this.module.getName());
- props.put("moduleDir",((WebModule)this.module).getLocation().toString());
- props.put("deployDir",modDir);
- return props;
-
-
- }
- private void runAnt(String buildFile,String[] targets,Map properties ,IProgressMonitor monitor)throws CoreException
- {
- AntRunner runner = new AntRunner();
- runner.setBuildFileLocation(buildFile);
- runner.setExecutionTargets(targets);
- runner.addUserProperties(properties);
- runner.run(monitor);
- }
-
-
-
-
- public boolean createNewFile(File f,byte[] content) throws IOException {
- if (f != null) {
- if (f.exists()) {
- return false;
- }
- FileOutputStream fos = null;
- try {
- fos = new FileOutputStream(f);
- fos.write(content);
- } finally {
- if (fos != null) {
- fos.close();
- }
- }
- return true;
- }
- return false;
- }
-
-
-
-}
View
316 .../org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServer.java
@@ -1,316 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.core;
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.server.generic.core.CorePlugin;
-import org.eclipse.jst.server.generic.core.GenericServerCoreMessages;
-import org.eclipse.jst.server.generic.modules.J2eeSpecModuleFactoryDelegate;
-import org.eclipse.jst.server.generic.servertype.definition.Port;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.jst.server.j2ee.IWebModule;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.ITask;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.model.IModuleEvent;
-import org.eclipse.wst.server.core.model.IModuleFactoryEvent;
-import org.eclipse.wst.server.core.model.IURLProvider;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-import org.eclipse.wst.server.core.util.ServerPort;
-
-/**
- * Generic XML based server implementation.
- *
- * @author Gorkem Ercan
- */
-public class GenericServer extends ServerDelegate implements IURLProvider {
-
-
-
-
-
-
-
- private ServerRuntime fServerDefinition;
-
-// /**
-// * Returns the project publisher that can be used to
-// * publish the given project.
-// *
-// * @param project org.eclipse.core.resources.IProject
-// * @return org.eclipse.wst.server.core.model.IProjectPublisher
-// */
-// public IPublisher getPublisher(List parents, IModule module) {
-// return new AntPublisher(parents, module, this.getServerDefinition());
-// }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#updateConfiguration()
- */
- public void updateConfiguration() {
- Trace.trace(Trace.FINEST, "updateConfiguration" + this);
- }
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#publishStart(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus publishStart(IProgressMonitor monitor) {
- if(getModules().length<1)
- return new Status(IStatus.CANCEL,CorePlugin.PLUGIN_ID,0,GenericServerCoreMessages.getString("cancelNoPublish"),null);
- return new Status(IStatus.OK, CorePlugin.PLUGIN_ID, 0, "PublishingStarted", null);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#publishConfiguration(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus publishConfiguration(IProgressMonitor monitor) {
-
- return new Status(IStatus.OK, CorePlugin.PLUGIN_ID, 0, "Published Configuration", null);
- }
-
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.eclipse.wst.server.core.model.IServerDelegate#publishStop(org.eclipse.core.runtime.IProgressMonitor)
-// */
-// public IStatus publishStop(IProgressMonitor monitor) {
-// getServer().setConfigurationSyncState(IServer.SYNC_STATE_IN_SYNC);
-// return new Status(IStatus.OK, CorePlugin.PLUGIN_ID, 0, "Published Configuration", null);
-// }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#canModifyModules(org.eclipse.wst.server.core.model.IModule[],
- * org.eclipse.wst.server.core.model.IModule[])
- */
- public IStatus canModifyModules(IModule[] add, IModule[] remove) {
- // TODO Auto-generated method stub
- return new Status(IStatus.OK, CorePlugin.PLUGIN_ID, 0, "CanModifyModules", null);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#getModules()
- */
- public org.eclipse.wst.server.core.IModule[] getModules() {
- return J2eeSpecModuleFactoryDelegate.getInstance().getModules();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#getModuleState(org.eclipse.wst.server.core.model.IModule)
- */
- public int getModuleState(IModule module) {
- return IServer.STATE_STARTED;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#getRepairCommands(org.eclipse.wst.server.core.model.IModuleFactoryEvent[],
- * org.eclipse.wst.server.core.model.IModuleEvent[])
- */
- public ITask[] getRepairCommands(IModuleFactoryEvent[] factoryEvent,
- IModuleEvent[] moduleEvent) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#getChildModules(org.eclipse.wst.server.core.model.IModule)
- */
- public IModule[] getChildModules(IModule module) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#getParentModules(org.eclipse.wst.server.core.model.IModule)
- */
- public IModule[] getParentModules(IModule module) throws CoreException {
- //FIXME This is valid for only web modules. A generic server should support any
- // kind of j2ee module. Fix this after the server architectures are determined.
- if (module instanceof IWebModule) {
- IWebModule webModule = (IWebModule) module;
- IStatus status = canModifyModules(new IModule[] { module }, null);
- if (status == null || !status.isOK())
- throw new CoreException(status);
- ArrayList l = new ArrayList();
- l.add(webModule);
- return (IModule[])l.toArray(new IModule[l.size()]);
- }
- return null;
-
- }
-
- /**
- * @return
- */
- private Map getServerInstanceProperties() {
- Map runtimeProperties =getRuntimeDelegate().getAttribute(
- GenericServerRuntime.SERVER_INSTANCE_PROPERTIES, new HashMap());
- Map serverProperties = getAttribute(GenericServerRuntime.SERVER_INSTANCE_PROPERTIES,new HashMap(1));
- Map instanceProperties = new HashMap(runtimeProperties.size()+serverProperties.size());
- instanceProperties.putAll(runtimeProperties);
- instanceProperties.putAll(serverProperties);
- return instanceProperties;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IMonitorableServer#getServerPorts()
- */
- public org.eclipse.wst.server.core.IServerPort[] getServerPorts() {
- List ports = new ArrayList();
- Iterator pIter = this.getServerDefinition().getPort().iterator();
- while (pIter.hasNext()) {
- Port element = (Port) pIter.next();
- int port = Integer.parseInt(getServerDefinition().getResolver().resolveProperties(element.getNo()));
- ports.add(new ServerPort("server", element.getName(), port, element.getProtocol()));
- }
-
- return (org.eclipse.wst.server.core.IServerPort[])ports.toArray(new org.eclipse.wst.server.core.IServerPort[ports.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IStartableServer#isTerminateOnShutdown()
- */
- public boolean isTerminateOnShutdown() {
- return true;
- }
-
- public int getStartTimeout() {
- return 300000;
- }
-
- public int getStopTimeout() {
- return 300000;
- }
- /* (non-Javadoc)
- * @see org.eclipse.wtp.server.core.model.IURLProvider#getModuleRootURL(org.eclipse.wtp.server.core.model.IModule)
- */
- public URL getModuleRootURL(IModule module) {
-
- try {
- if (module == null || !(module instanceof IWebModule))
- return null;
-
- String url = "http://localhost";
- int port = 0;
-
- port = getHttpPort();
- port = ServerCore.getServerMonitorManager().getMonitoredPort(getServer(), port, "web");
- if (port != 80)
- url += ":" + port;
-
- url += "/"+module.getName();
-
- if (!url.endsWith("/"))
- url += "/";
-
- return new URL(url);
- } catch (Exception e) {
- Trace.trace("Could not get root URL", e);
- return null;
- }
-
- }
-
- /**
- * @return
- */
- private int getHttpPort() {
- int port=-1;
- Iterator pIter = this.getServerDefinition().getPort().iterator();
- while (pIter.hasNext()) {
- Port aPort = (Port) pIter.next();
- if(port== -1)
- port = Integer.parseInt(getServerDefinition().getResolver().resolveProperties(aPort.getNo()));
- else if( "http".equals(aPort.getProtocol() ) )
- port = Integer.parseInt(aPort.getNo());
- }
- if( port == -1)
- port = 8080;
- return port;
- }
-
- public ServerRuntime getServerDefinition() {
- if (fServerDefinition == null)
- fServerDefinition = CorePlugin.getDefault()
- .getServerTypeDefinitionManager()
- .getServerRuntimeDefinition(getRuntimeDelegate().getAttribute(
- GenericServerRuntime.SERVER_DEFINITION_ID,
- ""), getServerInstanceProperties());
- return fServerDefinition;
- }
-
- private RuntimeDelegate getRuntimeDelegate()
- {
- return (RuntimeDelegate)getServer().getRuntime().getAdapter(RuntimeDelegate.class);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerDelegate#modifyModules(org.eclipse.wst.server.core.IModule[], org.eclipse.wst.server.core.IModule[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public void modifyModules(IModule[] add, IModule[] remove, IProgressMonitor monitor) throws CoreException {
- // TODO Auto-generated method stub
-
- }
-
-}
View
384 ...pse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerBehaviour.java
@@ -1,384 +0,0 @@
-package org.eclipse.jst.server.generic.internal.core;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IDebugEventSetListener;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jst.server.generic.core.CorePlugin;
-import org.eclipse.jst.server.generic.core.GenericServerCoreMessages;
-import org.eclipse.jst.server.generic.servertype.definition.ArchiveType;
-import org.eclipse.jst.server.generic.servertype.definition.Classpath;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerPort;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-import org.eclipse.wst.server.core.util.PingThread;
-import org.eclipse.wst.server.core.util.SocketUtil;
-
-/**
- * Server behaviour delegate implementation for generic server.
- *
- * @author Gorkem Ercan
- */
-public class GenericServerBehaviour extends ServerBehaviourDelegate {
-
- private static final String ATTR_STOP = "stop-server";
-
- // the thread used to ping the server to check for startup
- protected transient PingThread ping = null;
- protected transient IDebugEventSetListener processListener;
- protected transient IProcess process;
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerBehaviourDelegate#publishServer(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void publishServer(IProgressMonitor monitor) throws CoreException {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerBehaviourDelegate#publishModule(org.eclipse.wst.server.core.IModule[], org.eclipse.wst.server.core.IModule, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void publishModule(IModule[] parents, IModule module,
- IProgressMonitor monitor) throws CoreException {
- AntPublisher publisher = new AntPublisher(null,module,getServerDefinition());
- publisher.publish(null,monitor);
- setModulePublishState(module,IServer.PUBLISH_STATE_NONE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerBehaviourDelegate#setLaunchDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
- public void setLaunchDefaults(ILaunchConfigurationWorkingCopy workingCopy) {
-
- workingCopy.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
- getStartClassName());
-
- GenericServerRuntime runtime = (GenericServerRuntime) getRuntimeDelegate();
-
- IVMInstall vmInstall = runtime.getVMInstall();
- workingCopy.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, runtime
- .getVMInstallTypeId());
- workingCopy.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME,
- vmInstall.getName());
-
- setupLaunchClasspath(workingCopy, vmInstall, getStartClasspath());
-
-
- workingCopy.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
- getWorkingDirectory());
- workingCopy.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
- getProgramArguments());
- workingCopy.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
- getVmArguments());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerBehaviourDelegate#stop(boolean)
- */
-
-
- public void stop(boolean force) {
- if (force) {
- terminate();
- return;
- }
-
- int state = getServer().getServerState();
- if (state == IServer.STATE_STOPPED)
- return;
- else if (state == IServer.STATE_STARTING || state == IServer.STATE_STOPPING) {
- terminate();
- return;
- }
-
- try {
- Trace.trace(Trace.FINEST, "Stopping Server");
- if (state != IServer.STATE_STOPPED)
- setServerState(IServer.STATE_STOPPING);
- ILaunchManager mgr = DebugPlugin.getDefault().getLaunchManager();
-
- ILaunchConfigurationType type =
- mgr.getLaunchConfigurationType(
- IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
-
- String launchName = "GenericServerStopper";
- String uniqueLaunchName =
- mgr.generateUniqueLaunchConfigurationNameFrom(launchName);
- ILaunchConfiguration conf = null;
-
- ILaunchConfiguration[] lch = mgr.getLaunchConfigurations(type);
- for (int i = 0; i < lch.length; i++) {
- if (launchName.equals(lch[i].getName())) {
- conf = lch[i];
- break;
- }
- }
-
- ILaunchConfigurationWorkingCopy wc = null;
- if (conf != null) {
- wc = conf.getWorkingCopy();
- } else {
- wc = type.newInstance(null, uniqueLaunchName);
- }
- //To stop from appearing in history lists
- wc.setAttribute(IDebugUIConstants.ATTR_PRIVATE, true);
-
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
- getServerDefinition().getResolver().resolveProperties(this.getServerDefinition().getStop().getClass_()));
-
- GenericServerRuntime runtime = (GenericServerRuntime) getRuntimeDelegate();
-
- IVMInstall vmInstall = runtime.getVMInstall();
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, runtime
- .getVMInstallTypeId());
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME,
- vmInstall.getName());
-
- setupLaunchClasspath(wc, vmInstall, getStopClasspath());
-
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
- getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStop().getWorkingDirectory()));
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
- getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStop().getProgramArguments()));
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
- getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStop().getVmParameters()));
- wc.setAttribute(ATTR_STOP, "true");
- wc.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error stopping Server", e);
- }
-
-
- }
-
- public String getStartClassName() {
- return getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStart().getClass_());
- }
-
- public ServerRuntime getServerDefinition() {
- GenericServer server = (GenericServer)getServer().getAdapter(ServerDelegate.class);
- return server.getServerDefinition();
- }
-
- private RuntimeDelegate getRuntimeDelegate()
- {
- return (RuntimeDelegate)getServer().getRuntime().getAdapter(RuntimeDelegate.class);
- }
-
-
-
- private List getStartClasspath() {
- String cpRef = getServerDefinition().getStart().getClasspathReference();
- return serverClasspath(cpRef);
- }
-
- /**
- * @param cpRef
- * @return
- */
- private List serverClasspath(String cpRef) {
- Classpath classpath = getServerDefinition().getClasspath(cpRef);
-
- List mementoList = new ArrayList(classpath.getArchive().size());
- Iterator iterator= classpath.getArchive().iterator();
- while(iterator.hasNext())
- {
- ArchiveType archive = (ArchiveType)iterator.next();
- String cpath = getServerDefinition().getResolver().resolveProperties(archive.getPath());
- try {
- mementoList.add(JavaRuntime.newArchiveRuntimeClasspathEntry(
- new Path(cpath)).getMemento());
- } catch (CoreException e) {
- //ignored
- }
- }
- return mementoList;
- }
-
- /**
- * @param wc
- * @param vmInstall
- */
- private void setupLaunchClasspath(ILaunchConfigurationWorkingCopy wc, IVMInstall vmInstall, List cp) {
- // add tools.jar to the path
- if (vmInstall != null) {
- try {
- cp.add(JavaRuntime
- .newRuntimeContainerClasspathEntry(
- new Path(JavaRuntime.JRE_CONTAINER)
- .append(
- "org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType")
- .append(vmInstall.getName()),
- IRuntimeClasspathEntry.BOOTSTRAP_CLASSES)
- .getMemento());
- } catch (Exception e) {
- }
-
- IPath jrePath = new Path(vmInstall.getInstallLocation()
- .getAbsolutePath());
- if (jrePath != null) {
- IPath toolsPath = jrePath.append("lib").append("tools.jar");
- if (toolsPath.toFile().exists()) {
- try {
- cp.add(JavaRuntime.newArchiveRuntimeClasspathEntry(
- toolsPath).getMemento());
- } catch (CoreException e1) {
-
- }
- }
- }
- }
-
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_CLASSPATH, cp);
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH,
- false);
- }
-
- private String getWorkingDirectory() {
- return getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStart().getWorkingDirectory());
- }
-
- private String getProgramArguments() {
- return getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStart().getProgramArguments());
- }
-
- private String getVmArguments() {
- return getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStart().getVmParameters());
- }
-
- /**
- * Setup for starting the server.
- *
- * @param launch ILaunch
- * @param launchMode String
- * @param monitor IProgressMonitor
- */
- public void setupLaunch(ILaunch launch, String launchMode, IProgressMonitor monitor) throws CoreException {
- if ("true".equals(launch.getLaunchConfiguration().getAttribute(ATTR_STOP, "false")))
- return;
- // IStatus status = getRuntime().validate();
- // if (status != null && !status.isOK())
- // throw new CoreException(status);
-
-
- IServerPort[] ports = getServer().getServerPorts();
- IServerPort sp = null;
- for(int i=0;i<ports.length;i++){
- sp= ports[i];
- if (SocketUtil.isPortInUse(ports[i].getPort(), 5))
- throw new CoreException(new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 0, GenericServerCoreMessages.getFormattedString("errorPortInUse",new String[] {Integer.toString(sp.getPort()),sp.getName()}),null));
- }
-
- setServerState(IServer.STATE_STARTING);
-
- // ping server to check for startup
- try {
- String url = "http://localhost";
- int port = sp.getPort();
- if (port != 80)
- url += ":" + port;
- ping = new PingThread(getServer(),this, url, 50);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Can't ping for server startup.");
- }
- }
-
- public void setProcess(final IProcess newProcess) {
- if (process != null)
- return;
-
- process = newProcess;
- processListener = new IDebugEventSetListener() {
- public void handleDebugEvents(DebugEvent[] events) {
- if (events != null) {
- int size = events.length;
- for (int i = 0; i < size; i++) {
- if (process.equals(events[i].getSource()) && events[i].getKind() == DebugEvent.TERMINATE) {
- DebugPlugin.getDefault().removeDebugEventListener(this);
- stopImpl();
- }
- }
- }
- }
- };
- DebugPlugin.getDefault().addDebugEventListener(processListener);
- }
-
- protected void stopImpl() {
- if (ping != null) {
- ping.stopPinging();
- ping = null;
- }
- if (process != null) {
- process = null;
- DebugPlugin.getDefault().removeDebugEventListener(processListener);
- processListener = null;
- }
- setServerState(IServer.STATE_STOPPED);
- }
-
- /**
- * Terminates the server.
- */
- public void terminate() {
- if (getServer().getServerState() == IServer.STATE_STOPPED)
- return;
-
- try {
- setServerState(IServer.STATE_STOPPING);
- Trace.trace(Trace.FINEST, "Killing the Server process");
- if (process != null && !process.isTerminated()) {
- process.terminate();
- stopImpl();
- }
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error killing the process", e);
- }
- }
-
- private List getStopClasspath() {
- String cpRef = getServerDefinition().getStop().getClasspathReference();
- return serverClasspath(cpRef);
- }
-
-
-}
View
131 ...eric.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerLaunchConfigurationDelegate.java
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.core;
-
-import java.io.File;
-import java.util.Map;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate;
-import org.eclipse.jdt.launching.ExecutionArguments;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.IVMRunner;
-import org.eclipse.jdt.launching.VMRunnerConfiguration;
-import org.eclipse.jst.server.generic.core.CorePlugin;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
-/**
- * ServerLaunchConfiguration for the generic server.
- *
- * @author Gorkem Ercan
- */
-public class GenericServerLaunchConfigurationDelegate extends AbstractJavaLaunchConfigurationDelegate {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void launch(ILaunchConfiguration configuration, String mode,
- ILaunch launch, IProgressMonitor monitor) throws CoreException {
-
- String serverId = configuration.getAttribute(IServer.ATTR_SERVER_ID, (String) null);
-
- IServer server = ServerCore.findServer(serverId);
- if (server == null)
- {
- abort("Server "+serverId+" does not exist", null, IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
- }
-
- GenericServerBehaviour genericServer = (GenericServerBehaviour)server.getAdapter(ServerBehaviourDelegate.class);
- genericServer.setupLaunch(launch, mode, monitor);
-
- String mainTypeName = genericServer.getStartClassName();
-
- IVMInstall vm = verifyVMInstall(configuration);
-
- IVMRunner runner = vm.getVMRunner(mode);
-
- File workingDir = verifyWorkingDirectory(configuration);
- String workingDirName = null;
- if (workingDir != null)
- workingDirName = workingDir.getAbsolutePath();
-
- // Program & VM args
- String pgmArgs = getProgramArguments(configuration);
- String vmArgs = getVMArguments(configuration);
-
- ExecutionArguments execArgs = new ExecutionArguments(vmArgs, pgmArgs);
-
- // VM-specific attributes
- Map vmAttributesMap = getVMSpecificAttributesMap(configuration);
-
- // Classpath
- String[] classpath = getClasspath(configuration);
-
- // Create VM config
- VMRunnerConfiguration runConfig = new VMRunnerConfiguration(mainTypeName, classpath);
- runConfig.setProgramArguments(execArgs.getProgramArgumentsArray());
- runConfig.setVMArguments(execArgs.getVMArgumentsArray());
- runConfig.setWorkingDirectory(workingDirName);
- runConfig.setVMSpecificAttributesMap(vmAttributesMap);
-
- // Bootpath
- String[] bootpath = getBootpath(configuration);
- if (bootpath != null && bootpath.length > 0)
- runConfig.setBootClassPath(bootpath);
-
- setDefaultSourceLocator(launch, configuration);
-
- // Launch the configuration
- runner.run(runConfig, launch, monitor);
- genericServer.setProcess(launch.getProcesses()[0]);
-
- }
-
- /**
- * Throws a core exception with the given message and optional
- * exception. The exception's status code will indicate an error.
- *
- * @param message error message
- * @param exception cause of the error, or <code>null</code>
- * @exception CoreException with the given message and underlying
- * exception
- */
- protected void abort(String message, Throwable exception, int code) throws CoreException {
- throw new CoreException(new Status(IStatus.ERROR, CorePlugin.getDefault().getBundle().getSymbolicName(), code, message, exception));
- }
-
-}
View
90 ...eneric.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerLaunchableAdapterDelegate.java
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.core;
-
-import java.net.URL;
-
-import org.eclipse.wst.server.core.ILaunchable;
-import org.eclipse.wst.server.core.IModuleArtifact;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.model.*;
-import org.eclipse.wst.server.core.util.HttpLaunchable;
-import org.eclipse.jst.server.j2ee.IWebModule;
-import org.eclipse.jst.server.j2ee.Servlet;
-import org.eclipse.jst.server.j2ee.WebResource;
-/**
- * Web Launchable adapter delegate
- * @author Gorkem Ercan
- */
-public class GenericServerLaunchableAdapterDelegate extends LaunchableAdapterDelegate {
- /*
- * @see ILaunchableAdapterDelegate#getLaunchable(IServer, IModuleObject)
- */
- public ILaunchable getLaunchable(IServer server, IModuleArtifact moduleObject) {
-
- ServerDelegate delegate = (ServerDelegate)server.getAdapter(ServerDelegate.class);
- if (!(delegate instanceof GenericServer))
- return null;
- if (!(moduleObject instanceof Servlet) &&
- !(moduleObject instanceof WebResource))
- return null;
- if (moduleObject.getModule().getAdapter(IWebModule.class) == null)
- return null;
-
- try {
- URL url = ((IURLProvider) delegate).getModuleRootURL(moduleObject.getModule());
-
- Trace.trace("root: " + url);
-
- if (moduleObject instanceof Servlet) {
- Servlet servlet = (Servlet) moduleObject;
- if (servlet.getAlias() != null) {
- String path = servlet.getAlias();
- if (path.startsWith("/"))
- path = path.substring(1);
- url = new URL(url, path);
- } else
- url = new URL(url, "servlet/" + servlet.getServletClassName());
- } else if (moduleObject instanceof WebResource) {
- WebResource resource = (WebResource) moduleObject;
- String path = resource.getPath().toString();
- Trace.trace("path: " + path);
- if (path != null && path.startsWith("/") && path.length() > 0)
- path = path.substring(1);
- if (path != null && path.length() > 0)
- url = new URL(url, path);
- }
- return new HttpLaunchable(url);
- } catch (Exception e) {
- Trace.trace("Error getting URL for " + moduleObject, e);
- return null;
- }
- }
-}
View
126 ...lipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerRuntime.java
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.core;
-
-import java.io.File;
-import java.util.Iterator;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jst.server.core.IGenericRuntime;
-import org.eclipse.jst.server.generic.core.CorePlugin;
-import org.eclipse.jst.server.generic.core.GenericServerCoreMessages;
-import org.eclipse.jst.server.generic.servertype.definition.ArchiveType;
-import org.eclipse.jst.server.generic.servertype.definition.Classpath;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-/**
- * Generic server runtime support.
- *
- * @author Gorkem Ercan
- */
-public class GenericServerRuntime extends RuntimeDelegate implements IGenericRuntime
-{
-
- public static final String SERVER_DEFINITION_ID = "server_definition_id";
- public static final String SERVER_INSTANCE_PROPERTIES = "generic_server_instance_properties";
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.core.IGenericRuntime#getVMInstallTypeId()
- */
- public String getVMInstallTypeId() {
- return JavaRuntime.getDefaultVMInstall().getVMInstallType().getId();
- // TODO configurable.
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.core.IGenericRuntime#getVMInstallId()
- */
- public String getVMInstallId() {
- return JavaRuntime.getDefaultVMInstall().getId();
- // TODO configurable.
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.core.IGenericRuntime#getVMInstall()
- */
- public IVMInstall getVMInstall() {
- return JavaRuntime.getDefaultVMInstall();
- // TODO configurable
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.core.IGenericRuntime#validate()
- */
- public IStatus validate() {
- if (getVMInstall() == null)
- return new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 0, GenericServerCoreMessages.getString("errorJRE"), null);
-
- ServerRuntime serverTypeDefinition = getServerTypeDefinition();
- if(serverTypeDefinition == null)
- return new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 0, GenericServerCoreMessages.getString("errorNoServerType"), null);
- if(serverTypeDefinition.getClasspath()== null || serverTypeDefinition.getClasspath().size()<1)
- return new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 0 ,GenericServerCoreMessages.getString("errorNoClasspath"),null);
- Iterator cpList = serverTypeDefinition.getClasspath().iterator();
- while (cpList.hasNext()) {
- Classpath cpth = (Classpath) cpList.next();
- if(cpth.getArchive()== null || cpth.getArchive().size()<1)
- return new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 0 ,GenericServerCoreMessages.getString("errorNoClasspath"),null);
- Iterator archIter = cpth.getArchive().iterator();
- while (archIter.hasNext()) {
- ArchiveType arch = (ArchiveType) archIter.next();
- String arcPath = serverTypeDefinition.getResolver().resolveProperties(arch.getPath());
- File f = new File(arcPath);
- if(f.exists()==false)
- return new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 0 ,GenericServerCoreMessages.getFormattedString("errorMissingClasspathEntry",new String[]{f.getPath()} ),null);
- }
-
- }
- return new Status(IStatus.OK, CorePlugin.PLUGIN_ID, 0, "", null);
- }
- /**
- * Returns the ServerTypeDefinition for this runtime.
- * Populated with the user properties if exists.
- *
- * @return populated ServerTypeDefinition
- */
- public ServerRuntime getServerTypeDefinition()
- {
- String id= getAttribute(SERVER_DEFINITION_ID,(String)null);
- Map properties = getAttribute(SERVER_INSTANCE_PROPERTIES,(Map)null);
- if(id==null)
- return null;
- return CorePlugin.getDefault().getServerTypeDefinitionManager().getServerRuntimeDefinition(id,properties);
- }
-
-}
View
89 ...ver.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerRuntimeTargetHandler.java
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.core;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jst.server.core.ClasspathRuntimeTargetHandler;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-/**
- * Provides the Classpath containers to be added into project classpaths.
- *
- * @author Gorkem Ercan
- */
-public class GenericServerRuntimeTargetHandler extends
- ClasspathRuntimeTargetHandler {
-
- /* (non-Javadoc)
- * @see com.ibm.wtp.server.java.core.ClasspathRuntimeTargetHandler#getId()
- */
- public String getId() {
- return "org.eclipse.jst.server.generic.runtimeTarget";
- }
-
- /* (non-Javadoc)
- * @see com.ibm.wtp.server.java.core.ClasspathRuntimeTargetHandler#getClasspathContainerLabel(com.ibm.wtp.server.core.IRuntime, java.lang.String)
- */
- public String getClasspathContainerLabel(IRuntime runtime, String id) {
- ServerRuntime definition= ServerTypeDefinitionUtil.getServerTypeDefinition(runtime);
- return definition.getName();
- }
-
- /* (non-Javadoc)
- * @see com.ibm.wtp.server.java.core.ClasspathRuntimeTargetHandler#resolveClasspathContainer(com.ibm.wtp.server.core.IRuntime, java.lang.String)
- */
- public IClasspathEntry[] resolveClasspathContainer(IRuntime runtime,
- String id)
- {
- return ServerTypeDefinitionUtil.getServerClassPathEntry(runtime);
- }
-
- public String[] getClasspathEntryIds(IRuntime runtime) {
- // Values do not realy have any use but the number of entries give the number of
- // containers you have.
- return new String[1];
- }
-
- public IClasspathEntry[] getDelegateClasspathEntries(IRuntime runtime) {
- GenericServerRuntime genericRuntime = (GenericServerRuntime)runtime.getAdapter(ServerDelegate.class);
- IVMInstall vmInstall = genericRuntime.getVMInstall();
- if (vmInstall != null) {
- String name = vmInstall.getName();
- return new IClasspathEntry[] { JavaCore.newContainerEntry(new Path(JavaRuntime.JRE_CONTAINER).append("org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType").append(name)) };
- }
- return null;
- }
-}
View
82 ...neric.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerSourcePathComputerDelegate.java
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.core;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.sourcelookup.ISourceContainer;
-import org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.internal.launching.JavaSourceLookupUtil;
-import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
-import org.eclipse.jdt.launching.JavaRuntime;
-/**
- * SourcePathComputer for the GenericLaunchConfiguration.
- *
- * @author Gorkem Ercan
- */
-public class GenericServerSourcePathComputerDelegate implements ISourcePathComputerDelegate {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate#computeSourceContainers(org.eclipse.debug.core.ILaunchConfiguration, org.eclipse.core.runtime.IProgressMonitor)
- */
- public ISourceContainer[] computeSourceContainers(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
-
- IRuntimeClasspathEntry[] unresolvedEntries = JavaRuntime.computeUnresolvedSourceLookupPath(configuration);
- // FIXME have only the projects of registered modules.
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- List javaProjectList = new ArrayList();
- for(int i = 0; i<projects.length;i++)
- {
- if(projects[i].hasNature(JavaCore.NATURE_ID))
- {
- IJavaProject javaProject = (IJavaProject) projects[i].getNature(JavaCore.NATURE_ID);
- javaProjectList.add(javaProject);
- }
- }
- IRuntimeClasspathEntry[] projectEntries = new IRuntimeClasspathEntry[javaProjectList.size()];
- for (int i = 0; i < javaProjectList.size(); i++) {
- projectEntries[i] = JavaRuntime.newProjectRuntimeClasspathEntry((IJavaProject)javaProjectList.get(i));
- }
- IRuntimeClasspathEntry[] entries = new IRuntimeClasspathEntry[projectEntries.length+unresolvedEntries.length];
- System.arraycopy(unresolvedEntries,0,entries,0,unresolvedEntries.length);
- System.arraycopy(projectEntries,0,entries,unresolvedEntries.length,projectEntries.length);
-
- IRuntimeClasspathEntry[] resolved = JavaRuntime.resolveSourceLookupPath(entries, configuration);
- return JavaSourceLookupUtil.translate(resolved, true);
- }}
View
68 ...st.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/ServerTypeDefinitionManager.java
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved.   This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/