Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 163066e1f56c2bc9edc0df8b836875d7d0ef80e8 1 parent 089e29a
ndai authored
Showing with 0 additions and 28,914 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 −4 plugins/org.eclipse.jst.server.generic.core/.options
  4. +0 −28 plugins/org.eclipse.jst.server.generic.core/.project
  5. +0 −32 plugins/org.eclipse.jst.server.generic.core/META-INF/MANIFEST.MF
  6. +0 −22 plugins/org.eclipse.jst.server.generic.core/about.html
  7. +0 −13 plugins/org.eclipse.jst.server.generic.core/build.properties
  8. +0 −10 plugins/org.eclipse.jst.server.generic.core/plugin.properties
  9. +0 −43 plugins/org.eclipse.jst.server.generic.core/plugin.xml
  10. +0 −109 plugins/org.eclipse.jst.server.generic.core/schema/genericpublisher.exsd
  11. +0 −114 plugins/org.eclipse.jst.server.generic.core/schema/serverdefinition.exsd
  12. +0 −356 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/AntPublisher.java
  13. +0 −102 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/CorePlugin.java
  14. +0 −197 ...rver.generic.core/src/org/eclipse/jst/server/generic/core/internal/ExternalLaunchConfigurationDelegate.java
  15. +0 −267 ...lipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/ExternalServerBehaviour.java
  16. +0 −61 .../org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericPublisher.java
  17. +0 −356 ...ins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServer.java
  18. +0 −508 ...clipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerBehaviour.java
  19. +0 −36 ...pse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerCoreMessages.java
  20. +0 −18 ...t.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerCoreMessages.properties
  21. +0 −133 ...generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerLaunchConfigurationDelegate.java
  22. +0 −129 ...r.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerLaunchableAdapterDelegate.java
  23. +0 −187 ....eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerRuntime.java
  24. +0 −80 ...server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerRuntimeTargetHandler.java
  25. +0 −109 ....generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerSourcePathComputerDelegate.java
  26. +0 −135 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/PingThread.java
  27. +0 −35 ...ns/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/PublishManager.java
  28. +0 −78 ...e.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/ServerTypeDefinitionManager.java
  29. +0 −89 ...ipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/ServerTypeDefinitionUtil.java
  30. +0 −73 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/Trace.java
  31. +0 −45 ...lipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/util/ExtensionPointUtil.java
  32. +0 −89 ...ins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/util/FileUtil.java
  33. +0 −1,590 ...erver.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/ServerTypePackage.java
  34. +0 −191 ...er.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ArchiveTypeImpl.java
  35. +0 −217 ...r.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ArgumentPairImpl.java
  36. +0 −273 ...rver.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ClasspathImpl.java
  37. +0 −218 ...erver.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ExternalImpl.java
  38. +0 −304 ...generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/JndiConnectionImpl.java
  39. +0 −660 ...ic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/LaunchConfigurationImpl.java
  40. +0 −299 ....server.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ModuleImpl.java
  41. +0 −299 ...st.server.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/PortImpl.java
  42. +0 −191 ...server.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ProjectImpl.java
  43. +0 −417 ...erver.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/PropertyImpl.java
  44. +0 −219 ....generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/PublisherDataImpl.java
  45. +0 −271 ...rver.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/PublisherImpl.java
  46. +0 −969 ....generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ServerRuntimeImpl.java
  47. +0 −234 ...eric.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ServerTypeFactoryImpl.java
  48. +0 −1,608 ...eric.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/impl/ServerTypePackageImpl.java
  49. +0 −351 ...c.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/util/ServerTypeAdapterFactory.java
  50. +0 −76 ...e/src/org/eclipse/jst/server/generic/internal/servertype/definition/util/ServerTypeResourceFactoryImpl.java
  51. +0 −58 ...ric.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/util/ServerTypeResourceImpl.java
  52. +0 −409 ...r.generic.core/src/org/eclipse/jst/server/generic/internal/servertype/definition/util/ServerTypeSwitch.java
  53. +0 −176 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/xml/Resolver.java
  54. +0 −157 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/xml/XMLUtils.java
  55. +0 −93 ...g.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ArchiveType.java
  56. +0 −83 ....eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ArgumentPair.java
  57. +0 −156 ...org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Classpath.java
  58. +0 −83 .../org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/External.java
  59. +0 −133 ...clipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/JndiConnection.java
  60. +0 −321 ...e.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/LaunchConfiguration.java
  61. +0 −139 ...ns/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Module.java
  62. +0 −139 plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Port.java
  63. +0 −91 ...s/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Project.java
  64. +0 −195 .../org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Property.java
  65. +0 −131 ...org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Publisher.java
  66. +0 −89 ...eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/PublisherData.java
  67. +0 −463 ...eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ServerRuntime.java
  68. +0 −181 ...pse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ServerTypeFactory.java
  69. +0 −153 plugins/org.eclipse.jst.server.generic.core/xsd/ServerTypeDefinitionSchema.xsd
  70. +0 −501 plugins/org.eclipse.jst.server.generic.core/xsd/org.eclipse.jst.server.generic.servertype.ecore
  71. +0 −97 plugins/org.eclipse.jst.server.generic.core/xsd/servertype.genmodel
  72. +0 −132 plugins/org.eclipse.jst.server.generic.core/xsd/servertype.xsd2ecore
  73. +0 −5 plugins/org.eclipse.jst.server.generic.modules/.cvsignore
  74. +0 −28 plugins/org.eclipse.jst.server.generic.modules/.project
  75. +0 −7 plugins/org.eclipse.jst.server.generic.ui/.classpath
  76. +0 −5 plugins/org.eclipse.jst.server.generic.ui/.cvsignore
  77. +0 −28 plugins/org.eclipse.jst.server.generic.ui/.project
  78. +0 −18 plugins/org.eclipse.jst.server.generic.ui/META-INF/MANIFEST.MF
  79. +0 −22 plugins/org.eclipse.jst.server.generic.ui/about.html
  80. +0 −9 plugins/org.eclipse.jst.server.generic.ui/build.properties
  81. BIN  plugins/org.eclipse.jst.server.generic.ui/icons/obj16/server.gif
  82. BIN  plugins/org.eclipse.jst.server.generic.ui/icons/wizban/new_server_wiz.gif
  83. +0 −4 plugins/org.eclipse.jst.server.generic.ui/plugin.properties
  84. +0 −30 plugins/org.eclipse.jst.server.generic.ui/plugin.xml
  85. +0 −94 ...st.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/GenericLaunchConfigurationTabGroup.java
  86. +0 −25 ...rg.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/GenericServerComposite.java
  87. +0 −22 ...e.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/GenericServerCompositeDecorator.java
  88. +0 −171 ...st.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/GenericServerRuntimeWizardFragment.java
  89. +0 −29 ...g.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/GenericServerUIMessages.java
  90. +0 −11 ...pse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/GenericServerUIMessages.properties
  91. +0 −163 ...lipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/GenericServerWizardFragment.java
  92. +0 −114 plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/GenericUiPlugin.java
  93. +0 −131 ...ns/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/JRESelectDecorator.java
  94. +0 −89 plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/SWTUtil.java
  95. +0 −74 ...rver.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/ServerDefinitionTypeAwareWizardFragment.java
  96. +0 −295 ...pse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/ServerTypeDefinitionDecorator.java
  97. +0 −44 ....server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/ServerTypeDefinitionRuntimeDecorator.java
  98. +0 −70 ...t.server.generic.ui/src/org/eclipse/jst/server/generic/ui/internal/ServerTypeDefinitionServerDecorator.java
  99. +0 −7 plugins/org.eclipse.jst.server.pde/.classpath
  100. +0 −2  plugins/org.eclipse.jst.server.pde/.cvsignore
  101. +0 −28 plugins/org.eclipse.jst.server.pde/.project
  102. +0 −13 plugins/org.eclipse.jst.server.pde/META-INF/MANIFEST.MF
  103. +0 −22 plugins/org.eclipse.jst.server.pde/about.html
  104. +0 −10 plugins/org.eclipse.jst.server.pde/build.properties
  105. +0 −266 plugins/org.eclipse.jst.server.pde/build.xml
  106. BIN  plugins/org.eclipse.jst.server.pde/icons/obj16/wiz_new_server_plugin.gif
  107. +0 −15 plugins/org.eclipse.jst.server.pde/plugin.properties
  108. +0 −22 plugins/org.eclipse.jst.server.pde/plugin.xml
  109. +0 −54 plugins/org.eclipse.jst.server.pde/src/org/eclipse/jst/server/generic/pde/ServerPdePlugin.java
  110. +0 −22 ...rg.eclipse.jst.server.pde/src/org/eclipse/jst/server/generic/pde/internal/GenericServerPluginNewWizard.java
  111. +0 −276 plugins/org.eclipse.jst.server.pde/src/org/eclipse/jst/server/generic/pde/internal/GenericServerTemplate.java
  112. +0 −35 plugins/org.eclipse.jst.server.pde/src/org/eclipse/jst/server/generic/pde/internal/Messages.java
  113. +0 −10 plugins/org.eclipse.jst.server.pde/src/org/eclipse/jst/server/generic/pde/internal/messages.properties
  114. +0 −41 plugins/org.eclipse.jst.server.pde/templates_3.0/genericserver/buildfiles/$server_name$.xml
  115. BIN  plugins/org.eclipse.jst.server.pde/templates_3.0/genericserver/icons/server.gif
  116. +0 −142 plugins/org.eclipse.jst.server.pde/templates_3.0/genericserver/servers/$server_name$.serverdef
  117. +0 −7 plugins/org.eclipse.jst.server.tomcat.core/.classpath
  118. +0 −6 plugins/org.eclipse.jst.server.tomcat.core/.cvsignore
  119. +0 −4 plugins/org.eclipse.jst.server.tomcat.core/.options
  120. +0 −28 plugins/org.eclipse.jst.server.tomcat.core/.project
  121. +0 −22 plugins/org.eclipse.jst.server.tomcat.core/META-INF/MANIFEST.MF
  122. +0 −22 plugins/org.eclipse.jst.server.tomcat.core/about.html
  123. +0 −22 plugins/org.eclipse.jst.server.tomcat.core/build.properties
  124. +0 −54 plugins/org.eclipse.jst.server.tomcat.core/plugin.properties
  125. +0 −201 plugins/org.eclipse.jst.server.tomcat.core/plugin.xml
  126. +0 −30 ...rg.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ClassDetector.java
  127. +0 −56 ...t.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ContextPublishTaskDelegate.java
  128. +0 −248 ...ins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/FileUtil.java
  129. +0 −29 ...org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/IMimeMapping.java
  130. +0 −38 ...pse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ITomcatConfiguration.java
  131. +0 −69 ...ver.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ITomcatConfigurationWorkingCopy.java
  132. +0 −35 ...g.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ITomcatRuntime.java
  133. +0 −25 ...st.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ITomcatRuntimeWorkingCopy.java
  134. +0 −26 ...rg.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ITomcatServer.java
  135. +0 −46 ...e.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ITomcatServerBehaviour.java
  136. +0 −22 ...jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ITomcatServerWorkingCopy.java
  137. +0 −60 ...se.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ITomcatVersionHandler.java
  138. +0 −43 ...eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ITomcatWebModule.java
  139. +0 −93 ...ins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Messages.java
  140. +0 −100 ...g.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Messages.properties
  141. +0 −47 .../org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/MimeMapping.java
  142. +0 −125 ...s/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/PingThread.java
  143. +0 −69 ...org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ProgressUtil.java
  144. +0 −69 ...clipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/PublishOperation2.java
  145. +0 −40 .../org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/PublishTask.java
  146. +0 −575 ...se.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32Configuration.java
  147. +0 −109 ....eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32Handler.java
  148. +0 −581 ...se.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Configuration.java
  149. +0 −120 ....eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Handler.java
  150. +0 −718 ...se.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Configuration.java
  151. +0 −118 ....eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Handler.java
  152. +0 −795 ...se.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Configuration.java
  153. +0 −118 ....eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Handler.java
  154. +0 −695 ...se.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55Configuration.java
  155. +0 −42 ....eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55Handler.java
  156. +0 −324 ...ipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatConfiguration.java
  157. +0 −81 ...r.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatLaunchConfigurationDelegate.java
  158. +0 −68 ...ver.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatLaunchableAdapterDelegate.java
  159. +0 −293 ...org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatPlugin.java
  160. +0 −234 ...rg.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntime.java
  161. +0 −117 ...pse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntimeLocator.java
  162. +0 −85 ...t.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatRuntimeTargetHandler.java
  163. +0 −348 ...org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServer.java
  164. +0 −701 ...se.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerBehaviour.java
  165. +0 −37 ...ipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerLocator.java
  166. +0 −86 ...eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerUtil.java
  167. +0 −101 ...er.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatSourcePathComputerDelegate.java
  168. +0 −98 plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Trace.java
  169. +0 −164 ...g.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/WebAppDocument.java
  170. +0 −89 ...ns/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/WebModule.java
  171. +0 −46 ...erver.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/AddMimeMappingCommand.java
  172. +0 −48 ....server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/AddWebModuleCommand.java
  173. +0 −53 ...server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ConfigurationCommand.java
  174. +0 −73 ...er.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/FixModuleContextRootTask.java
  175. +0 −51 ...er.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ModifyMimeMappingCommand.java
  176. +0 −61 ...st.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ModifyPortCommand.java
  177. +0 −44 ...rver.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ModifyWebModuleCommand.java
  178. +0 −48 ...er.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/RemoveMimeMappingCommand.java
  179. +0 −48 ...rver.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/RemoveWebModuleCommand.java
  180. +0 −54 ...se.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/ServerCommand.java
  181. +0 −47 ....server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetDebugModeCommand.java
  182. +0 −47 ...jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetSecureCommand.java
  183. +0 −47 ...r.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetTestEnvironmentCommand.java
  184. +0 −55 ...ver.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/command/SetWebModulePathCommand.java
  185. +0 −128 .../org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/Factory.java
  186. +0 −232 ...g.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/XMLElement.java
  187. +0 −390 .../org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/XMLUtil.java
  188. +0 −37 ...e.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Connector.java
  189. +0 −77 ...pse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Context.java
  190. +0 −77 ....server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/ContextManager.java
  191. +0 −37 ...e.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Parameter.java
  192. +0 −37 ...ipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server32/Server.java
  193. +0 −85 ...e.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Connector.java
  194. +0 −61 ...pse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Context.java
  195. +0 −65 ...ipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Engine.java
  196. +0 −53 ...clipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Host.java
  197. +0 −37 ...se.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Listener.java
  198. +0 −69 ...ipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Server.java
  199. +0 −41 ...pse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/xml/server40/Service.java
  200. +0 −18 plugins/org.eclipse.jst.server.tomcat.core/verifyInstall.properties
  201. +0 −7 plugins/org.eclipse.jst.server.tomcat.ui/.classpath
  202. +0 −6 plugins/org.eclipse.jst.server.tomcat.ui/.cvsignore
  203. +0 −4 plugins/org.eclipse.jst.server.tomcat.ui/.options
  204. +0 −28 plugins/org.eclipse.jst.server.tomcat.ui/.project
  205. +0 −23 plugins/org.eclipse.jst.server.tomcat.ui/META-INF/MANIFEST.MF
  206. +0 −22 plugins/org.eclipse.jst.server.tomcat.ui/about.html
  207. +0 −20 plugins/org.eclipse.jst.server.tomcat.ui/build.properties
  208. BIN  plugins/org.eclipse.jst.server.tomcat.ui/icons/obj16/mime_extension.gif
  209. BIN  plugins/org.eclipse.jst.server.tomcat.ui/icons/obj16/mime_mapping.gif
  210. BIN  plugins/org.eclipse.jst.server.tomcat.ui/icons/obj16/port.gif
  211. BIN  plugins/org.eclipse.jst.server.tomcat.ui/icons/obj16/project_missing.gif
  212. BIN  plugins/org.eclipse.jst.server.tomcat.ui/icons/obj16/tomcat.gif
  213. BIN  plugins/org.eclipse.jst.server.tomcat.ui/icons/obj16/web_module.gif
  214. BIN  plugins/org.eclipse.jst.server.tomcat.ui/icons/wizban/tomcat_wiz.gif
  215. +0 −14 plugins/org.eclipse.jst.server.tomcat.ui/plugin.properties
