You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by mc...@apache.org on 2010/04/29 02:45:15 UTC
svn commit: r939145 [1/7] - in
/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core:
./ META-INF/ src/main/java/org/apache/geronimo/st/v30/core/
src/main/java/org/apache/geronimo/st/v30/core/commands/
src/main/java/org/apache...
Author: mcconne
Date: Thu Apr 29 00:45:13 2010
New Revision: 939145
URL: http://svn.apache.org/viewvc?rev=939145&view=rev
Log:
Decouple V30 plugins from other plugins in preparation for OSGi changes
Added:
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/ClasspathContainersHelper.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/CommonMessages.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentDescriptorUtils.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentStatusMessage.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentUtils.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoConnectionFactory.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoFacetInstallDelegate.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoLaunchConfigurationDelegate.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoLaunchableAdapterDelegate.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoRuntimeDelegate.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoSchemaNS.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerDelegate.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerRuntimeTargetHandler.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoSourcePathComputerDelegate.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoUtils.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoVersionHandler.java
- copied, changed from r938779, geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoV30VersionHandler.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/IGeronimoRuntime.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/IGeronimoServer.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/IGeronimoServerBehavior.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/IGeronimoVersionHandler.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/ModuleArtifactMapper.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/PingThread.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/UpdateServerStateTask.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/commands/
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/commands/AbstractDeploymentCommand.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/commands/DeployCommand.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/commands/DeploymentCmdStatus.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/commands/DeploymentCommandFactory.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/commands/DistributeCommand.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/commands/IDeploymentCommand.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/commands/RedeployCommand.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/commands/StartCommand.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/commands/StopCommand.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/commands/SynchronizedDeploymentOp.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/commands/TargetModuleIdNotFoundException.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/commands/UndeployCommand.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/descriptor/
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/descriptor/AbstractDeploymentDescriptor.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/descriptor/ApplicationDeploymentDescriptor.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/descriptor/ApplicationJ2EEDeploymentDescriptor.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/descriptor/ApplicationJavaEEDeploymentDescriptor.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/descriptor/EjbDeploymentDescriptor.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/descriptor/EjbJ2EEDeploymentDescriptor.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/descriptor/EjbJavaEEDeploymentDescriptor.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/descriptor/WebDeploymentDescriptor.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/descriptor/WebJ2EEDeploymentDescriptor.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/descriptor/WebJavaEEDeploymentDescriptor.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/internal/DependencyHelper.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/internal/DependencyManager.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/internal/Messages.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/internal/Messages.properties (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/jaxb/ConversionHelper.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/jaxb/IJAXBUtilsProvider.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/jaxb/JAXB21Utils.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/jaxb/JAXBObjectFactory.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/jaxb/JAXBUtils.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/jaxb/MarshallerListener.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/jaxb/NamespaceFilter.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/jaxb/NamespacePrefix.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/operations/AbstractGeronimoJ2EEComponentOperation.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/operations/DeploymentPlanCreationOperation.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/operations/GeronimoAccountManager.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/operations/IDeploymentPlanCreationOp.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/operations/ISharedLibEntryCreationDataModelProperties.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/operations/ImportDeploymentPlanDataModelProvider.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/operations/ImportDeploymentPlanOperation.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/operations/SharedLibEntryCreationOperation.java (with props)
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/operations/SharedLibEntryDataModelProvider.java (with props)
Removed:
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoV30Utils.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoV30VersionHandler.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/operations/GeronimoV30FacetInstallDelegate.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/operations/V30DeploymentPlanCreationOperation.java
Modified:
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/META-INF/MANIFEST.MF
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/plugin.xml
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/pom.xml
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/Activator.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentPlanInstallConfig.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoRuntime.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServer.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviour.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerInfo.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/jaxb/JAXBModelUtils.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/jaxb/JAXBObjectFactoryImpl.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/operations/GeronimoServerPluginManager.java
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/META-INF/MANIFEST.MF?rev=939145&r1=939144&r2=939145&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/META-INF/MANIFEST.MF Thu Apr 29 00:45:13 2010
@@ -6,19 +6,31 @@ Bundle-Version: 3.0.0
Bundle-Activator: org.apache.geronimo.st.v30.core.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-Require-Bundle: org.eclipse.jst.j2ee,
- org.apache.geronimo.runtime.v30,
- org.apache.geronimo.st.core,
+Require-Bundle:
org.apache.geronimo.jee.v21.jaxbmodel,
+ org.apache.geronimo.runtime.v30,
+ org.eclipse.core.commands,
org.eclipse.core.runtime,
- org.eclipse.wst.server.core,
org.eclipse.debug.core,
- org.eclipse.wst.common.project.facet.core,
+ org.eclipse.emf.ecore,
+ org.eclipse.jdt.core,
+ org.eclipse.jdt.launching,
+ org.eclipse.jem.util,
org.eclipse.jst.common.frameworks,
- org.eclipse.wst.common.modulecore
+ org.eclipse.jst.j2ee,
+ org.eclipse.jst.j2ee.core,
+ org.eclipse.jst.j2ee.ejb,
+ org.eclipse.jst.j2ee.jca,
+ org.eclipse.jst.j2ee.web,
+ org.eclipse.jst.server.core,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.wst.common.project.facet.core,
+ org.eclipse.wst.server.core,
+ org.eclipse.wst.web
Bundle-ActivationPolicy: lazy
Export-Package:
org.apache.geronimo.st.v30.core,
+ org.apache.geronimo.st.v30.core.descriptor,
org.apache.geronimo.st.v30.core.internal,
org.apache.geronimo.st.v30.core.jaxb,
org.apache.geronimo.st.v30.core.operations
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/plugin.xml?rev=939145&r1=939144&r2=939145&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/plugin.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/plugin.xml Thu Apr 29 00:45:13 2010
@@ -21,34 +21,39 @@
<plugin>
-
<!--
- |
- | Extend WTP runtimeTypes to include the 3.0 version of the "Geronimo Runtime Type"
- |
+ ###################################################################################################################
+ ## ##
+ ## Geronimo Server - Define a 3.0 version of the Geronimo runtime type along with the list of module types that ##
+ ## it supports ##
+ ## ##
+ ###################################################################################################################
-->
<extension point="org.eclipse.wst.server.core.runtimeTypes">
<runtimeType id="org.apache.geronimo.runtime.30" version="3.0"
- name="%runtimeTypeName"
- description="%runtimeTypeDescription"
- vendor="%runtimeTypeVendor"
- class="org.apache.geronimo.st.v30.core.GeronimoRuntime">
+ name="%runtimeTypeName"
+ description="%runtimeTypeDescription"
+ vendor="%runtimeTypeVendor"
+ class="org.apache.geronimo.st.v30.core.GeronimoRuntime">
<moduleType types="jst.web" versions="2.2, 2.3, 2.4, 2.5, 3.0"/>
<moduleType types="jst.ejb" versions="1.1, 2.0, 2.1, 3.0, 3.1"/>
<moduleType types="jst.connector" versions="1.0, 1.5"/>
<moduleType types="jst.ear" versions="1.2, 1.3, 1.4, 5.0"/>
- <moduleType types="jst.utility" versions="1.0"/>
+ <moduleType types="jst.utility" versions="1.0"/>
<moduleType types="jst.appclient" versions="1.2, 1.3, 1.4, 5.0"/>
+ <moduleType types="osgi.app" versions="1.0"/>
+ <moduleType types="osgi.bundle" versions="1.0"/>
</runtimeType>
</extension>
- <!-- ======================================================================================= -->
- <!-- -->
- <!-- Extend WTP serverTypes so that the new Geronimo server type can be asociated with the -->
- <!-- new Geronimo runtime type (defined above) -->
- <!-- -->
- <!-- ======================================================================================= -->
+ <!--
+ ###################################################################################################################
+ ## ##
+ ## Geronimo Server - Associate a Geronimo server configuration with the Geronimo runtime type defined above ##
+ ## ##
+ ###################################################################################################################
+ -->
<extension point="org.eclipse.wst.server.core.serverTypes">
<serverType id="org.apache.geronimo.server.30"
name="%serverTypeName"
@@ -61,7 +66,7 @@
stopTimeout="30000"
startBeforePublish="true"
runtimeTypeId="org.apache.geronimo.runtime.30"
- launchConfigId="org.apache.geronimo.st.core.launchConfigurationType"
+ launchConfigId="org.apache.geronimo.st.v30.core.launchConfigurationType"
behaviourClass="org.apache.geronimo.st.v30.core.GeronimoServerBehaviour"
hasConfiguration="false"
launchModes="run,debug,profile">
@@ -69,12 +74,54 @@
</extension>
- <!-- ======================================================================================= -->
- <!-- -->
- <!-- Map the runtime-component (defined in plugins\org.apache.geronimo.st.core\plugin.xml) -->
- <!-- to the new Geronimo runtime type (defined above) -->
- <!-- -->
- <!-- ======================================================================================= -->
+ <!--
+ ###################################################################################################################
+ ## ##
+ ## Geronimo Server - Associate a runtime target handler with the Geronimo runtime type defined above. This class ##
+ ## will provide the libraries required for the development of a Web project targeted for the ##
+ ## Geronimo runtime type. ##
+ ## ##
+ ###################################################################################################################
+ -->
+ <extension point="org.eclipse.jst.server.core.runtimeClasspathProviders">
+ <runtimeClasspathProvider id="org.apache.geronimo.runtimeClasspathProvider.30"
+ runtimeTypeIds="org.apache.geronimo.runtime.30"
+ class="org.apache.geronimo.st.v30.core.GeronimoServerRuntimeTargetHandler"/>
+ </extension>
+
+
+ <!--
+ ###################################################################################################################
+ ## ##
+ ## Geronimo Server - Define a runtime component and the facets it supports ##
+ ## ##
+ ###################################################################################################################
+ -->
+ <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <runtime-component-type id="org.apache.geronimo.runtime"/>
+ <runtime-component-version type="org.apache.geronimo.runtime" version="3.0"/>
+ <supported>
+ <runtime-component id="org.apache.geronimo.runtime" version="3.0"/>
+ <facet id="org.apache.geronimo.facet" version="1.3"/>
+ <facet id="jst.web" version="2.2,2.3,2.4,2.5,3.0"/>
+ <facet id="jst.ejb" version="1.1,2.0,2.1,3.0,3.1"/>
+ <facet id="jst.ear" version="1.2,1.3,1.4,5.0"/>
+ <facet id="jst.connector" version="1.0,1.5,1.6"/>
+ <facet id="jst.appclient" version="1.2,1.3,1.4,5.0"/>
+ <facet id="jst.utility" version="1.0"/>
+ <facet id="osgi.app" version="1.0"/>
+ <facet id="osgi.bundle" version="1.0"/>
+ </supported>
+ </extension>
+
+
+ <!--
+ ###################################################################################################################
+ ## ##
+ ## Geronimo Server - Map the runtime component defined above with the Geronimo runtime type also defined above ##
+ ## ##
+ ###################################################################################################################
+ -->
<extension point="org.eclipse.jst.server.core.runtimeFacetMappings">
<runtimeFacetMapping
runtimeTypeId="org.apache.geronimo.runtime.30"
@@ -83,16 +130,18 @@
<!--
- |
- | Declare the 1.3 version of the "Geronimo Deployment" project-facet and the action
- | that the user can perform on the facet (i.e., install). Note that the id associated
- | action must be unique across all plugins.
- |
+ ###################################################################################################################
+ ## ##
+ ## Geronimo Server - Declare the 1.3 version of the "Geronimo Deployment" project-facet and the action that the ##
+ ## user can perform on the facet (i.e., install). Note that the id associated action must be ##
+ ## unique across all plugins. ##
+ ## ##
+ ###################################################################################################################
-->
<extension point="org.eclipse.wst.common.project.facet.core.facets">
<project-facet-version facet="org.apache.geronimo.facet" version="1.3">
<action type="install" id="geronimo.plan.install.v30">
- <delegate class="org.apache.geronimo.st.v30.core.operations.GeronimoV30FacetInstallDelegate"/>
+ <delegate class="org.apache.geronimo.st.v30.core.operations.GeronimoFacetInstallDelegate"/>
<config-factory class="org.apache.geronimo.st.v30.core.DeploymentPlanInstallConfig$Factory"/>
</action>
<constraint>
@@ -119,9 +168,8 @@
<requires facet="jst.web" version="2.5"/>
<requires facet="jst.web" version="3.0"/>
<requires facet="jst.utility" version="1.0"/>
- <requires facet="osgi.app" version="1.0"/>
- <requires facet="osgi.bundle" version="1.0"/>
- <requires facet="osgi.comp" version="1.0"/>
+ <requires facet="osgi.app" version="1.0"/>
+ <requires facet="osgi.bundle" version="1.0"/>
</or>
</constraint>
</project-facet-version>
@@ -129,10 +177,12 @@
<!--
- |
- | Map the <runtime-component> (defined in org.apache.geronimo.st.core\plugin.xml)
- | to a specific version of the "Geronimo Deployment" <project-facet>
- |
+ ###################################################################################################################
+ ## ##
+ ## Geronimo Server - Map the runtime component defined above to a specific version of the "Geronimo Deployment" ##
+ ## project facet ##
+ ## ##
+ ###################################################################################################################
-->
<extension point="org.eclipse.wst.common.project.facet.core.defaultFacets"
id="org.apache.geronimo.defaultFacets"
@@ -143,4 +193,124 @@
</default-facets>
</extension>
+
+
+ <!--
+ ###################################################################################################################
+ ## ##
+ ## Geronimo Server Source Path ##
+ ## ##
+ ###################################################################################################################
+ -->
+ <extension-point id="sourcePathComputerMapping" name="Geronimo Deployment Plan Loader" schema="schema/sourcePathComputerMapping.exsd"/>
+
+ <extension point="org.eclipse.debug.core.launchConfigurationTypes">
+ <launchConfigurationType
+ id="org.apache.geronimo.st.v30.core.launchConfigurationType"
+ name="%geronimoLaunchConfigurationType"
+ delegate="org.apache.geronimo.st.v30.core.GeronimoLaunchConfigurationDelegate"
+ modes="run, debug, profile"
+ sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
+ sourcePathComputerId="org.apache.geronimo.st.v30.core.sourcePathComputer"/>
+ </extension>
+
+ <extension point="org.eclipse.debug.core.sourcePathComputers">
+ <sourcePathComputer
+ id="org.apache.geronimo.st.v30.core.sourcePathComputer"
+ class="org.apache.geronimo.st.v30.core.GeronimoSourcePathComputerDelegate"/>
+ </extension>
+
+
+
+ <!--
+ ###################################################################################################################
+ ## ##
+ ## Geronimo Server Launch Test ##
+ ## ##
+ ###################################################################################################################
+ -->
+ <extension point="org.eclipse.hyades.trace.ui.launchConfigMechanismAssociator">
+ <association
+ launchConfigID = "org.apache.geronimo.st.v30.core.launchConfigurationType">
+
+ <mechanism mechanismID = "org.eclipse.tptp.trace.ui.jvmpiMechanism">
+ <configuration
+ launchDelegate = "org.eclipse.tptp.trace.ui.internal.launcher.deleg.application.PIAttachLauncherDelegate"
+ configurationId = "org.eclipse.tptp.trace.ui.jvmpiConfiguration"
+ associatedAgent = "org.eclipse.tptp.trace.ui.jvmpiAgent"
+ filter = "org.eclipse.tptp.platform.profile.server.core.internal.PICollectorFiltration">
+ </configuration>
+ </mechanism>
+
+ <mechanism mechanismID = "org.eclipse.tptp.trace.jvmti.jvmtiMechanism">
+ <configuration
+ launchDelegate = "org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIAttachLauncherDelegate"
+ configurationId = "org.eclipse.tptp.trace.jvmti.tiConfiguration"
+ associatedAgent = "org.eclipse.tptp.platform.jvmti.TIAgent"
+ filter = "org.eclipse.tptp.platform.profile.server.core.internal.TICollectorFiltration">
+ </configuration>
+ </mechanism>
+ </association>
+ </extension>
+
+
+
+ <!--
+ ###################################################################################################################
+ ## ##
+ ## Run On Server - This extension point provides a way for a server to support the "Run on Server" scenario. ##
+ ## The id specifies a unique identifier for this extension point, and the class specifies the ##
+ ## fully qualified name of the Java class that extends LaunchableAdapterDelegate. ##
+ ## ##
+ ###################################################################################################################
+ -->
+ <extension point="org.eclipse.wst.server.core.launchableAdapters">
+ <launchableAdapter
+ class="org.apache.geronimo.st.v30.core.GeronimoLaunchableAdapterDelegate"
+ id="org.eclipse.jst.server.geronimo.web.30"/>
+ </extension>
+
+
+
+ <!--
+ ###################################################################################################################
+ ## ##
+ ## Import ##
+ ## ##
+ ###################################################################################################################
+ -->
+ <extension point="org.eclipse.wst.common.frameworks.OperationExtension"
+ id="GeronimoOpExtensions" name="GeronimoOpExtensions">
+ <operationExtension
+ id="org.eclipse.jst.j2ee.internal.web.archive.operations.WebComponentImportOperation"
+ postOperationClass="org.apache.geronimo.st.v30.core.operations.ImportDeploymentPlanOperation">
+ </operationExtension>
+ <operationExtension
+ id="org.eclipse.jst.j2ee.internal.ejb.archiveoperations.EJBComponentImportOperation"
+ postOperationClass="org.apache.geronimo.st.v30.core.operations.ImportDeploymentPlanOperation">
+ </operationExtension>
+ <operationExtension
+ id="org.eclipse.jst.j2ee.internal.archive.operations.EARComponentImportOperation"
+ postOperationClass="org.apache.geronimo.st.v30.core.operations.ImportDeploymentPlanOperation">
+ </operationExtension>
+ <operationExtension
+ id="org.eclipse.jst.j2ee.internal.jca.operations.ConnectorComponentImportOperation"
+ postOperationClass="org.apache.geronimo.st.v30.core.operations.ImportDeploymentPlanOperation">
+ </operationExtension>
+ </extension>
+
+
+
+ <!--
+ ###################################################################################################################
+ ## ##
+ ## Geronimo JAXB Utils ##
+ ## ##
+ ###################################################################################################################
+ -->
+ <extension-point id="JAXBUtilsProvider" name="Geronimo JAXB Utils" schema="schema/JAXBUtilsProvider.exsd"/>
+ <extension point="org.apache.geronimo.st.v30.core.JAXBUtilsProvider">
+ <provider class="org.apache.geronimo.st.v30.core.jaxb.JAXB21Utils" version="3.0"/>
+ </extension>
+
</plugin>
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/pom.xml?rev=939145&r1=939144&r2=939145&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/pom.xml Thu Apr 29 00:45:13 2010
@@ -139,12 +139,7 @@
</dependency>
<dependency>
<groupId>org.apache.geronimo.devtools</groupId>
- <artifactId>org.apache.geronimo.st.core</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.devtools</groupId>
- <artifactId>org.apache.geronimo.runtime.v30</artifactId>
+ <artifactId>org.apache.geronimo.jee.v21.jaxbmodel</artifactId>
<version>${version}</version>
</dependency>
<dependency>
@@ -154,7 +149,7 @@
</dependency>
<dependency>
<groupId>org.apache.geronimo.devtools</groupId>
- <artifactId>org.apache.geronimo.jee.v21.jaxbmodel</artifactId>
+ <artifactId>org.apache.geronimo.runtime.v30</artifactId>
<version>${version}</version>
</dependency>
</dependencies>
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/Activator.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/Activator.java?rev=939145&r1=939144&r2=939145&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/Activator.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/Activator.java Thu Apr 29 00:45:13 2010
@@ -17,6 +17,7 @@
package org.apache.geronimo.st.v30.core;
import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
import org.osgi.framework.BundleContext;
/**
@@ -26,45 +27,50 @@ import org.osgi.framework.BundleContext;
*/
public class Activator extends Plugin {
- // The plug-in ID
- public static final String PLUGIN_ID = "org.apache.geronimo.st.v21.core";
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.apache.geronimo.st.v30.core";
- // The shared instance
- private static Activator plugin;
+ // The shared instance
+ private static Activator plugin;
- /**
- * The constructor
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
+ /**
+ * The constructor
+ */
+ public Activator() {
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ public static void log(int severity, String message, Throwable throwable) {
+ if (plugin != null && plugin.getLog() != null) {
+ plugin.getLog().log(new Status(severity, PLUGIN_ID, 0, message, throwable));
+ }
+ }
}
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/ClasspathContainersHelper.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/ClasspathContainersHelper.java?rev=939145&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/ClasspathContainersHelper.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/ClasspathContainersHelper.java Thu Apr 29 00:45:13 2010
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.core;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import org.apache.geronimo.st.v30.core.internal.Trace;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+
+/**
+ *
+ * Helper class for ClasspathContainers support
+ *
+ * @version $Rev$ $Date$
+ */
+public class ClasspathContainersHelper {
+
+ //
+ // Query the workspace for the list of classpath containers and return as a
+ // sorted List<String> for display and for WTP to ultimately persist as server
+ // instance properties in servers.xml
+ //
+ public static List<String> queryWorkspace() {
+ Trace.tracePoint("ENTRY", "ClasspathContainersHelper.queryWorkspace");
+
+ ArrayList<String> containers = new ArrayList<String>();
+
+ IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+
+ for ( IProject project : projects ) {
+
+ try {
+
+ if ( project.getNature(JavaCore.NATURE_ID) != null ) {
+
+ IJavaProject javaProject = JavaCore.create(project);
+ IClasspathEntry[] cp = javaProject.getRawClasspath();
+
+ for ( IClasspathEntry cpEntry : cp ) {
+
+ if (cpEntry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
+ addEntry( containers, cpEntry.getPath().toString());
+ }
+ }
+ }
+ }
+ catch ( CoreException e ) {
+ e.printStackTrace();
+ }
+ }
+
+ Collections.sort( containers );
+ Trace.tracePoint("EXIT", "ClasspathContainersHelper.queryWorkspace", containers);
+ return containers;
+ }
+
+
+ //
+ // Query the workspace to find the classapth entries for a specific classpath container,
+ //
+ public static List<IClasspathEntry> queryWorkspace( String containerPath ) {
+ Trace.tracePoint("ENTRY", "ClasspathContainersHelper.queryWorkspace", containerPath );
+
+ List<IClasspathEntry> classpathEntries = new ArrayList<IClasspathEntry>();
+
+ IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+
+ for ( IProject project : projects ) {
+
+ try {
+
+ if ( project.getNature(JavaCore.NATURE_ID) !=null ) {
+
+ IJavaProject javaProject = JavaCore.create(project);
+ IClasspathEntry[] cp = javaProject.getRawClasspath();
+
+ for ( IClasspathEntry cpEntry : cp ) {
+
+ if (cpEntry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
+
+ if ( cpEntry.getPath().toString().equals( containerPath )) {
+
+ IClasspathContainer classpathContainer = JavaCore.getClasspathContainer(cpEntry.getPath(), javaProject);
+ IClasspathEntry[] containerEntries = classpathContainer.getClasspathEntries();
+
+ for (int ii = 0; ii < containerEntries.length; ii++) {
+ classpathEntries.add(containerEntries[ii]);
+ }
+ }
+ }
+ }
+ }
+ }
+ catch ( CoreException e ) {
+ e.printStackTrace();
+ }
+ }
+
+ Trace.tracePoint("EXIT", "ClasspathContainersHelper.queryWorkspace", classpathEntries);
+ return classpathEntries;
+ }
+
+
+ //
+ // Ensure no duplicates in the list
+ //
+ private static void addEntry( List<String> containers, String container ) {
+
+ if ( containers.indexOf( container ) < 0 ) {
+ containers.add( container );
+ }
+ }
+}
\ No newline at end of file
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/ClasspathContainersHelper.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/ClasspathContainersHelper.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/ClasspathContainersHelper.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/CommonMessages.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/CommonMessages.java?rev=939145&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/CommonMessages.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/CommonMessages.java Thu Apr 29 00:45:13 2010
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.core;
+
+import org.apache.geronimo.st.v30.core.internal.Messages;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class CommonMessages extends Messages {
+
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/CommonMessages.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/CommonMessages.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/CommonMessages.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentDescriptorUtils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentDescriptorUtils.java?rev=939145&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentDescriptorUtils.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentDescriptorUtils.java Thu Apr 29 00:45:13 2010
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.core;
+
+import org.apache.geronimo.st.v30.core.descriptor.AbstractDeploymentDescriptor;
+import org.apache.geronimo.st.v30.core.descriptor.ApplicationJ2EEDeploymentDescriptor;
+import org.apache.geronimo.st.v30.core.descriptor.ApplicationJavaEEDeploymentDescriptor;
+import org.apache.geronimo.st.v30.core.descriptor.EjbJ2EEDeploymentDescriptor;
+import org.apache.geronimo.st.v30.core.descriptor.EjbJavaEEDeploymentDescriptor;
+import org.apache.geronimo.st.v30.core.descriptor.WebJ2EEDeploymentDescriptor;
+import org.apache.geronimo.st.v30.core.descriptor.WebJavaEEDeploymentDescriptor;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.j2ee.model.IModelProvider;
+import org.eclipse.jst.j2ee.model.ModelProviderManager;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class DeploymentDescriptorUtils {
+ static final long serialVersionUID = 1L;
+
+ public static AbstractDeploymentDescriptor getDeploymentDescriptor(IProject project) {
+ IModelProvider mp = ModelProviderManager.getModelProvider(project);
+ Object obj = mp.getModelObject();
+ if (obj instanceof org.eclipse.jst.j2ee.webapplication.WebApp) {
+ return (new WebJ2EEDeploymentDescriptor((org.eclipse.jst.j2ee.webapplication.WebApp) obj));
+ }
+ else if (obj instanceof org.eclipse.jst.javaee.web.WebApp) {
+ return (new WebJavaEEDeploymentDescriptor((org.eclipse.jst.javaee.web.WebApp) obj));
+ }
+ else if (obj instanceof org.eclipse.jst.j2ee.application.Application) {
+ return (new ApplicationJ2EEDeploymentDescriptor((org.eclipse.jst.j2ee.application.Application) obj));
+ }
+ else if (obj instanceof org.eclipse.jst.javaee.application.Application) {
+ return (new ApplicationJavaEEDeploymentDescriptor((org.eclipse.jst.javaee.application.Application) obj));
+ }
+ else if (obj instanceof org.eclipse.jst.j2ee.ejb.EJBJar) {
+ return (new EjbJ2EEDeploymentDescriptor((org.eclipse.jst.j2ee.ejb.EJBJar) obj));
+ }
+ else if (obj instanceof org.eclipse.jst.javaee.ejb.EJBJar) {
+ return (new EjbJavaEEDeploymentDescriptor((org.eclipse.jst.javaee.ejb.EJBJar) obj));
+ }
+ return null;
+ }
+
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentDescriptorUtils.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentDescriptorUtils.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentDescriptorUtils.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentPlanInstallConfig.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentPlanInstallConfig.java?rev=939145&r1=939144&r2=939145&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentPlanInstallConfig.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentPlanInstallConfig.java Thu Apr 29 00:45:13 2010
@@ -26,25 +26,25 @@ import org.eclipse.wst.common.project.fa
* @version $Rev$ $Date$
*/
public class DeploymentPlanInstallConfig {
-
- private String groupId;
-
- private String artifactId;
-
- private String version;
-
- private String type;
-
- private boolean sharedLib;
-
+
+ private String groupId;
+
+ private String artifactId;
+
+ private String version;
+
+ private String type;
+
+ private boolean sharedLib;
+
public static final class Factory implements IActionConfigFactory
{
public Object create()
{
- Trace.tracePoint("Entry/Exit", "DeploymentPlanInstallConfig.create");
-
- enableGenerationDDByDefault();
-
+ Trace.tracePoint("Entry/Exit", "DeploymentPlanInstallConfig.create");
+
+ enableGenerationDDByDefault();
+
return new DeploymentPlanInstallConfig();
}
@@ -57,50 +57,50 @@ public class DeploymentPlanInstallConfig
private void enableGenerationDDByDefault(){
- J2EEPlugin.getDefault().getJ2EEPreferences().setValue(J2EEPreferences.Keys.APPLICATION_GENERATE_DD,true);
- J2EEPlugin.getDefault().getJ2EEPreferences().setValue(J2EEPreferences.Keys.DYNAMIC_WEB_GENERATE_DD,true);
- J2EEPlugin.getDefault().getJ2EEPreferences().setValue(J2EEPreferences.Keys.EJB_GENERATE_DD,true);
- J2EEPlugin.getDefault().getJ2EEPreferences().setValue(J2EEPreferences.Keys.APP_CLIENT_GENERATE_DD,true);
+ J2EEPlugin.getDefault().getJ2EEPreferences().setValue(J2EEPreferences.Keys.APPLICATION_GENERATE_DD,true);
+ J2EEPlugin.getDefault().getJ2EEPreferences().setValue(J2EEPreferences.Keys.DYNAMIC_WEB_GENERATE_DD,true);
+ J2EEPlugin.getDefault().getJ2EEPreferences().setValue(J2EEPreferences.Keys.EJB_GENERATE_DD,true);
+ J2EEPlugin.getDefault().getJ2EEPreferences().setValue(J2EEPreferences.Keys.APP_CLIENT_GENERATE_DD,true);
}
}
- public String getArtifactId() {
- return artifactId;
- }
-
- public void setArtifactId(String artifactId) {
- this.artifactId = artifactId;
- }
-
- public String getGroupId() {
- return groupId;
- }
-
- public void setGroupId(String groupId) {
- this.groupId = groupId;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public boolean isSharedLib() {
- return sharedLib;
- }
-
- public void setSharedLib(boolean sharedLib) {
- this.sharedLib = sharedLib;
- }
+ public String getArtifactId() {
+ return artifactId;
+ }
+
+ public void setArtifactId(String artifactId) {
+ this.artifactId = artifactId;
+ }
+
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public boolean isSharedLib() {
+ return sharedLib;
+ }
+
+ public void setSharedLib(boolean sharedLib) {
+ this.sharedLib = sharedLib;
+ }
}
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentStatusMessage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentStatusMessage.java?rev=939145&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentStatusMessage.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentStatusMessage.java Thu Apr 29 00:45:13 2010
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.core;
+
+import javax.enterprise.deploy.shared.ActionType;
+import javax.enterprise.deploy.shared.CommandType;
+import javax.enterprise.deploy.spi.status.DeploymentStatus;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class DeploymentStatusMessage {
+
+ private DeploymentStatus status;
+ private ActionType action;
+ private CommandType command;
+ private String message;
+
+ public DeploymentStatusMessage(DeploymentStatus status) {
+ this.status = status;
+ this.action = status.getAction();
+ this.command = status.getCommand();
+ this.message = status.getMessage();
+ }
+
+ public ActionType getAction() {
+ return action;
+ }
+
+ public CommandType getCommand() {
+ return command;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public DeploymentStatus getStatus() {
+ return status;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#toString()
+ *
+ * [ActionType CommandType] message
+ */
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("[").append(action).append(" ").append(command).append("] ").append(message);
+ return buffer.toString();
+ }
+
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentStatusMessage.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentStatusMessage.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentStatusMessage.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentUtils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentUtils.java?rev=939145&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentUtils.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentUtils.java Thu Apr 29 00:45:13 2010
@@ -0,0 +1,296 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.core;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.enterprise.deploy.spi.DeploymentManager;
+import javax.enterprise.deploy.spi.TargetModuleID;
+import javax.enterprise.deploy.spi.exceptions.TargetException;
+
+import org.apache.geronimo.st.v30.core.commands.DeploymentCommandFactory;
+import org.apache.geronimo.st.v30.core.commands.TargetModuleIdNotFoundException;
+import org.apache.geronimo.st.v30.core.internal.Trace;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jst.j2ee.application.internal.operations.AppClientComponentExportDataModelProvider;
+import org.eclipse.jst.j2ee.application.internal.operations.EARComponentExportDataModelProvider;
+import org.eclipse.jst.j2ee.application.internal.operations.J2EEComponentExportDataModelProvider;
+import org.eclipse.jst.j2ee.internal.ejb.project.operations.EJBComponentExportDataModelProvider;
+import org.eclipse.jst.j2ee.internal.jca.operations.ConnectorComponentExportDataModelProvider;
+import org.eclipse.jst.j2ee.internal.web.archive.operations.WebComponentExportDataModelProvider;
+import org.eclipse.jst.server.core.IEnterpriseApplication;
+import org.eclipse.jst.server.core.IWebModule;
+import org.eclipse.jst.server.core.PublishUtil;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.model.IModuleResource;
+import org.eclipse.wst.server.core.util.ProjectModule;
+import org.eclipse.wst.server.core.model.IModuleResourceDelta;
+import org.eclipse.wst.server.core.model.IModuleFile;
+import org.eclipse.wst.server.core.model.IModuleFolder;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class DeploymentUtils {
+
+ public static final IPath STATE_LOC = Activator.getDefault().getStateLocation();
+
+ private DeploymentUtils() {
+ }
+
+ public static IPath generateExplodedConfiguration(IModule module, IPath outputPath) {
+
+ IPath output = outputPath.append(module.getName() + getModuleExtension(module));
+ try {
+ IModuleResource[] resources = getModuleResources(module);
+ PublishUtil.publishSmart(resources, output, new NullProgressMonitor());
+ if(GeronimoUtils.isEarModule(module)) {
+ IEnterpriseApplication application = (IEnterpriseApplication) module.loadAdapter(IEnterpriseApplication.class, null);
+ if( application != null ){
+ IModule[] children = application.getModules();
+ for (int i = 0; i < children.length; i++) {
+ IModule child = children[i];
+ IPath childPath = output.append(child.getName() + getModuleExtension(child));
+ IModuleResource[] childResources = getModuleResources(child);
+ PublishUtil.publishSmart(childResources, childPath, new NullProgressMonitor());
+ if(GeronimoUtils.isWebModule(child)) {
+ IWebModule webModule = (IWebModule) module.loadAdapter(IWebModule.class, null);
+ IModule[] libs = webModule.getModules();
+ IPath webLibPath = childPath.append("WEB-INF").append("lib");
+ for(int j = 0; j < libs.length; j++) {
+ IModule lib = libs[j];
+ IModuleResource[] libResources = getModuleResources(lib);
+ PublishUtil.publishSmart(libResources, webLibPath.append(lib.getName() + getModuleExtension(lib)), new NullProgressMonitor());
+ }
+ }
+ }
+ }
+ }
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+
+ return output;
+ }
+
+ public static IModuleResource[] getModuleResources(IModule module) throws CoreException {
+ ProjectModule pm = (ProjectModule)module.loadAdapter(ProjectModule.class, null);
+ if (pm != null) {
+ return pm.members();
+ }
+ return null;
+ }
+
+ private static String getModuleExtension(IModule module) {
+ if(GeronimoUtils.isEarModule(module)) {
+ return ".ear";
+ }else if(GeronimoUtils.isWebModule(module)) {
+ return ".war";
+ }else if(GeronimoUtils.isRARModule(module)) {
+ return ".rar";
+ }else if(GeronimoUtils.isAppClientModule(module)) {
+ return ".car";
+ }
+
+ return ".jar";
+ }
+
+ public static File createJarFile(IModule module, IPath outputPath) {
+ IDataModel model = getExportDataModel(module);
+
+ if (model != null) {
+
+ IVirtualComponent comp = ComponentCore.createComponent(module.getProject());
+
+ //Here, specific extension name should be got, in case module has no standard JEE descriptor file included
+ String extensionName = getModuleExtension(module);
+
+ model.setProperty(J2EEComponentExportDataModelProvider.PROJECT_NAME, module.getProject());
+ model.setProperty(J2EEComponentExportDataModelProvider.ARCHIVE_DESTINATION, outputPath.append(module.getName())
+ + extensionName);
+
+ model.setProperty(J2EEComponentExportDataModelProvider.COMPONENT, comp);
+ model.setBooleanProperty(J2EEComponentExportDataModelProvider.OVERWRITE_EXISTING, true);
+ model.setBooleanProperty(J2EEComponentExportDataModelProvider.RUN_BUILD, false);
+
+ if (model != null) {
+ try {
+ model.getDefaultOperation().execute(null, null);
+ return new File(model.getStringProperty(J2EEComponentExportDataModelProvider.ARCHIVE_DESTINATION));
+ } catch (ExecutionException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ return null;
+ }
+
+ public static IDataModel getExportDataModel(IModule module) {
+ String type = module.getModuleType().getId();
+ if (IModuleConstants.JST_WEB_MODULE.equals(type)) {
+ return DataModelFactory.createDataModel(new WebComponentExportDataModelProvider());
+ } else if (IModuleConstants.JST_EJB_MODULE.equals(type)) {
+ return DataModelFactory.createDataModel(new EJBComponentExportDataModelProvider());
+ } else if (IModuleConstants.JST_EAR_MODULE.equals(type)) {
+ return DataModelFactory.createDataModel(new EARComponentExportDataModelProvider());
+ } else if (IModuleConstants.JST_CONNECTOR_MODULE.equals(type)) {
+ return DataModelFactory.createDataModel(new ConnectorComponentExportDataModelProvider());
+ } else if (IModuleConstants.JST_APPCLIENT_MODULE.equals(type)) {
+ return DataModelFactory.createDataModel(new AppClientComponentExportDataModelProvider());
+ }
+ return null;
+ }
+
+ public static TargetModuleID getTargetModuleID(IServer server, IModule module) throws TargetModuleIdNotFoundException {
+ String configId = ModuleArtifactMapper.getInstance().resolve(server, module);
+ if(configId == null) {
+ throw new TargetModuleIdNotFoundException("Could not do a local TargetModuleID lookup for module " + module.getName());
+ }
+
+ IGeronimoServer gs = (IGeronimoServer) server.getAdapter(IGeronimoServer.class);
+ return gs.getVersionHandler().createTargetModuleId(configId);
+ }
+
+ public static TargetModuleID getTargetModuleID(DeploymentManager dm, String configId) throws TargetModuleIdNotFoundException {
+
+ try {
+ TargetModuleID id = isInstalledModule(dm,configId);
+ if (id!=null) return id;
+ } catch (IllegalStateException e) {
+ e.printStackTrace();
+ } catch (TargetException e) {
+ e.printStackTrace();
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+
+ throw new TargetModuleIdNotFoundException("Could not find TargetModuleID with configId " + configId);
+ }
+
+ /**
+ * This method determines the last known config id for an IModule that has been deployed to the server. The
+ * configId from the plan cannot be used as the project may have been previously deployed with a different
+ * configId. In which case the lookup is done through the ModuleArtifactMapper first.
+ *
+ * @param module
+ * @param server
+ * @return For a given module associated with a given server, this method returns the last known configuration id.
+ * @throws Exception
+ */
+ public static String getLastKnownConfigurationId(IModule module, IServer server) throws Exception {
+
+ IGeronimoServer gs = (IGeronimoServer) server.getAdapter(IGeronimoServer.class);
+ String currentId = gs.getVersionHandler().getConfigID(module);
+ String publishedId = ModuleArtifactMapper.getInstance().resolve(server, module);
+ String query = publishedId != null ? publishedId : currentId;
+
+ Trace.trace(Trace.INFO, "currentConfigId = " + currentId + " previousConfigId = " + publishedId);
+
+ DeploymentManager dm = DeploymentCommandFactory.getDeploymentManager(server);
+
+ try {
+ getTargetModuleID(dm, query);
+ return query;
+ } catch (TargetModuleIdNotFoundException e) {
+ Trace.trace(Trace.INFO, e.getMessage());
+ }
+
+ if(query != currentId) {
+ try {
+ getTargetModuleID(dm, currentId);
+ return currentId;
+ } catch (TargetModuleIdNotFoundException e) {
+ Trace.trace(Trace.INFO, e.getMessage());
+ }
+ }
+
+ return null;
+ }
+
+
+ public static List<IModuleResourceDelta> getAffectedJSPFiles(IModuleResourceDelta delta) {
+ if (delta == null) return null;
+
+ IModuleResource resource = delta.getModuleResource();
+ List<IModuleResourceDelta> fileList = new ArrayList<IModuleResourceDelta>();
+
+ if (resource instanceof IModuleFile) {
+ IModuleFile moduleFile = (IModuleFile)resource;
+ if (moduleFile.getName().endsWith(".jsp")) {
+ fileList.add(delta);
+ }
+ else return null; //not only jsp changed
+ }
+ else if (resource instanceof IModuleFolder) {
+ IModuleResourceDelta[] deltaArray = delta.getAffectedChildren();
+ for (IModuleResourceDelta childDelta : deltaArray) {
+ List<IModuleResourceDelta> deltaChildren = getAffectedJSPFiles(childDelta);
+ if (deltaChildren != null) fileList.addAll(deltaChildren);
+ else return null;
+ }
+ }
+
+ return fileList;
+ }
+
+ public static boolean isInstalledModule(IServer server, String configId) {
+ DeploymentManager dm;
+ try {
+ dm = DeploymentCommandFactory.getDeploymentManager(server);
+ TargetModuleID id=isInstalledModule(dm,configId);
+ if (id==null) return false;
+ else return true;
+ } catch (CoreException e) {
+ e.printStackTrace();
+ return false;
+ } catch (IllegalStateException e) {
+ e.printStackTrace();
+ return false;
+ } catch (TargetException e) {
+ e.printStackTrace();
+ return false;
+ }
+
+ }
+
+ private static TargetModuleID isInstalledModule(DeploymentManager dm, String configId) throws CoreException, IllegalStateException, TargetException{
+
+ TargetModuleID[] ids = dm.getAvailableModules(null, dm.getTargets());
+ if(ids == null) return null;
+ if (ids != null) {
+ for (int i = 0; i < ids.length; i++) {
+ if (ids[i].getModuleID().equals(configId)) {
+ Trace.trace(Trace.INFO, "Found configuration " + configId + " on server.");
+ return ids[i];
+ }
+ }
+ }
+ return null;
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentUtils.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentUtils.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentUtils.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoConnectionFactory.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoConnectionFactory.java?rev=939145&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoConnectionFactory.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoConnectionFactory.java Thu Apr 29 00:45:13 2010
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.core;
+
+import java.util.HashMap;
+import java.util.Iterator;
+
+import javax.enterprise.deploy.spi.DeploymentManager;
+import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException;
+import javax.enterprise.deploy.spi.factories.DeploymentFactory;
+import javax.naming.Context;
+
+import org.apache.geronimo.st.v30.core.internal.Trace;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.ServerCore;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class GeronimoConnectionFactory {
+
+ private HashMap connections = new HashMap();
+
+ private static GeronimoConnectionFactory instance;
+
+ private GeronimoConnectionFactory() {
+ super();
+ }
+
+ public static GeronimoConnectionFactory getInstance() {
+ if (instance == null) {
+ instance = new GeronimoConnectionFactory();
+ }
+ return instance;
+ }
+
+ public DeploymentManager getDeploymentManager(IServer server)
+ throws DeploymentManagerCreationException {
+
+ System.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory");
+ DeploymentManager dm = (DeploymentManager) connections.get(server.getId());
+
+ if (dm == null) {
+ DeploymentFactory factory = getGeronimoServer(server).getDeploymentFactory();
+ String deployerURL = getGeronimoServer(server).getDeployerURL();
+ Trace.trace(Trace.INFO, "DeployerURL: " + deployerURL);
+ String user = getGeronimoServer(server).getAdminID();
+ String pw = getGeronimoServer(server).getAdminPassword();
+ dm = factory.getDeploymentManager(deployerURL, user, pw);
+ connections.put(server.getId(), dm);
+ }
+
+ getGeronimoServer(server).configureDeploymentManager(dm);
+
+ return dm;
+ }
+
+ private IGeronimoServer getGeronimoServer(IServer server) {
+ IGeronimoServer gServer = (IGeronimoServer) server.getAdapter(IGeronimoServer.class);
+ if (gServer == null) {
+ gServer = (IGeronimoServer) server.loadAdapter(IGeronimoServer.class, new NullProgressMonitor());
+ }
+ return gServer;
+ }
+
+ public IGeronimoServer getGeronimoServer(DeploymentManager dm) {
+ if (dm != null && connections.containsValue(dm)) {
+ Iterator i = connections.keySet().iterator();
+ while (i.hasNext()) {
+ String serverId = (String) i.next();
+ Object o = connections.get(serverId);
+ if (dm.equals(o)) {
+ IServer server = ServerCore.findServer(serverId);
+ if (server != null)
+ return getGeronimoServer(server);
+ }
+ }
+ }
+ return null;
+ }
+
+ public void destroy(IServer server) {
+ Trace.trace(Trace.INFO, "deploymentManager destroy");
+ connections.remove(server.getId());
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoConnectionFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoConnectionFactory.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoConnectionFactory.java
------------------------------------------------------------------------------
svn:mime-type = text/plain