You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by am...@apache.org on 2005/12/05 23:54:53 UTC
svn commit: r354213 - in /geronimo/trunk: applications/remote-deploy-lib/
applications/remote-deploy-lib/src/ applications/remote-deploy-lib/src/java/
applications/remote-deploy-lib/src/java/org/
applications/remote-deploy-lib/src/java/org/apache/ appl...
Author: ammulder
Date: Mon Dec 5 14:54:38 2005
New Revision: 354213
URL: http://svn.apache.org/viewcvs?rev=354213&view=rev
Log:
Add server-side support for remote deployment (GERONIMO-358)
No client support, and not yet added to config build yet.
Added:
geronimo/trunk/applications/remote-deploy/
geronimo/trunk/applications/remote-deploy-lib/
geronimo/trunk/applications/remote-deploy-lib/LICENSE.txt (with props)
geronimo/trunk/applications/remote-deploy-lib/NOTICE.txt (with props)
geronimo/trunk/applications/remote-deploy-lib/maven.xml (with props)
geronimo/trunk/applications/remote-deploy-lib/project.properties
geronimo/trunk/applications/remote-deploy-lib/project.xml (with props)
geronimo/trunk/applications/remote-deploy-lib/src/
geronimo/trunk/applications/remote-deploy-lib/src/java/
geronimo/trunk/applications/remote-deploy-lib/src/java/org/
geronimo/trunk/applications/remote-deploy-lib/src/java/org/apache/
geronimo/trunk/applications/remote-deploy-lib/src/java/org/apache/geronimo/
geronimo/trunk/applications/remote-deploy-lib/src/java/org/apache/geronimo/deployment/
geronimo/trunk/applications/remote-deploy-lib/src/java/org/apache/geronimo/deployment/remote/
geronimo/trunk/applications/remote-deploy-lib/src/java/org/apache/geronimo/deployment/remote/RemoteDeployGBean.java
geronimo/trunk/applications/remote-deploy-lib/src/java/org/apache/geronimo/deployment/remote/RemoteDeployToken.java
geronimo/trunk/applications/remote-deploy/LICENSE.txt (with props)
geronimo/trunk/applications/remote-deploy/NOTICE.txt (with props)
geronimo/trunk/applications/remote-deploy/maven.xml (with props)
geronimo/trunk/applications/remote-deploy/project.properties
geronimo/trunk/applications/remote-deploy/project.xml (with props)
geronimo/trunk/applications/remote-deploy/src/
geronimo/trunk/applications/remote-deploy/src/java/
geronimo/trunk/applications/remote-deploy/src/java/org/
geronimo/trunk/applications/remote-deploy/src/java/org/apache/
geronimo/trunk/applications/remote-deploy/src/java/org/apache/geronimo/
geronimo/trunk/applications/remote-deploy/src/java/org/apache/geronimo/deployment/
geronimo/trunk/applications/remote-deploy/src/java/org/apache/geronimo/deployment/remote/
geronimo/trunk/applications/remote-deploy/src/java/org/apache/geronimo/deployment/remote/BarfServlet.java
geronimo/trunk/applications/remote-deploy/src/java/org/apache/geronimo/deployment/remote/FileUploadServlet.java
geronimo/trunk/applications/remote-deploy/src/webapp/
geronimo/trunk/applications/remote-deploy/src/webapp/WEB-INF/
geronimo/trunk/applications/remote-deploy/src/webapp/WEB-INF/geronimo-web.xml (with props)
geronimo/trunk/applications/remote-deploy/src/webapp/WEB-INF/web.xml (with props)
Modified:
geronimo/trunk/modules/assembly/maven.xml
geronimo/trunk/modules/assembly/project.xml
geronimo/trunk/modules/assembly/src/var/config/config.xml
geronimo/trunk/modules/assembly/src/var/log/server-log4j.properties
geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
Added: geronimo/trunk/applications/remote-deploy-lib/LICENSE.txt
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/remote-deploy-lib/LICENSE.txt?rev=354213&view=auto
==============================================================================
--- geronimo/trunk/applications/remote-deploy-lib/LICENSE.txt (added)
+++ geronimo/trunk/applications/remote-deploy-lib/LICENSE.txt Mon Dec 5 14:54:38 2005
@@ -0,0 +1,203 @@
+
+ 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/trunk/applications/remote-deploy-lib/LICENSE.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/trunk/applications/remote-deploy-lib/NOTICE.txt
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/remote-deploy-lib/NOTICE.txt?rev=354213&view=auto
==============================================================================
--- geronimo/trunk/applications/remote-deploy-lib/NOTICE.txt (added)
+++ geronimo/trunk/applications/remote-deploy-lib/NOTICE.txt Mon Dec 5 14:54:38 2005
@@ -0,0 +1,5 @@
+Portions of the Web Console were orginally 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 "IBM Console CLA".
Propchange: geronimo/trunk/applications/remote-deploy-lib/NOTICE.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/trunk/applications/remote-deploy-lib/maven.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/remote-deploy-lib/maven.xml?rev=354213&view=auto
==============================================================================
--- geronimo/trunk/applications/remote-deploy-lib/maven.xml (added)
+++ geronimo/trunk/applications/remote-deploy-lib/maven.xml Mon Dec 5 14:54:38 2005
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright 2005 The Apache Software Foundation
+
+ 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.
+-->
+
+<!-- $Rev: 160900 $ $Date: 2005-04-11 08:09:38 -0700 (Mon, 11 Apr 2005) $ -->
+
+<project default="jar:install" xmlns:j="jelly:core" xmlns:ant="jelly:ant">
+</project>
\ No newline at end of file
Propchange: geronimo/trunk/applications/remote-deploy-lib/maven.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/trunk/applications/remote-deploy-lib/project.properties
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/remote-deploy-lib/project.properties?rev=354213&view=auto
==============================================================================
--- geronimo/trunk/applications/remote-deploy-lib/project.properties (added)
+++ geronimo/trunk/applications/remote-deploy-lib/project.properties Mon Dec 5 14:54:38 2005
@@ -0,0 +1,22 @@
+##
+##
+## Copyright 2005 The Apache Software Foundation
+##
+## 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.
+##
+
+##
+## $Rev: 151530 $ $Date: 2005-02-05 15:47:24 -0800 (Sat, 05 Feb 2005) $
+##
+
+maven.multiproject.type=jar
Added: geronimo/trunk/applications/remote-deploy-lib/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/remote-deploy-lib/project.xml?rev=354213&view=auto
==============================================================================
--- geronimo/trunk/applications/remote-deploy-lib/project.xml (added)
+++ geronimo/trunk/applications/remote-deploy-lib/project.xml Mon Dec 5 14:54:38 2005
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright 2005 The Apache Software Foundation
+
+ 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.
+-->
+
+<!-- $Rev: 160900 $ $Date: 2005-04-11 08:09:38 -0700 (Mon, 11 Apr 2005) $ -->
+
+<project>
+ <pomVersion>3</pomVersion>
+ <extend>../../etc/project.xml</extend>
+
+ <name>Geronimo :: Remote Deploy GBean</name>
+ <id>geronimo-remote-deploy-lib</id>
+ <shortDescription>Geronimo Remote Deploy GBean</shortDescription>
+ <description>
+ A GBean for the remote deployment web app. Unfortunately this can't
+ be built and pacakged into the WAR due to an outstanding classloader
+ issue with GBeans and WAR files.
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>geronimo</groupId>
+ <artifactId>geronimo-kernel</artifactId>
+ <version>${pom.currentVersion}</version>
+ </dependency>
+ </dependencies>
+</project>
Propchange: geronimo/trunk/applications/remote-deploy-lib/project.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/trunk/applications/remote-deploy-lib/src/java/org/apache/geronimo/deployment/remote/RemoteDeployGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/remote-deploy-lib/src/java/org/apache/geronimo/deployment/remote/RemoteDeployGBean.java?rev=354213&view=auto
==============================================================================
--- geronimo/trunk/applications/remote-deploy-lib/src/java/org/apache/geronimo/deployment/remote/RemoteDeployGBean.java (added)
+++ geronimo/trunk/applications/remote-deploy-lib/src/java/org/apache/geronimo/deployment/remote/RemoteDeployGBean.java Mon Dec 5 14:54:38 2005
@@ -0,0 +1,44 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ * 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.
+ */
+package org.apache.geronimo.deployment.remote;
+
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.GBeanInfo;
+
+/**
+ * Just a placeholder so things can look this up.
+ *
+ * @version $Rev: 240228 $ $Date: 2005-08-26 08:55:00 -0400 (Fri, 26 Aug 2005) $
+ */
+public class RemoteDeployGBean implements RemoteDeployToken {
+ public RemoteDeployGBean() {
+ }
+
+ public static final GBeanInfo GBEAN_INFO;
+
+ static {
+ GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(RemoteDeployGBean.class);
+ infoFactory.addInterface(RemoteDeployToken.class);
+ infoFactory.setConstructor(new String[0]);
+ GBEAN_INFO = infoFactory.getBeanInfo();
+ }
+
+ public static GBeanInfo getGBeanInfo() {
+ return GBEAN_INFO;
+ }
+}
+
Added: geronimo/trunk/applications/remote-deploy-lib/src/java/org/apache/geronimo/deployment/remote/RemoteDeployToken.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/remote-deploy-lib/src/java/org/apache/geronimo/deployment/remote/RemoteDeployToken.java?rev=354213&view=auto
==============================================================================
--- geronimo/trunk/applications/remote-deploy-lib/src/java/org/apache/geronimo/deployment/remote/RemoteDeployToken.java (added)
+++ geronimo/trunk/applications/remote-deploy-lib/src/java/org/apache/geronimo/deployment/remote/RemoteDeployToken.java Mon Dec 5 14:54:38 2005
@@ -0,0 +1,25 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ * 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.
+ */
+package org.apache.geronimo.deployment.remote;
+
+/**
+ * Just a placeholder so things can look this up.
+ *
+ * @version $Rev: 240228 $ $Date: 2005-08-26 08:55:00 -0400 (Fri, 26 Aug 2005) $
+ */
+public interface RemoteDeployToken {}
+
Added: geronimo/trunk/applications/remote-deploy/LICENSE.txt
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/remote-deploy/LICENSE.txt?rev=354213&view=auto
==============================================================================
--- geronimo/trunk/applications/remote-deploy/LICENSE.txt (added)
+++ geronimo/trunk/applications/remote-deploy/LICENSE.txt Mon Dec 5 14:54:38 2005
@@ -0,0 +1,203 @@
+
+ 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/trunk/applications/remote-deploy/LICENSE.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/trunk/applications/remote-deploy/NOTICE.txt
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/remote-deploy/NOTICE.txt?rev=354213&view=auto
==============================================================================
--- geronimo/trunk/applications/remote-deploy/NOTICE.txt (added)
+++ geronimo/trunk/applications/remote-deploy/NOTICE.txt Mon Dec 5 14:54:38 2005
@@ -0,0 +1,5 @@
+Portions of the Web Console were orginally 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 "IBM Console CLA".
Propchange: geronimo/trunk/applications/remote-deploy/NOTICE.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/trunk/applications/remote-deploy/maven.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/remote-deploy/maven.xml?rev=354213&view=auto
==============================================================================
--- geronimo/trunk/applications/remote-deploy/maven.xml (added)
+++ geronimo/trunk/applications/remote-deploy/maven.xml Mon Dec 5 14:54:38 2005
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright 2005 The Apache Software Foundation
+
+ 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.
+-->
+
+<!-- $Rev: 160900 $ $Date: 2005-04-11 08:09:38 -0700 (Mon, 11 Apr 2005) $ -->
+
+<project default="default">
+
+ <goal name="default">
+ <attainGoal name="war:install"/>
+ </goal>
+</project>
\ No newline at end of file
Propchange: geronimo/trunk/applications/remote-deploy/maven.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/trunk/applications/remote-deploy/project.properties
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/remote-deploy/project.properties?rev=354213&view=auto
==============================================================================
--- geronimo/trunk/applications/remote-deploy/project.properties (added)
+++ geronimo/trunk/applications/remote-deploy/project.properties Mon Dec 5 14:54:38 2005
@@ -0,0 +1,23 @@
+##
+##
+## Copyright 2005 The Apache Software Foundation
+##
+## 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.
+##
+
+##
+## $Rev: 151530 $ $Date: 2005-02-05 15:47:24 -0800 (Sat, 05 Feb 2005) $
+##
+
+maven.multiproject.type=war
+geronimo.packaging.moduleFile=${maven.build.dir}/${maven.final.name}.war
Added: geronimo/trunk/applications/remote-deploy/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/remote-deploy/project.xml?rev=354213&view=auto
==============================================================================
--- geronimo/trunk/applications/remote-deploy/project.xml (added)
+++ geronimo/trunk/applications/remote-deploy/project.xml Mon Dec 5 14:54:38 2005
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright 2005 The Apache Software Foundation
+
+ 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.
+-->
+
+<!-- $Rev: 160900 $ $Date: 2005-04-11 08:09:38 -0700 (Mon, 11 Apr 2005) $ -->
+
+<project>
+ <pomVersion>3</pomVersion>
+ <extend>../../etc/project.xml</extend>
+
+ <name>Geronimo :: Remote Deploy Application</name>
+ <id>geronimo-remote-deploy</id>
+ <shortDescription>Geronimo Remote Deploy Application</shortDescription>
+ <description>
+ This application is essentially a servlet that accepts file upload
+ requests from remote clients, which is necessary for remote
+ deployment operations to work properly.
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>geronimo-spec</groupId>
+ <artifactId>geronimo-spec-servlet</artifactId>
+ <version>${geronimo_spec_servlet_version}</version>
+ </dependency>
+ <dependency>
+ <groupId>geronimo</groupId>
+ <artifactId>geronimo-remote-deploy-lib</artifactId>
+ <version>${pom.currentVersion}</version>
+ </dependency>
+ </dependencies>
+</project>
Propchange: geronimo/trunk/applications/remote-deploy/project.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/trunk/applications/remote-deploy/src/java/org/apache/geronimo/deployment/remote/BarfServlet.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/remote-deploy/src/java/org/apache/geronimo/deployment/remote/BarfServlet.java?rev=354213&view=auto
==============================================================================
--- geronimo/trunk/applications/remote-deploy/src/java/org/apache/geronimo/deployment/remote/BarfServlet.java (added)
+++ geronimo/trunk/applications/remote-deploy/src/java/org/apache/geronimo/deployment/remote/BarfServlet.java Mon Dec 5 14:54:38 2005
@@ -0,0 +1,39 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ * 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.
+ */
+package org.apache.geronimo.deployment.remote;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.ServletException;
+import java.io.IOException;
+
+/**
+ * Returns a 404 no matter what the request URL was.
+ *
+ * @version $Rev: 240228 $ $Date: 2005-08-26 08:55:00 -0400 (Fri, 26 Aug 2005) $
+ */
+public class BarfServlet extends HttpServlet {
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ response.sendError(404);
+ }
+
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ response.sendError(404);
+ }
+}
+
Added: geronimo/trunk/applications/remote-deploy/src/java/org/apache/geronimo/deployment/remote/FileUploadServlet.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/remote-deploy/src/java/org/apache/geronimo/deployment/remote/FileUploadServlet.java?rev=354213&view=auto
==============================================================================
--- geronimo/trunk/applications/remote-deploy/src/java/org/apache/geronimo/deployment/remote/FileUploadServlet.java (added)
+++ geronimo/trunk/applications/remote-deploy/src/java/org/apache/geronimo/deployment/remote/FileUploadServlet.java Mon Dec 5 14:54:38 2005
@@ -0,0 +1,101 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ * 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.
+ */
+package org.apache.geronimo.deployment.remote;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.ServletException;
+import java.io.DataOutputStream;
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.BufferedOutputStream;
+import java.io.FileOutputStream;
+
+/**
+ * A servlet that accepts file uploads. It takes only POST requests, which should
+ * contain a Java "DataOutput" formatted stream containing:
+ *
+ * 1) an int, the number of files being uploaded
+ * 2) for each file:
+ * 1) an int, the length of the file in bytes
+ * 2) a number of raw bytes equal to the above for the file
+ *
+ * It returns a serialized stream containing:
+ *
+ * 1) a UTF string, the status (should be "OK")
+ * 2) an int, the number of files received
+ * 3) for each file:
+ * 1) a UTF String, the path to the file as saved to the server's filesystem
+ *
+ * The file positions in the response will be the same as in the request.
+ * The is, a name for upload file #2 will be in response position #2.
+ *
+ * @version $Rev: 240228 $ $Date: 2005-08-26 08:55:00 -0400 (Fri, 26 Aug 2005) $
+ */
+public class FileUploadServlet extends HttpServlet {
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ int fileCount;
+ String names[];
+ try {
+ DataInputStream in = new DataInputStream(request.getInputStream());
+ fileCount = in.readInt();
+ names = new String[fileCount];
+ for(int i=0; i<fileCount; i++) {
+ int length = in.readInt();
+ File temp = File.createTempFile("remote-deploy", "");
+ temp.deleteOnExit();
+ names[i] = temp.getAbsolutePath();
+ readToFile(in, temp, length);
+ }
+ in.close();
+ } catch (IOException e) {
+ DataOutputStream out = new DataOutputStream(response.getOutputStream());
+ out.writeUTF("ERROR: "+e.getMessage());
+ out.close();
+ return;
+ }
+ DataOutputStream out = new DataOutputStream(response.getOutputStream());
+ out.writeUTF("OK");
+ out.writeInt(fileCount);
+ for (int i = 0; i < names.length; i++) {
+ out.writeUTF(names[i]);
+ }
+ out.close();
+ }
+
+ private static void readToFile(DataInputStream in, File temp, int length) throws IOException {
+ BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(temp));
+ int total, read;
+ try {
+ byte[] buf = new byte[1024];
+ total = 0;
+ while((read = in.read(buf, 0, Math.min(buf.length, length - total))) > -1) {
+ out.write(buf, 0, read);
+ total += read;
+ }
+ } finally {
+ try {out.flush();} catch (IOException e) {}
+ out.close();
+ }
+ if(total != read) {
+ throw new IOException("Unable to read entire upload file ("+total+"b expecting "+length+"b)");
+ }
+ }
+}
+
Added: geronimo/trunk/applications/remote-deploy/src/webapp/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/remote-deploy/src/webapp/WEB-INF/geronimo-web.xml?rev=354213&view=auto
==============================================================================
--- geronimo/trunk/applications/remote-deploy/src/webapp/WEB-INF/geronimo-web.xml (added)
+++ geronimo/trunk/applications/remote-deploy/src/webapp/WEB-INF/geronimo-web.xml Mon Dec 5 14:54:38 2005
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.0"
+ xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
+ xmlns:cfg="http://geronimo.apache.org/xml/ns/deployment-1.0"
+ configId="geronimo/remote-deploy/1.0-SNAPSHOT/car">
+ <cfg:dependency>
+ <cfg:groupId>geronimo</cfg:groupId>
+ <cfg:artifactId>geronimo-remote-deploy-lib</cfg:artifactId>
+ <cfg:version>1.0-SNAPSHOT</cfg:version>
+ </cfg:dependency>
+ <context-root>/remote-deploy</context-root>
+ <context-priority-classloader>true</context-priority-classloader>
+ <security-realm-name>geronimo-properties-realm</security-realm-name>
+ <sec:security>
+ <sec:default-principal>
+ <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"
+ name="anonymous"/>
+ </sec:default-principal>
+ <sec:role-mappings>
+ <sec:role role-name="admin">
+ <sec:principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"
+ name="admin" designated-run-as="true"/>
+ </sec:role>
+ </sec:role-mappings>
+ </sec:security>
+ <cfg:gbean name="LocatorToken" class="org.apache.geronimo.deployment.remote.RemoteDeployGBean" />
+</web-app>
Propchange: geronimo/trunk/applications/remote-deploy/src/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/trunk/applications/remote-deploy/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/remote-deploy/src/webapp/WEB-INF/web.xml?rev=354213&view=auto
==============================================================================
--- geronimo/trunk/applications/remote-deploy/src/webapp/WEB-INF/web.xml (added)
+++ geronimo/trunk/applications/remote-deploy/src/webapp/WEB-INF/web.xml Mon Dec 5 14:54:38 2005
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.4"
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <display-name>Geronimo Remote Deployer</display-name>
+
+ <description>
+ Receives file upload requests from the deployer when running on a different machine
+ than the Geronimo server.
+ </description>
+
+ <servlet>
+ <display-name>File Upload</display-name>
+ <servlet-name>file-upload</servlet-name>
+ <servlet-class>org.apache.geronimo.deployment.remote.FileUploadServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <display-name>404 Error</display-name>
+ <servlet-name>404-error</servlet-name>
+ <servlet-class>org.apache.geronimo.deployment.remote.BarfServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>404-error</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>file-upload</servlet-name>
+ <url-pattern>/upload</url-pattern>
+ </servlet-mapping>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Upload Servlet</web-resource-name>
+ <url-pattern>/upload</url-pattern>
+ <http-method>POST</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>admin</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>Geronimo File Upload</realm-name>
+ </login-config>
+
+ <security-role>
+ <role-name>admin</role-name>
+ </security-role>
+</web-app>
Propchange: geronimo/trunk/applications/remote-deploy/src/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: geronimo/trunk/modules/assembly/maven.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/maven.xml?rev=354213&r1=354212&r2=354213&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/maven.xml (original)
+++ geronimo/trunk/modules/assembly/maven.xml Mon Dec 5 14:54:38 2005
@@ -640,6 +640,13 @@
password="manager"
module="${maven.repo.local}/geronimo/wars/geronimo-jmxdebug-${pom.currentVersion}.war"/>
+ <!-- Remote Deploy -->
+ <deploy:distribute
+ uri="deployer:geronimo:jmx:rmi://localhost/jndi/rmi:/JMXConnector"
+ username="system"
+ password="manager"
+ module="${maven.repo.local}/geronimo/wars/geronimo-remote-deploy-${pom.currentVersion}.war"/>
+
<!-- UDDI -->
<deploy:distribute
uri="deployer:geronimo:jmx:rmi://localhost/jndi/rmi:/JMXConnector"
Modified: geronimo/trunk/modules/assembly/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/project.xml?rev=354213&r1=354212&r2=354213&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/project.xml (original)
+++ geronimo/trunk/modules/assembly/project.xml Mon Dec 5 14:54:38 2005
@@ -232,6 +232,15 @@
</properties>
</dependency>
+ <dependency>
+ <groupId>geronimo</groupId>
+ <artifactId>geronimo-remote-deploy-lib</artifactId>
+ <version>${pom.currentVersion}</version>
+ <properties>
+ <repository>true</repository>
+ </properties>
+ </dependency>
+
<!--
<dependency>
<groupId>geronimo-spec</groupId>
@@ -589,6 +598,16 @@
<dependency>
<groupId>geronimo</groupId>
<artifactId>geronimo-welcome</artifactId>
+ <version>${pom.currentVersion}</version>
+ <type>war</type>
+ <properties>
+ <installer>true</installer>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>geronimo</groupId>
+ <artifactId>geronimo-remote-deploy</artifactId>
<version>${pom.currentVersion}</version>
<type>war</type>
<properties>
Modified: geronimo/trunk/modules/assembly/src/var/config/config.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/var/config/config.xml?rev=354213&r1=354212&r2=354213&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/var/config/config.xml (original)
+++ geronimo/trunk/modules/assembly/src/var/config/config.xml Mon Dec 5 14:54:38 2005
@@ -95,6 +95,7 @@
<configuration name="geronimo/tomcat-runtime-deployer/${pom.currentVersion}/car"/>
<configuration name="geronimo/welcome-${PlanWebServerNameLC}/${pom.currentVersion}/car"/>
<configuration name="geronimo/console-${PlanWebServerNameLC}/${pom.currentVersion}/car"/>
+ <configuration name="geronimo/remote-deploy/${pom.currentVersion}/car"/>
<configuration name="geronimo/hot-deployer/${pom.currentVersion}/car">
<gbean name="HotDeployer">
<attribute name="path">deploy</attribute>
Modified: geronimo/trunk/modules/assembly/src/var/log/server-log4j.properties
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/var/log/server-log4j.properties?rev=354213&r1=354212&r2=354213&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/var/log/server-log4j.properties (original)
+++ geronimo/trunk/modules/assembly/src/var/log/server-log4j.properties Mon Dec 5 14:54:38 2005
@@ -54,6 +54,7 @@
# We can change the Geronimo code to avoid this, but we have to just adjust the log levels for
# any third-party libraries.
log4j.category.org.apache.commons.digester=ERROR
+log4j.category.org.apache.jasper.compiler.SmapUtil=WARN
# ActiveMQ
log4j.category.org.activemq.store.jdbc.adapter.DefaultJDBCAdapter=WARN
Modified: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java?rev=354213&r1=354212&r2=354213&view=diff
==============================================================================
--- geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java (original)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java Mon Dec 5 14:54:38 2005
@@ -17,24 +17,13 @@
package org.apache.geronimo.deployment;
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.jar.Attributes;
-import java.util.jar.JarFile;
-import java.util.jar.Manifest;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.geronimo.common.DeploymentException;
import org.apache.geronimo.deployment.util.DeploymentUtil;
import org.apache.geronimo.gbean.GBeanInfo;
import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.GBeanQuery;
import org.apache.geronimo.kernel.GBeanNotFoundException;
import org.apache.geronimo.kernel.Kernel;
import org.apache.geronimo.kernel.config.Configuration;
@@ -44,6 +33,23 @@
import org.apache.geronimo.system.configuration.ExecutableConfigurationUtil;
import org.apache.geronimo.system.main.CommandLineManifest;
+import javax.management.ObjectName;
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.jar.Attributes;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+
/**
* GBean that knows how to deploy modules (by consulting available module builders)
*
@@ -93,6 +99,78 @@
}
}
+ /**
+ * Gets a URL that a remote deploy client can use to upload files to the
+ * server. Looks up a remote deploy web application by searching for a
+ * particular GBean and figuring out a reference to the web application
+ * based on that. Then constructs a URL pointing to that web application
+ * based on available connectors for the web container and the context
+ * root for the web application.
+ *
+ * @return The URL that clients should use for deployment file uploads.
+ */
+ public String getRemoteDeployUploadURL() {
+ Set set = kernel.listGBeans(new GBeanQuery(null, "org.apache.geronimo.deployment.remote.RemoteDeployToken"));
+ if(set.size() == 0) {
+ return null;
+ }
+ ObjectName token = (ObjectName) set.iterator().next();
+ set = kernel.getDependencyManager().getParents(token);
+ if(set.size() == 0) {
+ log.error("Unable to find configuration for remote deployer GBean");
+ return null;
+ }
+ ObjectName config = (ObjectName) set.iterator().next();
+ Hashtable hash = new Hashtable();
+ hash.put("J2EEApplication", token.getKeyProperty("J2EEApplication"));
+ hash.put("J2EEServer", token.getKeyProperty("J2EEServer"));
+ hash.put("j2eeType", "WebModule");
+ try {
+ hash.put("name", Configuration.getConfigurationID(config).toString());
+ ObjectName module = new ObjectName(token.getDomain(), hash);
+
+ String containerName = (String) kernel.getAttribute(module, "containerName");
+ String contextPath = (String) kernel.getAttribute(module, "contextPath");
+ String urlPrefix = getURLFor(containerName);
+ return urlPrefix+contextPath+"/upload";
+ } catch (Exception e) {
+ log.error("Unable to look up remote deploy upload URL", e);
+ return null;
+ }
+ }
+
+ /**
+ * Given a web container ObjectName, constructs a URL to point to it.
+ * Currently favors HTTP then HTTPS and ignores AJP (since AJP
+ * means it goes through a web server listening on an unknown port).
+ */
+ private String getURLFor(String containerName) throws Exception {
+ Set set = kernel.listGBeans(new GBeanQuery(null, "org.apache.geronimo.management.geronimo.WebManager"));
+ for (Iterator it = set.iterator(); it.hasNext();) {
+ ObjectName mgrName = (ObjectName) it.next();
+ String[] cntNames = (String[]) kernel.getAttribute(mgrName, "containers");
+ for (int i = 0; i < cntNames.length; i++) {
+ String cntName = cntNames[i];
+ if(cntName.equals(containerName)) {
+ String[] cncNames = (String[]) kernel.invoke(mgrName, "getConnectorsForContainer", new Object[]{cntName}, new String[]{"java.lang.String"});
+ Map map = new HashMap();
+ for (int j = 0; j < cncNames.length; j++) {
+ ObjectName cncName = ObjectName.getInstance(cncNames[j]);
+ String protocol = (String) kernel.getAttribute(cncName, "protocol");
+ String url = (String) kernel.getAttribute(cncName, "connectUrl");
+ map.put(protocol, url);
+ }
+ String urlPrefix = null;
+ if((urlPrefix = (String) map.get("HTTP")) == null) {
+ urlPrefix = (String) map.get("HTTPS");
+ }
+ return urlPrefix;
+ }
+ }
+ }
+ return null;
+ }
+
public List deploy(File planFile, File moduleFile, File targetFile, boolean install, String mainClass, String classPath, String endorsedDirs, String extensionDirs) throws DeploymentException {
if (planFile == null && moduleFile == null) {
throw new DeploymentException("No plan or module specified");
@@ -228,6 +306,7 @@
GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(Deployer.class, DEPLOYER);
infoFactory.addAttribute("kernel", Kernel.class, false);
+ infoFactory.addAttribute("remoteDeployUploadURL", String.class, false);
infoFactory.addOperation("deploy", new Class[]{File.class, File.class});
infoFactory.addOperation("deploy", new Class[]{File.class, File.class, File.class, boolean.class, String.class, String.class, String.class, String.class});