From scm-return-24464-apmail-geronimo-scm-archive=geronimo.apache.org@geronimo.apache.org Mon Jan 21 23:18:07 2008 Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 49209 invoked from network); 21 Jan 2008 23:18:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Jan 2008 23:18:06 -0000 Received: (qmail 79354 invoked by uid 500); 21 Jan 2008 23:17:56 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 79307 invoked by uid 500); 21 Jan 2008 23:17:56 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 79296 invoked by uid 99); 21 Jan 2008 23:17:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Jan 2008 15:17:56 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Jan 2008 23:17:42 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 10AF91A9832; Mon, 21 Jan 2008 15:17:34 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r614044 - in /geronimo/server/trunk/plugins/console/plugin-portlets/src/main: java/org/apache/geronimo/console/car/ resources/ webapp/WEB-INF/view/car/ Date: Mon, 21 Jan 2008 23:17:32 -0000 To: scm@geronimo.apache.org From: djencks@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080121231734.10AF91A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: djencks Date: Mon Jan 21 15:17:28 2008 New Revision: 614044 URL: http://svn.apache.org/viewvc?rev=614044&view=rev Log: GERONIMO-3607 fix up the export-server console pages Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyListHandler.java geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyViewHandler.java geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets.properties geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets_zh.properties geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblylist.jsp geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/index.jsp geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyListHandler.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyListHandler.java?rev=614044&r1=614043&r2=614044&view=diff ============================================================================== --- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyListHandler.java (original) +++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyListHandler.java Mon Jan 21 15:17:28 2008 @@ -41,17 +41,37 @@ public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException { String column = (String) request.getAttribute("column"); + String relativeServerPath = request.getParameter("relativeServerPath"); + String groupId = request.getParameter("groupId"); + String artifactId = request.getParameter("artifactId"); + String version = request.getParameter("version"); + String format = request.getParameter("format"); if(!isEmpty(column)) response.setRenderParameter("column", column); + response.setRenderParameter("relativeServerPath", isEmpty(relativeServerPath)? "var/temp/assembly": relativeServerPath); + if(!isEmpty(groupId)) response.setRenderParameter("groupId", groupId); + if(!isEmpty(artifactId)) response.setRenderParameter("artifactId", artifactId); + if(!isEmpty(version)) response.setRenderParameter("version", version); + if(!isEmpty(format)) response.setRenderParameter("format", format); return getMode(); } public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException { String column = request.getParameter("column"); + String relativeServerPath = request.getParameter("relativeServerPath"); + String groupId = request.getParameter("groupId"); + String artifactId = request.getParameter("artifactId"); + String version = request.getParameter("version"); + String format = request.getParameter("format"); if(!loadFromServer(request)) { //todo: loading failed -- do something! } request.setAttribute("column", column); + request.setAttribute("relativeServerPath", relativeServerPath); + request.setAttribute("groupId", groupId); + request.setAttribute("artifactId", artifactId); + request.setAttribute("version", version); + request.setAttribute("format", format); } public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException { Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyViewHandler.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyViewHandler.java?rev=614044&r1=614043&r2=614044&view=diff ============================================================================== --- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyViewHandler.java (original) +++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyViewHandler.java Mon Jan 21 15:17:28 2008 @@ -48,7 +48,18 @@ public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException { String[] pluginIds = request.getParameterValues("plugin"); + String relativeServerPath = request.getParameter("relativeServerPath"); + String groupId = request.getParameter("groupId"); + String artifactId = request.getParameter("artifactId"); + String version = request.getParameter("version"); + String format = request.getParameter("format"); + response.setRenderParameter("pluginIds", pluginIds); + response.setRenderParameter("relativeServerPath", isEmpty(relativeServerPath)? "var/temp/assembly": relativeServerPath); + if(!isEmpty(groupId)) response.setRenderParameter("groupId", groupId); + if(!isEmpty(artifactId)) response.setRenderParameter("artifactId", artifactId); + if(!isEmpty(version)) response.setRenderParameter("version", version); + if(!isEmpty(format)) response.setRenderParameter("format", format); return getMode(); } @@ -57,6 +68,11 @@ PluginInstaller pluginInstaller = ManagementHelper.getManagementHelper(request).getPluginInstaller(); String[] configIds = request.getParameterValues("pluginIds"); + String relativeServerPath = request.getParameter("relativeServerPath"); + String groupId = request.getParameter("groupId"); + String artifactId = request.getParameter("artifactId"); + String version = request.getParameter("version"); + String format = request.getParameter("format"); PluginListType list = getServerPluginList(request, pluginInstaller); PluginListType installList = getPluginsFromIds(configIds, list); @@ -69,17 +85,23 @@ } request.setAttribute("plugins", plugins); + request.setAttribute("relativeServerPath", relativeServerPath); + request.setAttribute("groupId", groupId); + request.setAttribute("artifactId", artifactId); + request.setAttribute("version", version); + request.setAttribute("format", format); + request.setAttribute("allInstallable", true); request.setAttribute("mode", ASSEMBLY_VIEW_MODE + "-after"); } public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException { - String relativeServerPath = "var/temp/assembly"; - String group = "test"; - String artifact = "testserver"; - String version = "1.0"; - String format = "tar.gz"; - + String relativeServerPath = request.getParameter("relativeServerPath"); + String groupId = request.getParameter("groupId"); + String artifactId = request.getParameter("artifactId"); + String version = request.getParameter("version"); + String format = request.getParameter("format"); + PluginInstaller pluginInstaller = ManagementHelper.getManagementHelper(request).getPluginInstaller(); ServerArchiver archiver = ManagementHelper.getManagementHelper(request).getArchiver(); String[] configIds = request.getParameterValues("configId"); @@ -89,7 +111,7 @@ try { DownloadResults downloadResults = pluginInstaller.installPluginList("repository", relativeServerPath, installList); - archiver.archive(relativeServerPath, "var/temp", new Artifact(group, artifact, version, format)); + archiver.archive(relativeServerPath, "var/temp", new Artifact(groupId, artifactId, version, format)); } catch (Exception e) { throw new PortletException("Could not assemble server", e); } Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets.properties URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets.properties?rev=614044&r1=614043&r2=614044&view=diff ============================================================================== --- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets.properties (original) +++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets.properties Mon Jan 21 15:17:28 2008 @@ -60,13 +60,21 @@ car.download.foundDependencies = Found the following dependencies for this plugin. Any missing dependencies will be installed for you automatically if you proceed. car.download.processing = Processing {0}... car.downloadStatus.processing = Processing {0}... +car.index.assembleServerLong = Assemble a server from plugins in this one +car.index.assembleServer = Assemble a server car.index.createGeronimoPluginExp = Choose a configuration in the current Geronimo server to export as a Geronimo plugin. The configuration will be saved as a CAR file to your local filesystem.Note: at present, you must manually add a META-INF/geronimo-plugin.xml file to the CAR after you export it in order for it to be a valid plugin. car.index.optionalAuthentication = Optional Authentication car.index.removePluginsExp = To remove a plugin, use the categories under Applications to locate the plugin module and uninstall it. car.index.summary =

