geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r921247 [2/11] - in /geronimo/devtools/eclipse-plugin/trunk: ./ features/org.apache.geronimo.v30.feature/ plugins/org.apache.geronimo.runtime.v30/ plugins/org.apache.geronimo.runtime.v30/META-INF/ plugins/org.apache.geronimo.st.v30.core/ pl...
Date Wed, 10 Mar 2010 08:31:32 GMT
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/LICENSE.txt
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/LICENSE.txt?rev=921247&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/LICENSE.txt (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/LICENSE.txt Wed Mar 10 08:31:28 2010
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/LICENSE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/LICENSE.txt
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/LICENSE.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 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=921247&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/META-INF/MANIFEST.MF (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/META-INF/MANIFEST.MF Wed Mar 10 08:31:28 2010
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.apache.geronimo.st.v30.core;singleton:=true
+Bundle-Version: 3.0.0
+Bundle-Activator: org.apache.geronimo.st.v21.core.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.jst.j2ee,
+ org.apache.geronimo.runtime.v30,
+ org.apache.geronimo.st.core,
+ org.apache.geronimo.jee.v21.jaxbmodel,
+ org.eclipse.core.runtime,
+ org.eclipse.wst.server.core,
+ org.eclipse.debug.core,
+ org.eclipse.wst.common.project.facet.core,
+ org.eclipse.jst.common.frameworks,
+ org.eclipse.wst.common.modulecore
+Bundle-ActivationPolicy: lazy
+Export-Package: 
+ org.apache.geronimo.st.v21.core,
+ org.apache.geronimo.st.v21.core.internal,
+ org.apache.geronimo.st.v21.core.jaxb,
+ org.apache.geronimo.st.v21.core.operations
+Import-Package: junit.framework;version="3.8.2"

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/NOTICE.txt
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/NOTICE.txt?rev=921247&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/NOTICE.txt (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/NOTICE.txt Wed Mar 10 08:31:28 2010
@@ -0,0 +1,12 @@
+Apache Geronimo 
+Copyright 2003-2010 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+Portions of the Eclipse Geronimo Server Adapter were originally developed by
+International Business Machines Corporation and are
+licensed to the Apache Software Foundation under the
+"Software Grant and Corporate Contribution License Agreement",
+informally known as the "Eclipse Geronimo Server Adapter CLA".
+

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/NOTICE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/NOTICE.txt
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/NOTICE.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/about.ini
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/about.ini?rev=921247&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/about.ini (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/about.ini Wed Mar 10 08:31:28 2010
@@ -0,0 +1,38 @@
+#
+# 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.
+#
+# $Rev: 583586 $ $Date: 2007-10-10 15:29:32 -0400 (Wed, 10 Oct 2007) $
+#
+
+#
+# Property "aboutText" contains blurb for feature details in the "About" 
+# dialog.  Maximum 15 lines and 75 characters per line.
+#
+aboutText=Apache Geronimo v3.0 Server Adapter\n\
+Version: ${pom.version}-${buildNumber}\n\
+\n\
+(c) Copyright 2003-2010 The Apache Software Foundation\n\
+Visit http://www.apache.org/licenses/LICENSE-2.0.txt for additional details\n\
+\n\
+Visit http://geronimo.apache.org/development-tools.html\n\
+\n\
+This product includes software developed by the\n\
+Apache Software Foundation http://www.apache.org/
+
+#
+# Property "featureImage" contains path to feature image (32x32)
+#
+featureImage=G-logo-32x32.gif

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/plugin.properties
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/plugin.properties?rev=921247&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/plugin.properties (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/plugin.properties Wed Mar 10 08:31:28 2010
@@ -0,0 +1,35 @@
+#
+# 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.
+#
+# $Rev$ $Date$
+#
+pluginName=Geronimo v3.0 Server Adapter
+providerName=Apache Software Foundation
+
+runtimeTypeName=Apache Geronimo v3.0
+runtimeTypeDescription=Apache Geronimo v3.0 supports Java EE 6.0.
+runtimeTypeVendor=Apache
+
+serverTypeName=Apache Geronimo v3.0 Server
+serverTypeDescription=Apache Geronimo v3.0 Server
+
+serverRootDirectory=Application Server Directory:
+port=Port:
+rmiport=RMI Naming Port:
+ejbport=EJB Port:
+adminId=Ad&ministrator Id:
+adminPassword=Administrator Password:
+classPath=Classpath Variable:

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/plugin.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/plugin.properties
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/plugin.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 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=921247&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/plugin.xml (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/plugin.xml Wed Mar 10 08:31:28 2010
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<!--
+  ~ 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.
+  -->
+
+<!-- $Rev$ $Date$ -->
+
+<plugin>
+
+
+    <!-- 
+     | 
+     | Extend WTP runtimeTypes to include the 2.1 version of the "Geronimo Runtime Type"
+     | 
+     -->
+    <extension point="org.eclipse.wst.server.core.runtimeTypes">
+        <runtimeType id="org.apache.geronimo.runtime.21" version="2.1"
+            name="%runtimeTypeName"
+            description="%runtimeTypeDescription"
+            vendor="%runtimeTypeVendor"
+            class="org.apache.geronimo.st.v21.core.GeronimoRuntime">
+            <moduleType types="jst.web"       versions="2.2, 2.3, 2.4, 2.5"/>
+            <moduleType types="jst.ejb"       versions="1.1, 2.0, 2.1, 3.0"/>
+            <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.appclient" versions="1.2, 1.3, 1.4, 5.0"/>
+        </runtimeType>
+    </extension>
+    
+
+    <!-- ======================================================================================= -->
+    <!--                                                                                         -->
+    <!-- Extend WTP serverTypes so that the new Geronimo server type can be asociated with the   -->
+    <!-- new Geronimo runtime type (defined above)                                               -->
+    <!--                                                                                         -->
+    <!-- ======================================================================================= -->
+    <extension point="org.eclipse.wst.server.core.serverTypes">
+        <serverType id="org.apache.geronimo.server.21"
+            name="%serverTypeName"
+            description="%serverTypeDescription"
+            runtime="true"
+            class="org.apache.geronimo.st.v21.core.GeronimoServer"
+            initialState="stopped"
+            supportsRemoteHosts="true"
+            startTimeout="240000"
+            stopTimeout="30000"
+            startBeforePublish="true"
+            runtimeTypeId="org.apache.geronimo.runtime.21"
+            launchConfigId="org.apache.geronimo.st.core.launchConfigurationType"
+            behaviourClass="org.apache.geronimo.st.v21.core.GeronimoServerBehaviour"
+            hasConfiguration="false"
+            launchModes="run,debug,profile">
+        </serverType>
+    </extension>
+    
+    
+    <!-- ======================================================================================= -->
+    <!--                                                                                         -->
+    <!-- Map the runtime-component (defined in plugins\org.apache.geronimo.st.core\plugin.xml)   -->
+    <!-- to the new Geronimo runtime type (defined above)                                        -->
+    <!--                                                                                         -->
+    <!-- ======================================================================================= -->
+    <extension point="org.eclipse.jst.server.core.runtimeFacetMappings">
+        <runtimeFacetMapping
+            runtimeTypeId="org.apache.geronimo.runtime.21"
+            runtime-component="org.apache.geronimo.runtime" version="2.1"/>
+    </extension>
+    
+
+    <!-- 
+     | 
+     | Declare the 1.2 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.2">
+            <action type="install" id="geronimo.plan.install.v21">
+                <delegate class="org.apache.geronimo.st.v21.core.operations.GeronimoV21FacetInstallDelegate"/>
+                <config-factory class="org.apache.geronimo.st.v21.core.DeploymentPlanInstallConfig$Factory"/>
+            </action>
+            <constraint>
+                <or>
+                    <requires facet="jst.ear" version="1.2"/>
+                    <requires facet="jst.ear" version="1.3"/>
+                    <requires facet="jst.ear" version="1.4"/>
+                    <requires facet="jst.ear" version="1.4"/>
+                    <requires facet="jst.ear" version="5.0"/>
+                    <requires facet="jst.appclient" version="1.2"/>
+                    <requires facet="jst.appclient" version="1.3"/>
+                    <requires facet="jst.appclient" version="1.4"/>
+                    <requires facet="jst.appclient" version="5.0"/>
+                    <requires facet="jst.connector" version="1.0"/>
+                    <requires facet="jst.connector" version="1.5"/>
+                    <requires facet="jst.ejb" version="1.1"/>
+                    <requires facet="jst.ejb" version="2.0"/>
+                    <requires facet="jst.ejb" version="2.1"/>
+                    <requires facet="jst.ejb" version="3.0"/>
+                    <requires facet="jst.web" version="2.2"/>
+                    <requires facet="jst.web" version="2.3"/>
+                    <requires facet="jst.web" version="2.4"/>
+                    <requires facet="jst.web" version="2.5"/>
+                    <requires facet="jst.utility" version="1.0"/>
+                </or>
+            </constraint>
+        </project-facet-version>
+    </extension>
+    
+
+    <!-- 
+     |
+     | Map the <runtime-component> (defined in org.apache.geronimo.st.core\plugin.xml) 
+     | 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"
+        name="Geronimo Default Facets">
+        <default-facets>
+            <runtime-component id="org.apache.geronimo.runtime" version="2.1"/>
+            <facet id="org.apache.geronimo.facet" version="1.2"/>
+        </default-facets>
+    </extension>
+
+</plugin>

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/plugin.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/plugin.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 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=921247&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/pom.xml (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/pom.xml Wed Mar 10 08:31:28 2010
@@ -0,0 +1,168 @@
+<!--
+  ~ 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.
+  -->
+<!-- $Rev$ $Date$ -->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.apache.geronimo.st.v30.core</artifactId>
+    <packaging>jar</packaging>
+    <name>${artifactId}</name>
+    <parent>
+        <groupId>org.apache.geronimo.devtools</groupId>
+        <artifactId>eclipse-plugins-parent</artifactId>
+        <version>3.0.0</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <build>
+        <resources>
+            <resource>
+                <directory>..</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>about.html</include>
+                </includes>
+            </resource>
+
+            <resource>
+                <directory>.</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>plugin.xml</include>
+                    <include>plugin.properties</include>
+                    <include>.options</include>
+                    <include>about.ini</include>
+                </includes>
+            </resource>
+
+            <!--
+             |
+             | GERONIMODEVTOOLS-482: Ensure filtering is not used on a binary resource 
+             | as it may get inadvertently altered
+             |
+             -->
+            <resource>
+                <directory>.</directory>
+                <includes>
+                    <include>G-logo-32x32.gif</include>
+                </includes>
+            </resource>
+
+            <!-- The Geronimo covention puts license and notice for artifacts shipped in this jar 
+                 in the jar's meta-inf directory -->
+            <resource>
+                <targetPath>META-INF</targetPath>
+                <directory>.</directory>
+                <includes>
+                    <include>LICENSE.txt</include>
+                    <include>NOTICE.txt</include>
+                </includes>
+            </resource>
+
+            <!-- GERONIMODEVTOOLS-406 Display license and notice in Eclipse Update Manager 
+                   See also http://www.eclipse.org/legal/guidetolegaldoc.php
+                   about.html references about_files to show licenses and notices to the user
+                   at install time using Eclipse Update Manager, and after install.
+                -->
+            <resource>
+                <targetPath>about_files</targetPath>
+                <directory>.</directory>
+                <includes>
+                    <include>LICENSE.txt</include>
+                    <include>NOTICE.txt</include>
+                </includes>
+            </resource>
+
+            <resource>
+                <targetPath>about_files</targetPath>
+                <directory>../..</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>PLUGIN_RELEASE-NOTES-${pom.version}.txt</include>
+                </includes>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.geronimo.devtools</groupId>
+                <artifactId>maven-eclipsepde-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+            </plugin>
+           <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                  <execution>
+                    <goals>
+                      <goal>sign</goal>
+                    </goals>
+                  </execution>
+                </executions>
+                <configuration>
+                  <keystore>../../${keystoreFile}</keystore>
+                  <alias>${keystoreAlias}</alias>
+                  <storepass>${keystoreStorepass}</storepass>
+                  <keypass>${keystoreKeypass}</keypass>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <artifactId>maven-clean-plugin</artifactId>
+                <configuration>
+                    <filesets>
+                        <fileset>
+                            <directory>${pom.basedir}</directory>
+                            <includes>
+                                <include>bin</include>
+                            </includes>
+                        </fileset>
+                    </filesets>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.devtools</groupId>
+            <artifactId>eclipse</artifactId>
+            <version>${version}</version>
+            <type>pom</type>
+        </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>
+            <version>${version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.devtools</groupId>
+            <artifactId>org.apache.geronimo.runtime.common</artifactId>
+            <version>${version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.devtools</groupId>
+            <artifactId>org.apache.geronimo.jee.v21.jaxbmodel</artifactId>
+            <version>${version}</version>
+        </dependency>
+    </dependencies>
+</project>

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 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=921247&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/Activator.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/Activator.java Wed Mar 10 08:31:28 2010
@@ -0,0 +1,70 @@
+/*
+ * 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.v21.core;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ *
+ * @version $Rev$ $Date$
+ */
+public class Activator extends Plugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.apache.geronimo.st.v21.core";
+
+	// 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;
+	}
+	
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/Activator.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/Activator.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/Activator.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/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=921247&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentPlanInstallConfig.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentPlanInstallConfig.java Wed Mar 10 08:31:28 2010
@@ -0,0 +1,106 @@
+/*
+ * 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.v21.core;
+
+import org.apache.geronimo.st.v21.core.internal.Trace;
+import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
+import org.eclipse.jst.j2ee.internal.plugin.J2EEPreferences;
+import org.eclipse.wst.common.project.facet.core.IActionConfigFactory;
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class DeploymentPlanInstallConfig {
+	
+	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();
+        	
+            return new DeploymentPlanInstallConfig();
+        }
+        
+        /*
+         * by default, WTP won't generate deployment descriptor for all the projects(only true for web project).
+         * Try to generate deployment descriptor by default for all projects, the default value are set here
+         * 
+         * reference to J2EEPreferences.java in org.eclipse.jst.j2ee bundle
+         */
+        
+        
+        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);
+        }
+    }
+
+	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;
+	}
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/DeploymentPlanInstallConfig.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/DeploymentPlanInstallConfig.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/DeploymentPlanInstallConfig.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/GeronimoRuntime.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/GeronimoRuntime.java?rev=921247&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoRuntime.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoRuntime.java Wed Mar 10 08:31:28 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.v21.core;
+
+import org.apache.geronimo.st.core.GeronimoRuntimeDelegate;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class GeronimoRuntime extends GeronimoRuntimeDelegate {
+
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoRuntime.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/GeronimoRuntime.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/GeronimoRuntime.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/GeronimoServer.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/GeronimoServer.java?rev=921247&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServer.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServer.java Wed Mar 10 08:31:28 2010
@@ -0,0 +1,206 @@
+/*
+ * 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.v21.core;
+
+import java.io.File;
+import javax.enterprise.deploy.spi.DeploymentManager;
+import javax.enterprise.deploy.spi.factories.DeploymentFactory;
+
+import org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryImpl;
+import org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager;
+import org.apache.geronimo.st.core.GeronimoRuntimeDelegate;
+import org.apache.geronimo.st.core.GeronimoServerDelegate;
+import org.apache.geronimo.st.core.IGeronimoVersionHandler;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.jdt.launching.LibraryLocation;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.util.SocketUtil;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class GeronimoServer extends GeronimoServerDelegate {
+
+    public static final String PROPERTY_IN_PLACE_SHARED_LIB = "inPlaceSharedLib";
+    public static final String PROPERTY_RUN_FROM_WORKSPACE = "runFromWorkspace";
+
+    private static IGeronimoVersionHandler versionHandler = null;
+
+    private static DeploymentFactory deploymentFactory;
+
+    static {
+        deploymentFactory = new DeploymentFactoryImpl();
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.st.core.GenericGeronimoServer#getContextRoot(org.eclipse.wst.server.core.IModule)
+     */
+    public String getContextRoot(IModule module) throws Exception {
+        return GeronimoV21Utils.getContextRoot(module);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.geronimo.st.core.IGeronimoServer#getDeployerURL()
+     */
+    public String getDeployerURL() {
+        return "deployer:geronimo:jmx://" + getServer().getHost() + ":" + getRMINamingPort();
+    }
+
+    @Override
+    public String getVMArgs() {
+        String superVMArgs = super.getVMArgs();
+        if (superVMArgs != null && superVMArgs.trim().length() > 0) {
+            return superVMArgs;
+        }
+
+        String runtimeLocation = getServer().getRuntime().getLocation().toString();
+        GeronimoRuntimeDelegate geronimoRuntimeDelegate = (GeronimoRuntimeDelegate) getServer().getRuntime().getAdapter(GeronimoRuntimeDelegate.class);
+        if (geronimoRuntimeDelegate == null) {
+            geronimoRuntimeDelegate = (GeronimoRuntimeDelegate) getServer().getRuntime().loadAdapter(GeronimoRuntimeDelegate.class,new NullProgressMonitor());
+        }
+        IVMInstall vmInstall = geronimoRuntimeDelegate.getVMInstall();
+
+        LibraryLocation[] libLocations = JavaRuntime.getLibraryLocations(vmInstall);
+        IPath vmLibDir = null;
+        for(int i = 0; i < libLocations.length; i++) {
+            LibraryLocation loc = libLocations[i];
+            IPath libDir = loc.getSystemLibraryPath().removeLastSegments(2);
+            if(libDir.toOSString().endsWith("lib")) {
+                vmLibDir = libDir;
+                break;
+            }
+        }
+
+        String cp = System.getProperty("path.separator");
+
+        //-javaagent:"GERONIMO_BASE/bin/jpa.jar"
+        String javaagent = "";
+        File jpaJar = new File(runtimeLocation + "/bin/jpa.jar");
+        if (jpaJar.exists()) {
+            javaagent = "-javaagent:\"" + runtimeLocation + "/bin/jpa.jar\"";
+        }
+
+        //-Djava.ext.dirs="GERONIMO_BASE/lib/ext;JRE_HOME/lib/ext"
+        String javaExtDirs = "-Djava.ext.dirs=\"" + runtimeLocation + "/lib/ext" + cp + vmLibDir.append("ext").toOSString() + "\"";
+
+        //-Djava.endorsed.dirs="GERONIMO_BASE/lib/endorsed;JRE_HOME/lib/endorsed"
+        String javaEndorsedDirs = "-Djava.endorsed.dirs=\"" + runtimeLocation + "/lib/endorsed" + cp + vmLibDir.append("endorsed").toOSString() + "\"";
+
+        // Specify the minimum memory options for the Geronimo server
+        String memoryOpts = "-Xms256m -Xmx512m -XX:MaxPermSize=128m";
+
+        // Specify GERONIMO_BASE
+        String homeDirectory = "-Dorg.apache.geronimo.home.dir=\"" + runtimeLocation;
+
+        return javaagent + " " + javaExtDirs + " " + javaEndorsedDirs + " " + memoryOpts + " " + homeDirectory;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.geronimo.st.core.IGeronimoServer#getJMXServiceURL()
+     */
+    public String getJMXServiceURL() {
+        String host = getServer().getHost();
+        return "service:jmx:rmi://" + host + "/jndi/rmi://" + host + ":" + getRMINamingPort() + "/JMXConnector";
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.geronimo.st.core.IGeronimoServer#getJSR88DeployerJar()
+     */
+    public IPath getJSR88DeployerJar() {
+        return getServer().getRuntime().getLocation().append("/lib/jsr88-deploymentfactory.jar");
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.geronimo.st.core.IGeronimoServer#getDeploymentFactory()
+     */
+    public DeploymentFactory getDeploymentFactory() {
+        return deploymentFactory;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.geronimo.st.core.IGeronimoServer#configureDeploymentManager(javax.enterprise.deploy.spi.DeploymentManager)
+     */
+    public void configureDeploymentManager(DeploymentManager dm) {
+        ((JMXDeploymentManager) dm).setLogConfiguration(true, true);
+        boolean enableInPlace = SocketUtil.isLocalhost(getServer().getHost()) && isRunFromWorkspace();
+        setInPlaceDeployment(dm, enableInPlace);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.geronimo.st.core.IGeronimoServer#getVersionHandler()
+     */
+    public IGeronimoVersionHandler getVersionHandler() {
+        if (versionHandler == null)
+            versionHandler = new GeronimoV21VersionHandler();
+        return versionHandler;
+    }
+
+    public void setInPlaceDeployment(DeploymentManager dm, boolean enable) {
+        ((JMXDeploymentManager) dm).setInPlace(enable);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.st.core.IGeronimoServer#isInPlace()
+     */
+    public boolean isInPlaceSharedLib() {
+        return getAttribute(PROPERTY_IN_PLACE_SHARED_LIB, false);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.st.core.IGeronimoServer#isRunFromWorkspace()
+     */
+    public boolean isRunFromWorkspace() {
+        return getAttribute(PROPERTY_RUN_FROM_WORKSPACE, false);
+    }
+
+    public void setInPlaceSharedLib(boolean enable) {
+        setAttribute(PROPERTY_IN_PLACE_SHARED_LIB, enable);
+    }
+
+    public void setRunFromWorkspace(boolean enable) {
+        setAttribute(PROPERTY_RUN_FROM_WORKSPACE, enable);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.st.core.GeronimoServerDelegate#setDefaults(org.eclipse.core.runtime.IProgressMonitor)
+     */
+    public void setDefaults(IProgressMonitor monitor) {
+        super.setDefaults(monitor);
+        setInPlaceSharedLib(false);
+        setRunFromWorkspace(false);
+    }
+
+    public boolean isNotRedeployJSPFiles() {
+        return getAttribute(PROPERTY_NOT_REDEPLOY_JSP_FILES,false);
+    }
+}
\ 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/GeronimoServer.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/GeronimoServer.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/GeronimoServer.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/GeronimoServerBehaviour.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/GeronimoServerBehaviour.java?rev=921247&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviour.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviour.java Wed Mar 10 08:31:28 2010
@@ -0,0 +1,235 @@
+/*
+ * 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.v21.core;
+
+import java.net.URL;
+import java.util.List;
+import java.util.Set;
+
+import javax.management.MBeanServerConnection;
+import javax.naming.directory.NoSuchAttributeException;
+
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.InternalKernelException;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.config.Configuration;
+import org.apache.geronimo.kernel.config.InvalidConfigException;
+import org.apache.geronimo.kernel.config.PersistentConfigurationList;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.st.core.Activator;
+import org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate;
+import org.apache.geronimo.st.core.internal.DependencyHelper;
+import org.apache.geronimo.st.v21.core.internal.Trace;
+import org.apache.geronimo.system.jmx.KernelDelegate;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.internal.IModulePublishHelper;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class GeronimoServerBehaviour extends GeronimoServerBehaviourDelegate implements IModulePublishHelper {
+
+	private Kernel kernel = null;
+
+	public GeronimoServerBehaviour() {
+		super();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate#stopKernel()
+	 */
+	protected void stopKernel() {
+		if (kernel != null) {
+			kernel.shutdown();
+			kernel = null;
+		}
+	}
+
+	/**
+	 * @return
+	 * @throws SecurityException
+	 */
+	protected Kernel getKernel() throws SecurityException {
+		if (kernel == null) {
+			try {
+				MBeanServerConnection connection = getServerConnection();
+				if (connection != null)
+					kernel = new KernelDelegate(connection);
+			} catch (SecurityException e) {
+				throw e;
+			} catch (Exception e) {
+				Trace.trace(Trace.WARNING, "Kernel connection failed. "
+						+ e.getMessage());
+			}
+		}
+		return kernel;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.core.IGeronimoServerBehavior#isKernelAlive()
+	 */
+	public boolean isKernelAlive() {
+		try {
+			return getKernel() != null && kernel.isRunning();
+		} catch (SecurityException e) {
+			Trace.trace(Trace.SEVERE, "Invalid username and/or password.", e);
+
+			pingThread.interrupt();
+			if (getServer().getServerState() != IServer.STATE_STOPPED) {
+				forceStopJob(true,e);
+
+			}
+		} catch (Exception e) {
+			Activator.log(Status.WARNING, "Geronimo Server may have been terminated manually outside of workspace.", e);
+			kernel = null;
+		}
+		return false;
+	}
+	
+	private void forceStopJob(boolean b, final SecurityException e) {
+		/* 
+		 *
+		 * Currently, there is another Status is returned by StartJob in Server. 
+		 * The message doesn't contain reason for the exception. 
+		 * So this job is created to show a message(Invalid username and/or password) to user.
+		 *  
+		 * TODO: Need a method to remove the error message thrown by StartJob in Server.
+		 * 
+		 */
+		
+		String jobName = NLS.bind(org.eclipse.wst.server.core.internal.Messages.errorStartFailed, getServer().getName());						
+		
+		//This message has different variable names in WTP 3.0 and 3.1, so we define it here instead of using that in WTP
+		final String jobStartingName =  NLS.bind("Starting {0}", getServer().getName());
+
+		new Job(jobName){
+
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				MultiStatus multiStatus = new  MultiStatus(Activator.PLUGIN_ID, 0, jobStartingName, null);
+				multiStatus.add(new Status(IStatus.ERROR,Activator.PLUGIN_ID,0,"Invalid username and/or password.",e));
+				try{
+					GeronimoServerBehaviour.this.stop(true);
+				}catch (Exception e){
+					multiStatus.add(new Status(IStatus.ERROR,Activator.PLUGIN_ID,0,"Failed to stop server",e));
+				}
+			
+				return multiStatus;
+			}
+		}.schedule();
+		
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.core.IGeronimoServerBehavior#isFullyStarted()
+	 */
+	public boolean isFullyStarted() {
+		if (isKernelAlive()) {
+			AbstractNameQuery query = new AbstractNameQuery(PersistentConfigurationList.class.getName());
+			Set configLists = kernel.listGBeans(query);
+			if (!configLists.isEmpty()) {
+				AbstractName on = (AbstractName) configLists.toArray()[0];
+				try {
+					Boolean b = (Boolean) kernel.getAttribute(on, "kernelFullyStarted");
+					return b.booleanValue();
+				} catch (GBeanNotFoundException e) {
+					// ignore
+				} catch (NoSuchAttributeException e) {
+					// ignore
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+			} else {
+				Trace.trace(Trace.INFO, "configLists is empty");
+			}
+		}
+		return false;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate#getRuntimeClass()
+	 */
+	public String getRuntimeClass() {
+		return "org.apache.geronimo.cli.daemon.DaemonCLI";
+	}
+
+	public IPath getPublishDirectory(IModule[] module) {
+		if (module == null || module.length == 0)
+			return null;
+
+		if (getGeronimoServer().isRunFromWorkspace()) {
+			// TODO fix me, see if project root, component root, or output
+			// container should be returned
+			return module[module.length - 1].getProject().getLocation();
+		} else {
+			ClassLoader old = Thread.currentThread().getContextClassLoader();
+			try {
+				Thread.currentThread().setContextClassLoader(getContextClassLoader());
+				String configId = getConfigId(module[0]);
+				Artifact artifact = Artifact.create(configId);
+				AbstractName name = Configuration.getConfigurationAbstractName(artifact);
+				GBeanData data = kernel.getGBeanData(name);
+				URL url = (URL) data.getAttribute("baseURL");
+				return getModulePath(module, url);
+			} catch (InvalidConfigException e) {
+				e.printStackTrace();
+			} catch (GBeanNotFoundException e) {
+				e.printStackTrace();
+			} catch (InternalKernelException e) {
+				e.printStackTrace();
+			} catch (Exception e) {
+				e.printStackTrace();
+			} finally {
+				Thread.currentThread().setContextClassLoader(old);
+			}
+		}
+
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.core.GenericGeronimoServerBehaviour#getContextClassLoader()
+	 */
+	protected ClassLoader getContextClassLoader() {
+		return Kernel.class.getClassLoader();
+	}
+
+	@Override
+    protected List getOrderedModules(IServer server, List modules,
+            List deltaKind) {
+		 DependencyHelper dh = new DependencyHelper();
+         List list = dh.reorderModules(this.getServer(),modules, deltaKind);
+         return list;
+    }
+}
\ 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/GeronimoServerBehaviour.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/GeronimoServerBehaviour.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/GeronimoServerBehaviour.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/GeronimoServerInfo.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/GeronimoServerInfo.java?rev=921247&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerInfo.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerInfo.java Wed Mar 10 08:31:28 2010
@@ -0,0 +1,470 @@
+/*
+ * 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.v21.core;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+
+import javax.management.MBeanServerConnection;
+
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.GAttributeInfo;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.jee.deployment.Dependency;
+import org.apache.geronimo.jee.naming.Pattern;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.InternalKernelException;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.NoSuchAttributeException;
+import org.apache.geronimo.kernel.NoSuchOperationException;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate;
+import org.apache.geronimo.st.v21.core.internal.Trace;
+import org.apache.geronimo.system.jmx.KernelDelegate;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.ServerCore;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class GeronimoServerInfo {
+    static final long serialVersionUID = 1L;
+
+    private ArrayList<Kernel> kernels;
+
+    private ArrayList<Pattern> deployedEJBs;
+    private ArrayList<String> securityRealms;
+    private ArrayList<Pattern> jmsConnectionFactories;
+    private ArrayList<Pattern> jmsDestinations;
+    private ArrayList<Pattern> jdbcConnectionPools;
+    private ArrayList<Pattern> javaMailResources;
+    private ArrayList<org.apache.geronimo.jee.deployment.Pattern> credentialStores;
+    private HashMap<org.apache.geronimo.jee.deployment.Pattern,HashMap<String,ArrayList<String>>> credentialStoreAttributes;
+    private ArrayList<Dependency> commonLibs;
+
+    // singleton class
+    private GeronimoServerInfo() {
+    }
+
+    private static GeronimoServerInfo instance = new GeronimoServerInfo();
+
+    public static GeronimoServerInfo getInstance() {
+        return instance;
+    }
+
+    public ArrayList<Pattern> getDeployedEjbs() {
+        return deployedEJBs;
+    }
+
+    public ArrayList<String> getSecurityRealms() {
+        return securityRealms;
+    }
+
+    public ArrayList<Pattern> getJmsConnectionFactories() {
+        return jmsConnectionFactories;
+    }
+
+    public ArrayList<Pattern> getJmsDestinations() {
+        return jmsDestinations;
+    }
+
+    public ArrayList<Pattern> getJdbcConnectionPools() {
+        return jdbcConnectionPools;
+    }
+
+    public ArrayList<Pattern> getJavaMailSessions() {
+        return javaMailResources;
+    }
+
+    public ArrayList<org.apache.geronimo.jee.deployment.Pattern> getDeployedCredentialStores() {
+        return credentialStores;
+    }
+    
+    public HashMap<org.apache.geronimo.jee.deployment.Pattern,HashMap<String,ArrayList<String>>> getDeployedCredentialStoreAttributes() {
+        return credentialStoreAttributes;
+    }
+
+    public ArrayList<Dependency> getCommonLibs() {
+        return commonLibs;
+    }
+
+    public void updateInfo() {
+        Job job = new Job("Getting Dynamic Information from Server"){
+            protected IStatus run(IProgressMonitor arg0) {
+                updateKernels();
+                updateDeployedEJBs();
+                updateSecurityRealms();
+                updateJmsConnectionFactories();
+                updateJmsDestinations();
+                updateJdbcConnectionPools();
+                updateJavaMailSessions();
+                updateDeployedCredentialStores();
+                updateCommonLibs();
+                return Status.OK_STATUS;
+            }
+        };
+        job.setPriority(Job.SHORT);
+        job.schedule();
+    }
+
+    private void updateKernels() {
+        kernels = new ArrayList<Kernel>();
+        IServer[] servers = ServerCore.getServers();
+        for (int i = 0; i < servers.length; i++) {
+            if (servers[i].getServerState() == IServer.STATE_STARTED) {
+                try {
+                    GeronimoServerBehaviourDelegate delegate = (GeronimoServerBehaviourDelegate) servers[i]
+                            .getAdapter(GeronimoServerBehaviourDelegate.class);
+                    if (delegate != null) {
+                        MBeanServerConnection connection = delegate
+                                .getServerConnection();
+                        if (connection != null) {
+                            kernels.add(new KernelDelegate(connection));
+                        }
+                    }
+                } catch (SecurityException e) {
+                } catch (Exception e) {
+                    Trace.trace(Trace.WARNING, "Kernel connection failed. "
+                            + e.getMessage());
+                }
+            }
+        }
+    }
+
+    private void updateDeployedEJBs() {
+        deployedEJBs = new ArrayList<Pattern>();
+        ArrayList<Pattern> statelessSessionBeans = getByType("StatelessSessionBean");
+        ArrayList<Pattern> statefulSessionBeans = getByType("StatefulSessionBean");
+        ArrayList<Pattern> messageDrivenBeans = getByType("MessageDrivenBean");
+        ArrayList<Pattern> entityBeans = getByType("EntityBean");
+        deployedEJBs.addAll(statelessSessionBeans);
+        deployedEJBs.addAll(statefulSessionBeans);
+        deployedEJBs.addAll(messageDrivenBeans);
+        deployedEJBs.addAll(entityBeans);
+    }
+
+    private void updateSecurityRealms() {
+        securityRealms = new ArrayList<String>();
+        Map map = Collections.singletonMap("j2eeType", "SecurityRealm");
+        AbstractNameQuery query = new AbstractNameQuery(null, map,
+                Collections.EMPTY_SET);
+        for (int i = 0; i < kernels.size(); i++) {
+            Set beans = kernels.get(i).listGBeans(query);
+            for (Iterator it = beans.iterator(); it.hasNext();) {
+                AbstractName abstractName = (AbstractName) it.next();
+                String name = (String) abstractName.getName().get("name");
+                if (!securityRealms.contains(name)) {
+                    securityRealms.add(name);
+                }
+            }
+        }
+    }
+
+    private void updateJmsConnectionFactories() {
+        String[] requiredInterfaces = new String[] {
+                "javax.jms.ConnectionFactory",
+                "javax.jms.QueueConnectionFactory",
+                "javax.jms.TopicConnectionFactory", };
+        String attribute = "implementedInterfaces";
+        jmsConnectionFactories = getByTypeAttributeValues(
+                "JCAManagedConnectionFactory", attribute, requiredInterfaces);
+    }
+
+    private void updateJmsDestinations() {
+        String[] requiredInterfaces = new String[] { "javax.jms.Queue",
+                "javax.jms.Topic" };
+        String attribute = "adminObjectInterface";
+        jmsDestinations = getByTypeAttributeValues("JCAAdminObject", attribute,
+                requiredInterfaces);
+    }
+
+    private void updateJdbcConnectionPools() {
+        String[] acceptedValues = new String[] { "javax.sql.DataSource" };
+        String attribute = "connectionFactoryInterface";
+        jdbcConnectionPools = getByTypeAttributeValues(
+                "JCAManagedConnectionFactory", attribute, acceptedValues);
+
+    }
+
+    private void updateJavaMailSessions() {
+        javaMailResources = getByType("JavaMailResource");
+    }
+
+    private void updateDeployedCredentialStores() {
+        credentialStores = new ArrayList<org.apache.geronimo.jee.deployment.Pattern>();
+        credentialStoreAttributes = new HashMap<org.apache.geronimo.jee.deployment.Pattern,HashMap<String,ArrayList<String>>> ();
+        Map map = Collections.singletonMap("j2eeType", "GBean");
+        AbstractNameQuery query = new AbstractNameQuery(null, map,
+                Collections.EMPTY_SET);
+        for (int i = 0; i < kernels.size(); i++) {
+        	Kernel kernel = (Kernel)kernels.get(i);
+            Set beans = kernel.listGBeans(query);
+            for (Iterator it = beans.iterator(); it.hasNext();) {
+                AbstractName abstractName = (AbstractName) it.next();
+                try {
+                    GBeanInfo info = kernel.getGBeanInfo(abstractName);
+                    GAttributeInfo attribInfo = info
+                            .getAttribute("credentialStore");
+                    if (attribInfo != null) {
+                        Artifact artifact = abstractName.getArtifact();
+                        Object name = abstractName.getName().get("name");
+                        org.apache.geronimo.jee.deployment.Pattern pattern = new org.apache.geronimo.jee.deployment.Pattern();
+                        pattern.setArtifactId(artifact.getArtifactId());
+                        pattern.setGroupId(artifact.getGroupId());
+                        pattern.setType(artifact.getType());
+                        pattern.setVersion(artifact.getVersion().toString());
+                        pattern.setCustomFoo((String) name);
+                        if (!credentialStores.contains(pattern)) {
+                            credentialStores.add(pattern);
+                        }
+                        
+                      //update attributes of credentialStore
+                    	Map attributeMap = (Map)kernel.getAttribute(abstractName, "credentialStore");
+                    	if (attributeMap!=null){
+                    		HashMap<String,ArrayList<String>> realmMap = new HashMap<String,ArrayList<String>>();
+                    		for (Object obj:attributeMap.keySet()){
+                    			String realmName = (String)obj;
+                    			Map idMap = (Map)attributeMap.get(obj);
+                    			ArrayList<String> idList = new ArrayList<String>();
+                    			idList.addAll(idMap.keySet());                    			
+                    			
+                    			realmMap.put(realmName, idList);
+                    		}               		
+                    		credentialStoreAttributes.put(pattern, realmMap);
+                    	}
+                    }
+                } catch (GBeanNotFoundException e) {
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+    
+
+    private void updateCommonLibs() {
+        List<Object> artifacts = null;
+        commonLibs = new ArrayList<Dependency>();
+        Map map = Collections.singletonMap("j2eeType", "Repository");
+        AbstractNameQuery query = new AbstractNameQuery(null, map,
+                Collections.EMPTY_SET);
+        for (int i = 0; i < kernels.size(); i++) {
+            Set beans = kernels.get(i).listGBeans(query);
+            for (Iterator it = beans.iterator(); it.hasNext();) {
+                AbstractName abstractName = (AbstractName) it.next();
+                try {
+                    GBeanInfo info = kernels.get(i).getGBeanInfo(abstractName);
+                    Object value = kernels.get(i).invoke(abstractName, "list");
+                    if (value instanceof TreeSet) {
+                        artifacts = Arrays.asList(((TreeSet) value).toArray());
+                    }
+                } catch (GBeanNotFoundException e) {
+                    Trace.trace(Trace.WARNING, "GBean Not Found. "
+                            + e.getMessage());
+                } catch (NoSuchOperationException e) {
+                    Trace.trace(Trace.WARNING, "The operation cant invoked. "
+                            + e.getMessage());
+                } catch (InternalKernelException e) {
+                    throw e;
+                } catch (Exception e) {
+                    Trace.trace(Trace.WARNING, "Kernel connection failed.  "
+                            + e.getMessage());
+                }
+
+            }
+        }
+        if (artifacts != null) {
+            for (int i = 0; i < artifacts.size(); i++) {
+                Dependency dependency = new Dependency();
+                dependency.setArtifactId(((Artifact) artifacts.get(i))
+                        .getArtifactId());
+                dependency.setGroupId(((Artifact) artifacts.get(i))
+                        .getGroupId());
+                dependency.setVersion(((Artifact) artifacts.get(i))
+                        .getVersion().toString());
+                dependency.setType(((Artifact) artifacts.get(i)).getType());
+                if (!commonLibs.contains(dependency)) {
+                    commonLibs.add(dependency);
+                }
+            }
+        }
+    }
+
+    private ArrayList<Pattern> getByTypeAttributeValues(String type,
+            String attribute, String[] acceptedValues) {
+        ArrayList<Pattern> result = new ArrayList<Pattern>();
+        Map map = Collections.singletonMap("j2eeType", type);
+        AbstractNameQuery query = new AbstractNameQuery(null, map,
+                Collections.EMPTY_SET);
+        for (int i = 0; i < kernels.size(); i++) {
+            Set beans = kernels.get(i).listGBeans(query);
+            for (Iterator it = beans.iterator(); it.hasNext();) {
+                AbstractName abstractName = (AbstractName) it.next();
+                try {
+                    Object value = kernels.get(i).getAttribute(abstractName,
+                            attribute);
+                    if (value != null) {
+                        if (value instanceof String[]) {
+                            List<String> interfaces = Arrays
+                                    .asList((String[]) value);
+                            for (int j = 0; j < acceptedValues.length; j++) {
+                                if (interfaces.contains(acceptedValues[j])) {
+                                    Pattern pattern = new Pattern();
+                                    Artifact artifact = abstractName
+                                            .getArtifact();
+                                    pattern.setArtifactId(artifact
+                                            .getArtifactId());
+                                    pattern.setGroupId(artifact.getGroupId());
+                                    pattern.setVersion(artifact.getVersion()
+                                            .toString());
+                                    pattern.setName((String) abstractName
+                                            .getName().get("name"));
+                                    if (!result.contains(pattern)) {
+                                        result.add(pattern);
+                                    }
+                                    break;
+                                }
+                            }
+                        }
+                        if (value instanceof String) {
+                            String interfaces = (String) value;
+                            for (int j = 0; j < acceptedValues.length; j++) {
+                                if (interfaces.contains(acceptedValues[j])) {
+                                    Pattern pattern = new Pattern();
+                                    Artifact artifact = abstractName
+                                            .getArtifact();
+                                    pattern.setArtifactId(artifact
+                                            .getArtifactId());
+                                    pattern.setGroupId(artifact.getGroupId());
+                                    pattern.setVersion(artifact.getVersion()
+                                            .toString());
+                                    pattern.setName((String) abstractName
+                                            .getName().get("name"));
+                                    if (!result.contains(pattern)) {
+                                        result.add(pattern);
+                                    }
+                                    break;
+                                }
+                            }
+                        }
+                    }
+                } catch (GBeanNotFoundException e) {
+                } catch (NoSuchAttributeException e) {
+                } catch (Exception e) {
+                    Trace.trace(Trace.WARNING, "Kernel connection failed. "
+                            + e.getMessage());
+                }
+            }
+        }
+        return result;
+    }
+
+    private ArrayList<Pattern> getByType(String type) {
+        ArrayList<Pattern> result = new ArrayList<Pattern>();
+        Map map = Collections.singletonMap("j2eeType", type);
+        AbstractNameQuery query = new AbstractNameQuery(null, map,
+                Collections.EMPTY_SET);
+        for (int i = 0; i < kernels.size(); i++) {
+            Set beans = kernels.get(i).listGBeans(query);
+            for (Iterator it = beans.iterator(); it.hasNext();) {
+                AbstractName abstractName = (AbstractName) it.next();
+                Pattern pattern = new Pattern();
+                Artifact artifact = abstractName.getArtifact();
+                pattern.setArtifactId(artifact.getArtifactId());
+                pattern.setGroupId(artifact.getGroupId());
+                pattern.setVersion(artifact.getVersion().toString());
+                pattern.setName((String) abstractName.getName().get("name"));
+                if (!result.contains(pattern)) {
+                    result.add(pattern);
+                }
+            }
+        }
+        return result;
+    }
+
+    protected void printNamingPatternList(List<Pattern> patternList) {
+        for (int i = 0; i < patternList.size(); i++) {
+            Pattern pattern = patternList.get(i);
+            System.out.println("ArtifactID:" + pattern.getArtifactId()
+                    + " GroupID:" + pattern.getGroupId() + " Module:"
+                    + pattern.getModule() + " Version:" + pattern.getVersion()
+                    + " Name:" + pattern.getName());
+        }
+    }
+
+    protected void printDeploymentPatternList(
+            List<org.apache.geronimo.jee.deployment.Pattern> patternList) {
+        for (int i = 0; i < patternList.size(); i++) {
+            org.apache.geronimo.jee.deployment.Pattern pattern = patternList
+                    .get(i);
+            System.out.println("ArtifactID:" + pattern.getArtifactId()
+                    + " GroupID:" + pattern.getGroupId() + " Module:"
+                    + pattern.getVersion() + " Version:" + pattern.getType()
+                    + " Name:" + pattern.getCustomFoo());
+        }
+    }
+
+    protected void printDependencies(List<Dependency> dependencyList) {
+        for (int i = 0; i < dependencyList.size(); i++) {
+            Dependency dependency = dependencyList.get(i);
+            System.out.println("ArtifactID:" + dependency.getArtifactId()
+                    + " GroupID:" + dependency.getGroupId() + " Type:"
+                    + dependency.getType() + " Version:"
+                    + dependency.getVersion());
+        }
+    }
+
+    public void printServerInfo() {
+        System.out.println("EJB Modules: \n");
+        List<Pattern> ejbModules = getDeployedEjbs();
+        printNamingPatternList(ejbModules);
+        System.out.println("\n\nSecurity Realms: \n");
+        List<String> securityRealms = getSecurityRealms();
+        System.out.println(securityRealms.toString());
+        System.out.println("\n\nJMS Connection Factories: \n");
+        List<Pattern> jmsConnectionFactories = getJmsConnectionFactories();
+        printNamingPatternList(jmsConnectionFactories);
+        System.out.println("\n\nJMS Destinations: \n");
+        List<Pattern> jmsDestinations = getJmsDestinations();
+        printNamingPatternList(jmsDestinations);
+        System.out.println("\n\nJDBC Connection Pools: \n");
+        List<Pattern> jdbcConnectionPools = getJdbcConnectionPools();
+        printNamingPatternList(jdbcConnectionPools);
+        System.out.println("\n\nJava Mail Resources: \n");
+        List<Pattern> javaMailResources = getJavaMailSessions();
+        printNamingPatternList(javaMailResources);
+        System.out.println("\n\nCredential Stores: \n");
+        List<org.apache.geronimo.jee.deployment.Pattern> credentialStores = getDeployedCredentialStores();
+        printDeploymentPatternList(credentialStores);
+        System.out.println("\n\nCommon Libs: \n");
+        List<Dependency> dependencies = getCommonLibs();
+        printDependencies(dependencies);
+    }
+
+}



Mime
View raw message