Sorry, we could not display the entire diff because too many files (803) changed.
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.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <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
4 plugins/org.eclipse.jst.server.generic.core/.options
@@ -1,4 +0,0 @@
-# Debugging options for the org.eclipse.jst.server.tomcat.core plugin
-
-# Turn on general debugging
-org.eclipse.jst.server.generic.core/debug=true
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
32 plugins/org.eclipse.jst.server.generic.core/META-INF/MANIFEST.MF
@@ -1,32 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.jst.server.generic.core; singleton:=true
-Bundle-Version: 0.7.0
-Bundle-ClassPath: genericserver.jar
-Bundle-Activator: org.eclipse.jst.server.generic.core.internal.CorePlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.jst.server.generic.core.internal,
- org.eclipse.jst.server.generic.internal.core.util,
- org.eclipse.jst.server.generic.internal.servertype.definition,
- org.eclipse.jst.server.generic.internal.servertype.definition.impl,
- org.eclipse.jst.server.generic.internal.servertype.definition.util,
- org.eclipse.jst.server.generic.internal.xml,
- org.eclipse.jst.server.generic.servertype.definition
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.debug.core,
- org.eclipse.jdt.core,
- org.eclipse.jdt.launching;visibility:=reexport,
- org.eclipse.wst.server.core,
- org.eclipse.jst.server.core,
- org.eclipse.debug.ui,
- org.eclipse.ant.ui,
- org.eclipse.emf.common;visibility:=reexport,
- org.eclipse.emf.ecore,
- org.eclipse.emf.ecore.xmi,
- org.eclipse.ui.externaltools,
- org.apache.ant
-Eclipse-AutoStart: true
View
22 plugins/org.eclipse.jst.server.generic.core/about.html
@@ -1,22 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>February 24, 2005</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content.</p>
-
-</body>
-</html>
View
13 plugins/org.eclipse.jst.server.generic.core/build.properties
@@ -1,13 +0,0 @@
-source.genericserver.jar = src/
-output.genericserver.jar = bin/
-bin.includes = genericserver.jar,\
- servers/,\
- xsd/ServerTypeDefinitionSchema.xsd,\
- META-INF/,\
- plugin.xml,\
- plugin.properties,\
- about.html
-src.includes = servers/,\
- xsd/,\
- schema/,\
- build.properties
View
10 plugins/org.eclipse.jst.server.generic.core/plugin.properties
@@ -1,10 +0,0 @@
-pluginName= Generic Server Plugin
-providerName=Eclipse.org
-pluginDescription=Provides generic server tools with easy to develop meta data configuration files
-
-externalLaunchConfigurationTypeName=Generic Server
-launchConfigurationTypeName=Generic Server
-extensionPointServerdefinition=Server definition
-extensionPointGenericpublisher=Generic Publisher
-# ====================================================================
-
View
43 plugins/org.eclipse.jst.server.generic.core/plugin.xml
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension-point id="serverdefinition" name="%extensionPointServerdefinition" schema="schema/serverdefinition.exsd"/>
- <extension-point id="genericpublisher" name="%extensionPointGenericpublisher" schema="schema/genericpublisher.exsd"/>
-
- <extension point="org.eclipse.debug.core.launchConfigurationTypes">
- <launchConfigurationType
- id="org.eclipse.jst.server.generic.core.launchConfigurationType"
- name="%launchConfigurationTypeName"
- delegate="org.eclipse.jst.server.generic.core.internal.GenericServerLaunchConfigurationDelegate"
- modes="run, debug"
- sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
- sourcePathComputerId="org.eclipse.jst.server.generic.core.sourcePathComputer"/>
- <launchConfigurationType
- id="org.eclipse.jst.server.generic.core.ExternalLaunchConfigurationType"
- name="%externalLaunchConfigurationTypeName"
- delegate="org.eclipse.jst.server.generic.core.internal.ExternalLaunchConfigurationDelegate"
- 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.core.internal.GenericServerSourcePathComputerDelegate"/>
- </extension>
-
- <extension point="org.eclipse.wst.server.core.launchableAdapters">
- <launchableAdapter
- class="org.eclipse.jst.server.generic.core.internal.GenericServerLaunchableAdapterDelegate"
- id="org.eclipse.jst.server.generic.web"/>
- </extension>
-
- <extension point="org.eclipse.jst.server.generic.core.genericpublisher">
- <genericpublisher
- class="org.eclipse.jst.server.generic.core.internal.AntPublisher"
- id="org.eclipse.jst.server.generic.antpublisher"/>
- </extension>
-
-</plugin>
View
109 plugins/org.eclipse.jst.server.generic.core/schema/genericpublisher.exsd
@@ -1,109 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.jst.server.generic.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.jst.server.generic.core" id="genericpublisher" name="Generic Publisher"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="genericpublisher"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="genericpublisher">
- <complexType>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
View
114 plugins/org.eclipse.jst.server.generic.core/schema/serverdefinition.exsd
@@ -1,114 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.jst.server.generic.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.jst.server.generic.core" id="serverdefinition" name="Server Definition"/>
- </appInfo>
- <documentation>
- This extension point defines a new generic server plugin
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="serverdefinition" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="serverdefinition">
- <complexType>
- <sequence>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- server id
- </documentation>
- </annotation>
- </attribute>
- <attribute name="definitionfile" type="string" use="required">
- <annotation>
- <documentation>
- location of the generic server definition file
- </documentation>
- <appInfo>
- <meta.attribute kind="resource"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 1.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
View
356 ...s/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/AntPublisher.java
@@ -1,356 +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.core.internal;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-import org.eclipse.ant.internal.ui.IAntUIConstants;
-import org.eclipse.ant.internal.ui.launchConfigurations.IAntLaunchConfigurationConstants;
-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.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-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.ui.IDebugUIConstants;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jst.server.generic.internal.core.util.FileUtil;
-import org.eclipse.jst.server.generic.servertype.definition.Module;
-import org.eclipse.jst.server.generic.servertype.definition.PublisherData;
-import org.eclipse.jst.server.core.IEJBModule;
-import org.eclipse.jst.server.core.IEnterpriseApplication;
-import org.eclipse.jst.server.core.IJ2EEModule;
-import org.eclipse.jst.server.core.IWebModule;
-import org.eclipse.jst.server.core.PublishUtil;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IModuleArtifact;
-import org.eclipse.wst.server.core.util.ProjectModule;
-import org.osgi.framework.Bundle;
-/**
- * Ant based publisher.
- * All the properties defined in the server definition file are
- * passed into the ANT build file as properties.
- * In addition to the properties defined in the server definition
- * <I>module.dir</I>, <I>module.name,</I> and <I>server.publish.dir</I> are computed and passed to the
- * definition file.
- * <ul>
- * <li>module.dir: includes the root of the module project file</li>
- * <li>module.name: the name of the module</li>
- * <li>server.publish.dir: the directory to put the deployment units</li>
- * <li>project.working.dir: the working dir of the project that deployed module is in</li>
- * </ul>
- *
- * @author Gorkem Ercan
- */
-
-public class AntPublisher extends GenericPublisher{
- private static final String JAR_PROTOCOL_PREFIX = "jar";
-
- /**
- * publisher id for ANT publisher.
- */
- public static final String PUBLISHER_ID="org.eclipse.jst.server.generic.antpublisher"; //$NON-NLS-1$
-
- private static final String PROP_SERVER_PUBLISH_DIR = "server.publish.dir";//$NON-NLS-1$
- private static final String PROP_PROJECT_WORKING_DIR= "project.working.dir";//$NON-NLS-1$
- private static final String PROP_MODULE_DIR = "module.dir";//$NON-NLS-1$
- private static final String PROP_MODULE_NAME = "module.name";//$NON-NLS-1$
- private static final String MODULE_PUBLISH_TARGET_PREFIX = "target.publish."; //$NON-NLS-1$
- private static final String MODULE_UNPUBLISH_TARGET_PREFIX = "target.unpublish.";//$NON-NLS-1$
- private static final String DATA_NAME_BUILD_FILE="build.file";//$NON-NLS-1$
-
-
- /* (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){
- if(getModule().length>1)// only respond to root module calls.
- return null;
- try{
- assembleModule(monitor);
- File file = computeBuildFile();
- runAnt(file.toString(),getPublishTargetsForModule(),getPublishProperties(),monitor);
- }catch(CoreException e){
- IStatus s = new Status(IStatus.ERROR,CorePlugin.PLUGIN_ID,0,GenericServerCoreMessages.errorPublishAntpublisher,e);
- CorePlugin.getDefault().getLog().log(s);
- return new IStatus[] {s};
- }
- return null;
- }
-
- private void assembleModule(IProgressMonitor monitor)throws CoreException{
- copyModule(getModule()[0],monitor);
- IEnterpriseApplication earModule = (IEnterpriseApplication)getModule()[0].loadAdapter(IEnterpriseApplication.class,null);
- if(earModule!=null && earModule.getModules().length>0){
- IModule[] childModules = earModule.getModules();
- for (int i = 0; i < childModules.length; i++) {
- IModule module = childModules[i];
- IPath modulePath = copyModule(module, monitor);
-// PublishUtil.copyFile(packModule(modulePath), getModuleWorkingDir().toString());
- }
- }
-
- }
-
- private InputStream packModule(IPath modulePath) {
- // TODO Auto-generated method stub
- return null;
- }
-
- private IPath copyModule(IModule module,IProgressMonitor monitor)throws CoreException{
- ProjectModule pm =(ProjectModule)getModule()[0].loadAdapter(ProjectModule.class, monitor);
- IPath to = getProjectWorkingLocation().append(pm.getId());
- PublishUtil.smartCopy(pm.members(), to, monitor);
- return to;
- }
-
-
- /**
- *
- * @return
- * @throws CoreException
- */
- private File computeBuildFile() throws CoreException {
- Bundle bundle = Platform.getBundle(getServerRuntime().getServerTypeDefinition().getConfigurationElementNamespace());
- URL bundleUrl =bundle.getEntry(getBuildFile());
- URL fileURL = FileUtil.resolveURL(bundleUrl);
- if(fileURL.getProtocol().equals(JAR_PROTOCOL_PREFIX)){
- OutputStream os=null;
- InputStream is=null;
- try{
- String filename =fileURL.getPath();
- String jarname= fileURL.getFile().substring(0,filename.indexOf('!'));
-
- File jarFile = new File(new URL(jarname).getFile());
- JarFile jar = new JarFile(jarFile);
- File tmpFile = FileUtil.createTempFile(getBuildFile(),CorePlugin.getDefault().getStateLocation().toOSString());
- os = new FileOutputStream(tmpFile);
- String entryname= getBuildFile();
- if (entryname.startsWith("/"))//$NON-NLS-1$
- entryname= entryname.substring(1);
- JarEntry entry = jar.getJarEntry(entryname);
- is =jar.getInputStream(entry);
- FileUtil.copy(is,os);
- return tmpFile;
- }
- catch (IOException e) {
- IStatus s = new Status(IStatus.ERROR,CorePlugin.PLUGIN_ID,0,"error creating temporary build file",e);//$NON-NLS-1$
- CorePlugin.getDefault().getLog().log(s);
- throw new CoreException(s);
- }
- finally{
- try {
- if(is!=null)
- is.close();
- if(os!=null)
- os.close();
- } catch (IOException e) {
- //ignore
- }
- }
- }
- else{
- return FileUtil.resolveFile(fileURL);
- }
- }
-
- /**
- * @return
- */
- private String getPublishTargetsForModule() {
- return doGetTargets(MODULE_PUBLISH_TARGET_PREFIX+getModuleTypeId());
- }
-
- /**
- * @return
- */
- private String getUnpublishTargetsForModule() {
- return doGetTargets(MODULE_UNPUBLISH_TARGET_PREFIX+getModuleTypeId());
- }
-
- /**
- * @param dataname
- * @return
- */
- private String doGetTargets(String dataname) {
- StringBuffer buffer = new StringBuffer();
- Iterator iterator = getServerRuntime().getServerTypeDefinition().getPublisher(PUBLISHER_ID).getPublisherdata().iterator();
- while(iterator.hasNext()){
- PublisherData data = (PublisherData)iterator.next();
- if(dataname.equals(data.getDataname())) {
- if(buffer.length()>0)
- buffer.append(",");//$NON-NLS-1$
- buffer.append(data.getDatavalue());
- }
- }
- return buffer.toString();
- }
-
- private String getModuleTypeId(){
- return getModule()[0].getModuleType().getId();
- }
-
- private String getBuildFile()
- {
- Iterator iterator = getServerRuntime().getServerTypeDefinition().getPublisher(PUBLISHER_ID).getPublisherdata().iterator();
- while(iterator.hasNext())
- {
- PublisherData data = (PublisherData)iterator.next();
- if(DATA_NAME_BUILD_FILE.equals(data.getDataname()))
- return getServerRuntime().getServerTypeDefinition().getResolver().resolveProperties(data.getDatavalue());
- }
- return null;
- }
-
- private Map getPublishProperties()
- {
- Map props = new HashMap();
- // pass all properties to build file.
- Map serverProperties = getServer().getServerInstancePropertiesImpl();
- Map properties = getServerRuntime().getServerInstanceProperties();
- properties.putAll(serverProperties);
- Iterator propertyIterator = properties.keySet().iterator();
- while(propertyIterator.hasNext())
- {
- String property = (String)propertyIterator.next();
- String value = (String)properties.get(property);
- if(value!=null && value.trim().length()>0)
- props.put(property,properties.get(property));
- }
- Module module = getServerRuntime().getServerTypeDefinition().getModule(getModuleTypeId());
- String modDir = module.getPublishDir();
- modDir = getServerRuntime().getServerTypeDefinition().getResolver().resolveProperties(modDir);
-
- IWebModule webModule = (IWebModule)getModule()[0].loadAdapter(IWebModule.class,null);
- IEJBModule ejbModule = (IEJBModule)getModule()[0].loadAdapter(IEJBModule.class,null);
- IEnterpriseApplication earModule = (IEnterpriseApplication)getModule()[0].loadAdapter(IEnterpriseApplication.class,null);
-
- String moduleName="unknownmodule";//$NON-NLS-1$
- String moduleDir="";//$NON-NLS-1$
- if(webModule!=null){
- moduleName = this.guessModuleName(webModule);
- }
- if(ejbModule!=null){
- moduleName = getModule()[0].getName();
- }
- if(earModule!=null){
- moduleName = getModule()[0].getName();
- }
-
- props.put(PROP_PROJECT_WORKING_DIR,getProjectWorkingLocation().toString());
- props.put(PROP_MODULE_NAME,moduleName);
- props.put(PROP_MODULE_DIR,getModuleWorkingDir().toString());
- props.put(PROP_SERVER_PUBLISH_DIR,modDir);
- return props;
- }
-
- private IPath getModuleWorkingDir()
- {
- return getProjectWorkingLocation().append(getModule()[0].getId());
- }
-
- private IPath getProjectWorkingLocation(){
- String pluginId = getServerRuntime().getServerTypeDefinition().getConfigurationElementNamespace();
- return getModule()[0].getProject().getWorkingLocation(pluginId);
- }
- private String guessModuleName(IWebModule webModule) {
- String moduleName = getModule()[0].getName();
- String contextRoot = webModule.getContextRoot();
- if(contextRoot.charAt(0) == '/')
- moduleName = contextRoot.substring(1);
- return moduleName;
- }
-
- private void runAnt(String buildFile,String targets,Map properties ,IProgressMonitor monitor)throws CoreException{
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType type = launchManager.getLaunchConfigurationType(IAntLaunchConfigurationConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE);
-
- ILaunchConfigurationWorkingCopy wc= type.newInstance(null,properties.get(PROP_MODULE_NAME)+" module publisher");
- wc.setContainer(null);
- wc.setAttribute(IExternalToolConstants.ATTR_LOCATION, buildFile);
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER,"org.eclipse.ant.ui.AntClasspathProvider");
- wc.setAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS,targets);
- wc.setAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_PROPERTIES,properties);
- wc.setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND,false);
- wc.setAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_CONSOLE,true);
- wc.setAttribute(IDebugUIConstants.ATTR_PRIVATE,true);
-
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, "org.eclipse.ant.ui.AntClasspathProvider");
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME,getServerRuntime().getVMInstall().getName());
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE,getServerRuntime().getVMInstall().getVMInstallType().getId());
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "org.eclipse.ant.internal.ui.antsupport.InternalAntRunner");
- wc.setAttribute(DebugPlugin.ATTR_PROCESS_FACTORY_ID, IAntUIConstants.REMOTE_ANT_PROCESS_FACTORY_ID);
-
- setupAntLaunchConfiguration(wc);
-
-
- ILaunchConfiguration launchConfig = wc.doSave();
- launchConfig.launch("run",monitor);
- }
-
-
-
- /* (non-Javadoc)
- */
- protected void setupAntLaunchConfiguration(ILaunchConfigurationWorkingCopy wc) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.generic.internal.core.GenericPublisher#unpublish(org.eclipse.wst.server.core.IModule, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus[] unpublish(IProgressMonitor monitor) {
-
- if(getModule().length>1)// only respond to root module calls.
- return null;
- try {
- File file = computeBuildFile();
- runAnt(file.toString(),getUnpublishTargetsForModule(),getPublishProperties(),monitor);
- } catch (CoreException e) {
- IStatus s = new Status(IStatus.ERROR,CorePlugin.PLUGIN_ID,0,GenericServerCoreMessages.errorRemoveModuleAntpublisher,e);
- return new IStatus[] {s};
- }
- return null;
- }
-}
View
102 ...ins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/CorePlugin.java
@@ -1,102 +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.internal;
-
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.ui.plugin.*;
-import org.osgi.framework.BundleContext;
-import java.io.IOException;
-import java.net.URL;
-
-/**
- * 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;
- private ServerTypeDefinitionManager fServerTypeDefinitionManager;
- /**
- * The constructor.
- */
- public CorePlugin() {
- super();
- plugin = this;
- }
-
- /**
- * 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;
- }
-
- /**
- *
- * @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
197 ...r.generic.core/src/org/eclipse/jst/server/generic/core/internal/ExternalLaunchConfigurationDelegate.java
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * rfrost@bea.com
- * tyip@bea.com
- *
- * Based on GenericServerLaunchConfigurationDelegate by Gorkem Ercan
- *******************************************************************************/
-
-package org.eclipse.jst.server.generic.core.internal;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.apache.tools.ant.taskdefs.Execute;
-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.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.RuntimeProcess;
-import org.eclipse.jdt.internal.launching.JavaRemoteApplicationLaunchConfigurationDelegate;
-import org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
-
-/**
- * <p>Extension of <code>AbstractJavaLaunchConfigurationDelegate</code> that supports
- * servers which are started/stopped via external executables (e.g. scripts).</p>
- *
- * <p>Note: <code>AbstractJavaLaunchConfigurationDelegate</code> is extended simply to take advantage
- * of a set of useful code that is not directly related to launching a JVM-based app.</p>
- */
-public class ExternalLaunchConfigurationDelegate extends AbstractJavaLaunchConfigurationDelegate {
-
- /**
- * Identifier for the executable server configuration type
- * (value <code>"org.eclipse.jst.server.generic.core.ExternalLaunchConfigurationType"</code>).
- */
- public static final String ID_EXTERNAL_LAUNCH_TYPE = CorePlugin.PLUGIN_ID + ".ExternalLaunchConfigurationType"; //$NON-NLS-1$
-
- /**
- * Name of the launch configuration attribute that holds the external executable commandline.
- */
- public static final String COMMANDLINE = CorePlugin.PLUGIN_ID + ".COMMANDLINE"; //$NON-NLS-1$
-
- /**
- * Name of the launch configuration attribute that holds a descriptive name for the external executable.
- */
- public static final String EXECUTABLE_NAME = CorePlugin.PLUGIN_ID + ".EXECUTABLE_NAME"; //$NON-NLS-1$
-
- /**
- * Name of the launch configuration attribute that holds the debug port.
- */
- public static final String DEBUG_PORT = CorePlugin.PLUGIN_ID + ".DEBUG_PORT"; //$NON-NLS-1$
-
- /**
- * Default value for the descriptive name for the external executable.
- */
- public static final String DEFAULT_EXECUTABLE_NAME = "External Generic Server";
-
- /**
- * Debugging launch configuration delegate.
- */
- private static JavaRemoteApplicationLaunchConfigurationDelegate debuggingDelegate =
- new JavaRemoteApplicationLaunchConfigurationDelegate();
-
- /* (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 {
- IServer server = ServerUtil.getServer(configuration);
- if (server == null) {
- abort(GenericServerCoreMessages.missingServer, null, IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
- }
-
- ExternalServerBehaviour serverBehavior = (ExternalServerBehaviour) server.loadAdapter(ServerBehaviourDelegate.class, null);
-
- // initialize the server, check the ports and start the PingThread that will check
- // server state
- serverBehavior.setupLaunch(launch, mode, monitor);
-
- // get the executable commandline
- String commandline = configuration.getAttribute(COMMANDLINE, (String) null);
- if (commandline == null || commandline.length() == 0) {
- abort(GenericServerCoreMessages.commandlineUnspecified, null, IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
- }
- // specified commandline might be multiple args, need to parse
- List cmds = new ArrayList();
- StringTokenizer st = new StringTokenizer(commandline);
- while (st.hasMoreTokens()) {
- cmds.add(st.nextToken());
- }
-
- // get a descriptive name for the executable
- String executableName = configuration.getAttribute(EXECUTABLE_NAME, DEFAULT_EXECUTABLE_NAME);
-
- // get the executable environment
- ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
- String[] env = manager.getEnvironment(configuration);
-
- // get the working directory
- File workingDir = verifyWorkingDirectory(configuration);
- if (workingDir == null) {
- abort(GenericServerCoreMessages.workingdirUnspecified, null, IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
- }
-
- // Launch the executable for the configuration using the Ant Execute class
- try {
- Process process = Execute.launch(null, (String[])cmds.toArray(new String[cmds.size()]), env, workingDir, true);
- IProcess runtimeProcess = new RuntimeProcess(launch, process, executableName, null);
- launch.addProcess(runtimeProcess);
- serverBehavior.setProcess(runtimeProcess);
- } catch (IOException ioe) {
- abort(GenericServerCoreMessages.errorLaunchingExecutable, ioe, IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
- }
-
- if (mode.equals("debug")) {
- ILaunchConfigurationWorkingCopy wc = createDebuggingConfig(configuration);
- // if we're launching the debugging we need to wait for the config to start
- // before launching the debugging session
- serverBehavior.setDebuggingConfig(wc, mode, launch, monitor);
- }
- }
-
- private ILaunchConfigurationWorkingCopy createDebuggingConfig(ILaunchConfiguration configuration)
- throws CoreException {
- ILaunchConfigurationWorkingCopy wc = configuration.getWorkingCopy();
- setDebugArgument(wc, IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP, "hostname", "localhost");
- String port = configuration.getAttribute(DEBUG_PORT, (String) null);
- if (port==null || port.length()==0) {
- abort(GenericServerCoreMessages.debugPortUnspecified, null, IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
- }
- setDebugArgument(wc, IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP, "port", port);
- setDebugArgument(wc, ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, "debugFlag", "true");
- return wc;
- }
-
- /**
- * Starts the debugging session
- */
- protected static void startDebugging(ILaunchConfigurationWorkingCopy wc,
- String mode,
- ILaunch launch,
- IProgressMonitor monitor) throws CoreException {
- Trace.trace(Trace.FINEST, "Starting debugging");
- debuggingDelegate.launch(wc, mode, launch, monitor);
- }
-
- private void setDebugArgument(ILaunchConfigurationWorkingCopy config, String attribKey, String key, String arg) {
- try {
- Map args = config.getAttribute(attribKey, (Map)null);
- if (args!=null) {
- args = new HashMap(args);
- } else {
- args = new HashMap();
- }
- args.put(key, String.valueOf(arg));
- config.setAttribute(attribKey, args);
- } catch (CoreException ce) {
- // ignore
- }
- }
-
- /**
- * 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
267 ...se.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/ExternalServerBehaviour.java
@@ -1,267 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * rfrost@bea.com - initial API and implementation
- *
- * Based on GenericServerBehavior by Gorkem Ercan
- *******************************************************************************/
-package org.eclipse.jst.server.generic.core.internal;
-
-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.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jst.server.generic.internal.xml.Resolver;
-import org.eclipse.jst.server.generic.servertype.definition.External;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.ServerPort;
-import org.eclipse.wst.server.core.internal.Server;
-import org.eclipse.wst.server.core.util.SocketUtil;
-
-/**
- * Subclass of <code>GenericServerBehavior</code> that supports
- * servers which are started/stopped via external executables (e.g. scripts).
- */
-public class ExternalServerBehaviour extends GenericServerBehaviour {
-
- // config for debugging session
- private ILaunchConfigurationWorkingCopy wc;
- private String mode;
- private ILaunch launch;
- private IProgressMonitor monitor;
-
- /**
- * Override to reset the status if the state was unknown
- */
- public void stop(boolean force) {
- resetStatus(getServer().getServerState());
- super.stop(force);
- }
-
- /**
- * Override to set status to unknown if the port was in use and to reset the status if the state was
- * unknown and an exception was not thrown. Will want to change logic once external generic server pings
- * server process to determine state instead of maintaining handle to process.
- */
- protected void setupLaunch(ILaunch launch, String launchMode, IProgressMonitor monitor) throws CoreException {
- int state = getServer().getServerState();
- try {
- super.setupLaunch(launch, launchMode, monitor);
- } catch (CoreException ce) {
- ServerPort portInUse = portInUse();
- if (portInUse != null) {
- Trace.trace(Trace.WARNING, "Port " + portInUse.getPort() + " is currently in use");
- Status status = new Status(Status.WARNING, CorePlugin.PLUGIN_ID, Status.OK,
- GenericServerCoreMessages.bind(GenericServerCoreMessages.errorPortInUse,Integer.toString(portInUse.getPort()),portInUse.getName()), null);
- setServerStatus(status);
- setServerState(IServer.STATE_UNKNOWN);
- }
- throw ce;
- }
- resetStatus(state);
- }
-
- private ServerPort portInUse() {
- ServerPort[] ports = getServer().getServerPorts(null);
- ServerPort sp;
- for(int i=0;i<ports.length;i++){
- sp = ports[i];
- if (SocketUtil.isPortInUse(sp.getPort(), 5)) {
- return sp;
- }
- }
- return null;
- }
-
- /**
- * Override to trigger the launch of the debugging session (if appropriate).
- */
- protected synchronized void setServerStarted() {
- if (wc != null) {
- try {
- ExternalLaunchConfigurationDelegate.startDebugging(wc, mode, launch, monitor);
- } catch (CoreException ce) {
- // failed to start debugging, so set mode to run
- setMode(ILaunchManager.RUN_MODE);
- final Status status = new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 1,
- GenericServerCoreMessages.errorStartingExternalDebugging, ce);
- CorePlugin.getDefault().getLog().log(status);
- Trace.trace(Trace.SEVERE, GenericServerCoreMessages.errorStartingExternalDebugging, ce);
- // inform user via an error dialog
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- ErrorDialog.openError(new Shell(PlatformUI.getWorkbench().getDisplay()), null, null, status);
- }
- });
- } finally {
- clearDebuggingConfig();
- }
- }
- setServerState(IServer.STATE_STARTED);
- }
-
- /*
- * If the server state is unknown, reset the status to OK
- */
- private void resetStatus(int state) {
- if (state == IServer.STATE_UNKNOWN) {
- setServerStatus(null);
- }
- }
-
- /**
- * Since terminate() is called during restart, need to override to
- * call shutdown instead of just killing the original process.
- */
- protected void terminate() {
- int state = getServer().getServerState();
- if (state == IServer.STATE_STOPPED)
- return;
-
- // cache a ref to the current process
- IProcess currentProcess = process;
- // set the process var to null so that GenericServerBehavior.setProcess()
- // will grab the stop executable (and declare the server stopped when it exits)
- process = null;
-
- // execute the standard shutdown
- shutdown(state);
-
- // if the shutdown did not terminate the process, forcibly terminate it
- try {
- if (currentProcess != null && !currentProcess.isTerminated()) {
- Trace.trace(Trace.FINER, "About to kill process: " + currentProcess);
- currentProcess.terminate();
- currentProcess = null;
- }
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error killing the process", e);
- }
- }
-
- /**
- * Override superclass method to correctly setup the launch configuration for starting an external
- * server.
- */
- public void setupLaunchConfiguration(ILaunchConfigurationWorkingCopy workingCopy,
- IProgressMonitor monitor) throws CoreException {
- clearDebuggingConfig();
- ServerRuntime serverDef = getServerDefinition();
- Resolver resolver = serverDef.getResolver();
- workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
- resolver.resolveProperties(serverDef.getStart().getWorkingDirectory()));
- String external = resolver.resolveProperties(getExternalForOS(serverDef.getStart().getExternal()));
- workingCopy.setAttribute(ExternalLaunchConfigurationDelegate.COMMANDLINE, external);
- workingCopy.setAttribute(ExternalLaunchConfigurationDelegate.DEBUG_PORT,
- resolver.resolveProperties(serverDef.getStart().getDebugPort()));
- // just use the commandline for now
- workingCopy.setAttribute(ExternalLaunchConfigurationDelegate.EXECUTABLE_NAME, external);
- Map environVars = getEnvironmentVariables(getServerDefinition().getStart());
- if(!environVars.isEmpty()){
- workingCopy.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES,environVars);
- }
- }
-
- /*
- * Returns the first external whose "os" attribute matches (case insensitive) the beginning
- * of the name of the current OS (as determined by the System "os.name" property). If
- * no such match is found, returns the first external that does not have an OS attribute.
- */
- private String getExternalForOS(List externals) {
- String currentOS = System.getProperty("os.name").toLowerCase();
- External external;
- String matchingExternal = null;
- String externalOS;
- Iterator i = externals.iterator();
- while (i.hasNext()) {
- external= (External) i.next();
- externalOS = external.getOs();
- if (externalOS == null) {
- if (matchingExternal == null) {
- matchingExternal = external.getValue();
- }
- } else if (currentOS.startsWith(externalOS.toLowerCase())) {
- matchingExternal = external.getValue();
- break;
- }
- }
- return matchingExternal;
- }
-
- /**
- * Returns the String ID of the launch configuration type.
- * @return
- */
- protected String getConfigTypeID() {
- return ExternalLaunchConfigurationDelegate.ID_EXTERNAL_LAUNCH_TYPE;
- }
-
- /**
- * Returns the String name of the stop launch configuration.
- * @return
- */
- protected String getStopLaunchName() {
- return GenericServerCoreMessages.externalStopLauncher;
- }
-
- /**
- * Sets up the launch configuration for stopping the server.
- * @param workingCopy
- */
- protected void setupStopLaunchConfiguration(GenericServerRuntime runtime, ILaunchConfigurationWorkingCopy wc) {
- clearDebuggingConfig();
- ServerRuntime serverDef = getServerDefinition();
- Resolver resolver = serverDef.getResolver();
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
- resolver.resolveProperties(serverDef.getStop().getWorkingDirectory()));
- String external = resolver.resolveProperties(getExternalForOS(serverDef.getStop().getExternal()));
- wc.setAttribute(ExternalLaunchConfigurationDelegate.COMMANDLINE, external);
- // just use commandline for now
- Map environVars = getEnvironmentVariables(getServerDefinition().getStop());
- if(!environVars.isEmpty()){
- wc.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES,environVars);
- }
- wc.setAttribute(ExternalLaunchConfigurationDelegate.EXECUTABLE_NAME, external);
- wc.setAttribute(Server.ATTR_SERVER_ID, getServer().getId());
- }
-
- /**
- * Sets the configuration to use for launching a debugging session
- */
- protected synchronized void setDebuggingConfig(ILaunchConfigurationWorkingCopy wc,
- String mode,
- ILaunch launch,
- IProgressMonitor monitor) {
- this.wc = wc;
- this.mode = mode;
- this.launch = launch;
- this.monitor = monitor;
- }
-
- private synchronized void clearDebuggingConfig() {
- this.wc = null;
- this.mode = null;
- this.launch = null;
- this.monitor = null;
- }
-
-
-}
View
61 ...g.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericPublisher.java
@@ -1,61 +0,0 @@
-package org.eclipse.jst.server.generic.core.internal;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IModuleArtifact;
-import org.eclipse.wst.server.core.IServer;
-
-/**
- * The abstract publisher. This is intended to be subclassed by
- * clients implementing the genericpublisher extension point.
- *
- * @author Gorkem Ercan
- */
-public abstract class GenericPublisher
-{
-
- private IModule[] fModule;
- private GenericServerRuntime fServerRuntime;
- private GenericServer fServer;
-
- protected void initialize(IModule[] module, IServer server)
- {
- fModule = module;
- fServer = (GenericServer)server.loadAdapter(GenericServer.class,null);
- fServerRuntime = (GenericServerRuntime)server.getRuntime().loadAdapter(GenericServerRuntime.class,null);
- }
- /**
- * Called by the generic server implementation when a module is
- * removed form the server instance.
- * Subclasses may extend this method to perform their own module removal
- *
- * @param module
- * @param monitor
- * @return
- */
- public abstract IStatus[] unpublish(IProgressMonitor monitor);
-
- /**
- * Called by the generic server implementation when a publish module
- * event occurs.
- * Subclasses may extend this method to perform their own publishing
- *
- * @param resource
- * @param monitor
- * @return
- */
- public abstract IStatus[] publish(IModuleArtifact[] resource,
- IProgressMonitor monitor);
-
- public IModule[] getModule() {
- return fModule;
- }
-
- public GenericServer getServer(){
- return fServer;
- }
- public GenericServerRuntime getServerRuntime() {
- return fServerRuntime;
- }
-}
View
356 .../org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServer.java
@@ -1,356 +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.internal;
-
-import java.io.File;
-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.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-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.core.IEJBModule;
-import org.eclipse.jst.server.core.IEnterpriseApplication;
-import org.eclipse.jst.server.core.IWebModule;
-import org.eclipse.jst.server.generic.servertype.definition.Module;
-import org.eclipse.jst.server.generic.servertype.definition.Port;
-import org.eclipse.jst.server.generic.servertype.definition.Property;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.ServerPort;
-import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.wst.server.core.internal.ServerMonitorManager;
-import org.eclipse.wst.server.core.model.IURLProvider;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-
-/**
- * Generic XML based server implementation.
- *
- * @author Gorkem Ercan
- */
-public class GenericServer extends ServerDelegate implements IURLProvider {
-
- private static final String ATTR_GENERIC_SERVER_MODULES = "Generic_Server_Modules_List";
- /*
- * (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.cancelNoPublish,null);
- return new Status(IStatus.OK, CorePlugin.PLUGIN_ID, 0, "PublishingStarted", null);
- }
-
-
- public IStatus canModifyModules(IModule[] add, IModule[] remove) {
- Iterator iterator = getServerDefinition().getModule().iterator();
-
- while(iterator.hasNext()) {
- Module module = (Module)iterator.next();
- for (int i = 0; i < add.length; i++) {
- if(add[i].getModuleType().getId().equals(module.getType()))
- return new Status(IStatus.OK, CorePlugin.PLUGIN_ID, 0, "CanModifyModules", null);
- }
- }
- return new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 0, GenericServerCoreMessages.moduleNotCompatible, null);
- }
-
- /* (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 {
-
- List modules = this.getAttribute(ATTR_GENERIC_SERVER_MODULES,(List)null);
-
- if(add!=null&& add.length>0)
- {
- if(modules==null) {
- modules=new ArrayList(add.length);
- }
- for (int i = 0; i < add.length; i++) {
-
- if(modules.contains(add[i].getId())==false)
- modules.add(add[i].getId());
- }
- }
- if(remove!=null && remove.length>0 && modules!=null)
- {
- for (int i = 0; i < remove.length; i++) {
- modules.remove(remove[i].getId());
- }
- }
- if(modules!=null)
- setAttribute(ATTR_GENERIC_SERVER_MODULES,modules);
-
- }
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#getModules()
- */
- public org.eclipse.wst.server.core.IModule[] getModules() {
- List modules = getAttribute(ATTR_GENERIC_SERVER_MODULES,(List)null);
- List imodules = new ArrayList();
- Iterator iterator = modules.iterator();
- while(iterator.hasNext())
- {
- String moduleId = (String)iterator.next();
- int sep = moduleId.indexOf(":");
- IProject project =ResourcesPlugin.getWorkspace().getRoot().getProject(moduleId.substring(0,sep));
- IModule[] ms = ServerUtil.getModules(project);
- for (int i = 0; i < ms.length; i++) {
- if(ms[i].getId().equals(moduleId.substring(sep+1)))
- imodules.add(ms[i]);
- }
-
- }
- if(modules!= null)
- return (IModule[])imodules.toArray(new IModule[imodules.size()]);
- return new IModule[0];
- }
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#getChildModules(org.eclipse.wst.server.core.model.IModule[])
- */
- public IModule[] getChildModules(IModule[] module) {
- if (module[0] != null && module[0].getModuleType() != null) {
- String type = module[0].getModuleType().getId();
- if (module.length == 1 && "j2ee.ear".equals(type)) {
- IEnterpriseApplication enterpriseApplication = (IEnterpriseApplication) module[0]
- .loadAdapter(IEnterpriseApplication.class, null);
- if (enterpriseApplication.getModules() != null) {
- return enterpriseApplication.getModules();
- }
- }
- }
- return new IModule[0];
- }
-
- /**
- * @return
- */
- private Map getServerInstanceProperties() {
- Map runtimeProperties =getRuntimeDelegate().getServerInstanceProperties();
- Map serverProperties = getServerInstancePropertiesImpl();
- 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.ServerPort[] 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.ServerPort[])ports.toArray(new org.eclipse.wst.server.core.ServerPort[ports.size()]);
- }
-
-
- /* (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.loadAdapter(IWebModule.class,null)==null )
- return null;
-
- String host = getServer().getHost();
- String url = "http://"+host;
- int port = 0;
-
- port = getHttpPort();
- port =ServerMonitorManager.getInstance().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
- */
- protected 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;
- }
-
- /**
- * Returns the ServerRuntime that represents the .serverdef
- * file for this server.
- * @return server runtime
- */
- public ServerRuntime getServerDefinition(){
- String rtTypeId = getServer().getRuntime().getRuntimeType().getId();
- return CorePlugin.getDefault().getServerTypeDefinitionManager().getServerRuntimeDefinition(rtTypeId,getServerInstanceProperties());
- }
-
- private GenericServerRuntime getRuntimeDelegate(){
- return (GenericServerRuntime)getServer().getRuntime().loadAdapter(GenericServerRuntime.class,null);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.ServerDelegate#getRootModules(org.eclipse.wst.server.core.IModule)
- */
- public IModule[] getRootModules(IModule module) throws CoreException {
-
- String type = module.getModuleType().getId();
- if (type.equals("j2ee.ejb")) {
- IEJBModule ejbModule = (IEJBModule) module.loadAdapter(IEJBModule.class,null);
- if (ejbModule != null) {
- IStatus status = canModifyModules(new IModule[] { module }, null);
- if (status == null || !status.isOK())
- throw new CoreException(status);
- IModule[] childs = doGetChildModules(module);
- if(childs.length>0)
- return childs;
- return new IModule[] { module };
- }
- }
- if (type.equals("j2ee.ear")) {
- IEnterpriseApplication enterpriseApplication = (IEnterpriseApplication) module.loadAdapter(IEnterpriseApplication.class,null);
- if (enterpriseApplication.getModules() != null) {
- IStatus status = canModifyModules(new IModule[] { module },null);
- if (status == null || !status.isOK())
- throw new CoreException(status);
- return new IModule[] { module };
- }
- }
- if (type.equals("j2ee.web")) {
- IWebModule webModule = (IWebModule) module.loadAdapter(IWebModule.class,null);
- if (webModule != null) {
- IStatus status = canModifyModules(new IModule[] { module },null);
- if (status == null || !status.isOK())
- throw new CoreException(status);
- IModule[] childs = doGetChildModules(module);
- if(childs.length>0)
- return childs;
- return new IModule[] { module };
- }
- }
- return null;
- }
-
-
- private IModule[] doGetChildModules(IModule module) {
- IModule[] ears = ServerUtil.getModules("j2ee.ear");
- ArrayList list = new ArrayList();
- for (int i = 0; i < ears.length; i++) {
- IEnterpriseApplication ear = (IEnterpriseApplication)ears[i].loadAdapter(IEnterpriseApplication.class,null);
- IModule[] childs = ear.getModules();
- for (int j = 0; j < childs.length; j++) {
- if(childs[j].equals(module))
- list.add(ears[i]);
- }
- }
- return (IModule[])list.toArray(new IModule[list.size()]);
- }
-
- public Map getServerInstancePropertiesImpl() {
- return getAttribute(GenericServerRuntime.SERVER_INSTANCE_PROPERTIES, new HashMap());
- }
-
- public void setServerInstanceProperties(Map map) {
- setAttribute(GenericServerRuntime.SERVER_INSTANCE_PROPERTIES, map);
- }
- /**
- * Checks if the properties set for this server is valid.
- * @return
- */
- public IStatus validate() {
- List props = this.getServerDefinition().getProperty();
- for(int i=0;i<props.size();i++)
- {
- Property property =(Property)props.get(i);
- if(property.getType().equals(Property.TYPE_DIRECTORY) || property.getType().equals(Property.TYPE_FILE))
- {
- String path= (String)getServerInstanceProperties().get(property.getId());
- if(path!=null && !pathExist(path))
- return new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 0, GenericServerCoreMessages.bind(GenericServerCoreMessages.invalidPath,path), null);
- }
- }
- return new Status(IStatus.OK, CorePlugin.PLUGIN_ID, 0, "", null);
- }
- private boolean pathExist(String path){
- File f = new File(path);
- return f.exists();
- }
-
-
-}
View
508 ...pse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/GenericServerBehaviour.java
@@ -1,508 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 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.internal;
-
-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.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.servertype.definition.ArchiveType;
-import org.eclipse.jst.server.generic.servertype.definition.ArgumentPair;
-import org.eclipse.jst.server.generic.servertype.definition.Classpath;
-import org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration;
-import org.eclipse.jst.server.generic.servertype.definition.Module;
-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.ServerPort;
-import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-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(int kind, IProgressMonitor monitor) throws CoreException {
- // do nothing
- }
-
- /* (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(int kind, int deltaKind, IModule[] module,
- IProgressMonitor monitor) throws CoreException {
-
- if(REMOVED == deltaKind){
- removeFromServer(module,monitor);
- }
- else{
- Module m = getServerDefinition().getModule(module[0].getModuleType().getId());
- String publisherId = m.getPublisherReference();
- GenericPublisher publisher = PublishManager.getPublisher(publisherId);
- if(publisher==null){
- IStatus status = new Status(IStatus.ERROR,CorePlugin.PLUGIN_ID,0,"Unable to create publisher",null);
- throw new CoreException(status);
- }
- publisher.initialize(module,getServer());
- IStatus[] status= publisher.publish(null,monitor);
- if(status==null){
- setModulePublishState(module, IServer.PUBLISH_STATE_NONE);
- }else {
- for (int i=0; i < status.length; i++) {
- if (IStatus.ERROR == status[i].getSeverity()){
- setModulePublishState(module, IServer.PUBLISH_STATE_UNKNOWN);
- throw new CoreException(status[i]);
- }
- }
- }
- }
- }
-
- private void removeFromServer(IModule[] module, IProgressMonitor monitor) throws CoreException
- {
- Module m = getServerDefinition().getModule(module[0].getModuleType().getId());
- String publisherId = m.getPublisherReference();
- GenericPublisher publisher = PublishManager.getPublisher(publisherId);
- if(publisher==null){
- IStatus status = new Status(IStatus.ERROR,CorePlugin.PLUGIN_ID,0,"Unable to create publisher to remove module",null);
- throw new CoreException(status);
- }
- publisher.initialize(module,getServer());
- publisher.unpublish(monitor);
- }
-
-
- /* (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;
- }
-
- shutdown(state);
- }
-
- /**
- * Shuts down the server via the launch configuration.
- */
- protected void shutdown(int state) {
- GenericServerRuntime runtime = (GenericServerRuntime) getRuntimeDelegate();
- try {
- Trace.trace(Trace.FINEST, "Stopping Server");
- if (state != IServer.STATE_STOPPED)
- setServerState(IServer.STATE_STOPPING);
- String configTypeID = getConfigTypeID();
- ILaunchManager mgr = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType type = mgr.getLaunchConfigurationType(configTypeID);
- String launchName = getStopLaunchName();
- 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