This portlet lets you install or create Geronimo plugins. This can be used to install new features into a Geronimo server at runtime.

Install Geronimo Plugins

Choose a remote repository to inspect for available Geronimo plugins. The repository must have a geronimo-plugins.xml file in the root directory listing the available plugins in the repository.

You can also download running configurations from another Geronimo server just as if you're browsing and installing third-party plugins. If you want to point to a remote Geronimo server, enter a URL such as http://geronimo-server:8080/plugin/maven-repo/ and the enter the administrator username and password in the optional authentication fields.

car.index.updateRepositoryList = Update Repository List +car.list.assemblyArtifactId = Assembly artifactId: +car.list.assemblyFormat = Assembly format: +car.list.assemblyGroupId = Assembly groupId: +car.list.assemblyPath = Assembly target path: +car.list.assemblyVersion = Assembly version: car.list.noPlugins = No plugins are listed at this repository. -car.list.pluginRepo = Plugins listed at +car.list.pluginLocal = Plugins in local server +car.list.pluginRepo = Plugins listed at car.pluginParams.JVMVersionsExp = An optional list of JVM version prefixes supported by this plugin. If no values are listed, the plugin can be installed in Geronimo running in any version of the JVM. Otherwise, list one acceptable JVM version perfix per line, like "1.4.2 \r\n 1.5 \r\n ..." (ideally, of course, this means you've actually tested the plugin with Geronimo on each JVM version listed here). car.pluginParams.authorExp = The author of the plug, which may be a person, company, open source project, etc. car.pluginParams.categoryExp = The category this plugin falls into. Plugins in the same category will be listed together. If this plugin is intended to be listed on geronimoplugins.com then you should use one of the category names there if any of them fit. Otherwise, you can select this freely, or according to the categories acceptable to the repository where you plan to post this. Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets_zh.properties URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets_zh.properties?rev=614044&r1=614043&r2=614044&view=diff ============================================================================== --- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets_zh.properties (original) +++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets_zh.properties Mon Jan 21 15:17:28 2008 @@ -60,12 +60,20 @@ car.download.foundDependencies = \u4E0B\u9762\u662F\u627E\u5230\u7684\u8FD9\u4E2A\u63D2\u4EF6\u7684\u4F9D\u8D56\u9879\u3002\u5982\u679C\u4F60\u7EE7\u7EED\u7684\u8BDD\uFF0C\u5C06\u4F1A\u81EA\u52A8\u5730\u5B89\u88C5\u4EFB\u4F55\u7F3A\u5C11\u7684\u4F9D\u8D56\u9879\u3002 car.download.processing = \u5904\u7406{0}\u4E2D... car.downloadStatus.processing = \u5904\u7406\u4E2D{0}... +car.index.assembleServerLong = Assemble a server from plugins in this one +car.index.assembleServer = Assemble a server car.index.createGeronimoPluginExp = \u5728\u5F53\u524DGeronimo\u670D\u52A1\u5668\u4E2D\u9009\u62E9\u8981\u4F5C\u4E3AGeronimo\u63D2\u4EF6\u5BFC\u51FA\u7684\u914D\u7F6E\u3002\u8FD9\u4E2A\u914D\u7F6E\u5C06\u4EE5CAR\u6587\u4EF6\u7684\u5F62\u5F0F\u4FDD\u5B58\u5230\u4F60\u672C\u5730\u7CFB\u7EDF\u4E2D\u3002\u6CE8\u610F\uFF1A\u5728\u4F60\u5C06\u5B83\u5BFC\u51FA\u540E\uFF0C\u76EE\u524D\u8981\u4F7F\u5B83\u5F53\u4F5C\u4E00\u4E2A\u6709\u6548\u7684\u63D2\u4EF6\uFF0C\u4F60\u5FC5\u987B\u624B\u52A8\u5730\u6DFB\u52A0META-INF/geronimo-plugin.xml\u6587\u4EF6\u5230CAR\u4E2D\u3002 car.index.optionalAuthentication = \u53EF\u9009\u9A8C\u8BC1\u4FE1\u606F car.index.removePluginsExp = \u4E3A\u4E86\u5220\u9664\u4E00\u4E2A\u63D2\u4EF6\uFF0C\u5728\u53F3\u8FB9\u5BFC\u822A\u9762\u677F\u7684\u5E94\u7528\u7A0B\u5E8F\u4E0B\u76F8\u5E94\u7684\u7C7B\u522B\u4E2D\u627E\u5230\u63D2\u4EF6\u7684\u6A21\u5757\uFF0C\u5E76\u5378\u8F7D\u5B83\u3002 car.index.summary =

\u8FD9\u4E2Aportlet\u8BA9\u4F60\u5B89\u88C5\u6216\u8005\u521B\u5EFAGeronimo\u63D2\u4EF6\u3002\u8FD9\u53EF\u4EE5\u7528\u4E8E\u5728\u8FD0\u884C\u65F6\u5B89\u88C5\u65B0\u7684features\u5230\u4F60\u7684Geronimo\u670D\u52A1\u5668\u4E2D\u3002

\u5B89\u88C5Geronimo\u63D2\u4EF6

\u9009\u62E9\u4E00\u4E2A\u8FDC\u7A0B\u7684\u4ED3\u5E93\u6765\u67E5\u770B\u53EF\u7528\u7684Geronimo\u63D2\u4EF6\u3002\u4ED3\u5E93\u7684\u6839\u76EE\u5F55\u4E0B\u5E94\u5F53\u6709\u4E00\u4E2Ageronimo-plugins.xml\u6587\u4EF6\uFF0C\u8FD9\u4E2A\u6587\u4EF6\u7528\u4E8E\u5217\u51FA\u5728\u4ED3\u5E93\u4E2D\u53EF\u7528\u7684\u63D2\u4EF6\u3002

\u4F60\u4E5F\u53EF\u4EE5\u5C31\u50CF\u6D4F\u89C8\u5E76\u5B89\u88C5\u7B2C\u4E09\u65B9\u63D2\u4EF6\u4E00\u6837\u4ECE\u53E6\u4E00\u4E2AGeronimo\u670D\u52A1\u5668\u4E2D\u4E0B\u8F7D\u8FD0\u884C\u65F6\u7684\u914D\u7F6E\uFF0C\u5982\u679C\u4F60\u8981\u6307\u5411\u8FDC\u7A0B\u7684Geronimo\u670D\u52A1\u5668\uFF0 C\u8F93\u5165\u50CFhttp://geronimo-server:8080/plugin/maven-repo/\u7684URL\uFF0C\u4EE5\u53CA\u8F93\u5165\u7528\u6237\u540D\u548C\u5BC6\u7801\u5230\u53EF\u9009\u7684\u4E0E\u9A8C\u8BC1\u6709\u5173\u7684\u5B57\u6BB5\u4E2D\u3002 car.index.updateRepositoryList = \u66F4\u65B0\u5B58\u50A8\u5E93\u5217\u8868 +car.list.assemblyArtifactId = Assembly artifactId: +car.list.assemblyFormat = Assembly format: +car.list.assemblyGroupId = Assembly groupId: +car.list.assemblyPath = Assembly target path: +car.list.assemblyVersion = Assembly version: car.list.noPlugins = \u6B64\u7AD9\u70B9\u4E0B\u6CA1\u6709Plugin. +car.list.pluginLocal = Plugins in local server car.list.pluginRepo = Plugins\u4F4D\u4E8E car.pluginParams.JVMVersionsExp = \u4E00\u4E2A\u53EF\u9009\u7684\u5217\u8868\uFF0C\u7528\u4E8E\u5217\u51FA\u8FD9\u4E2A\u63D2\u4EF6\u652F\u6301\u7684JVM\u7248\u672C\u7684\u524D\u7F00\u3002\u5982\u679C\u6CA1\u6709\u5217\u51FA\u4EFB\u4F55\u503C\u7684\u8BDD\uFF0C\u8FD9\u4E2A\u63D2\u4EF6\u53EF\u5B89\u88C5\u5728\u8FD0\u884C\u4E8E\u4EFB\u4F55\u7248\u672C\u7684JVM\u7684Geronimo\u4E2D\u3002\u4E0D\u7136\u7684\u8BDD\uFF0C\u6BCF\u4E00\u884C\u5217\u51FA\u4E00\u4E2A\u53EF\u63A5\u53D7\u7684JVM\u7248\u672C\u524D\u7F00\uFF0C\u5C31\u50CF"1.4.2 \r\n 1.5 \r\n ..." (\u5F53\u7136\uFF0C\u7406\u60F3\u60C5\u51B5\u4E0B\uFF0C\u8FD9\u610F\u5473\u7740\u5728\u8FD9\u91CC\u5217\u51FA\u7684JVN\u7248\u672C\u4E2D\uFF0C\u4F60\u786E\u5B9E\u5DF2\u7ECF\u6D4B\u8BD5\u8FC7\u8FD9\u4E2A\u63D2\u4EF6)\u3002 car.pluginParams.authorExp = \u63D2\u4EF6\u7684\u4F5C\u8005\uFF0C\u8FD9\u53EF\u80FD\u662F\u4EBA\u540D\uFF0C\u516C\u53F8\u540D\uFF0C\u5F00\u6E90\u9879\u76EE\u7684\u540D\u79F0\u7B49\u7B49\u3002 Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblylist.jsp URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblylist.jsp?rev=614044&r1=614043&r2=614044&view=diff ============================================================================== --- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblylist.jsp (original) +++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblylist.jsp Mon Jan 21 15:17:28 2008 @@ -21,7 +21,6 @@ -

${repository}

@@ -29,7 +28,17 @@
- +

Name the server to be assembled

+ +

+

+

+

+

+

Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/index.jsp URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/index.jsp?rev=614044&r1=614043&r2=614044&view=diff ============================================================================== --- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/index.jsp (original) +++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/index.jsp Mon Jan 21 15:17:28 2008 @@ -14,54 +14,56 @@ See the License for the specific language governing permissions and limitations under the License. --%> -<%@ page import="org.apache.geronimo.console.util.PortletManager"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> -<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%> -<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> +<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> - + - - : <%-- todo: entry field for user-specified list --%> + + : <%-- todo: entry field for user-specified list --%> -
- ("> - or ">) - <%----%> +
+

">

+ +

"> +

- -
: - : - : +
: + : + : +
-

-

+

+ +

- + - + -

Assemble a server from plugins in this one

+

- - + + Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp?rev=614044&r1=614043&r2=614044&view=diff ============================================================================== --- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp (original) +++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp Mon Jan 21 15:17:28 2008 @@ -149,6 +149,11 @@ + + + + +