You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2007/10/25 10:38:40 UTC
svn commit: r588164 - in
/incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core: ./
src/main/filtered-resources/ src/main/filtered-resources/org/
src/main/filtered-resources/org/apache/
src/main/filtered-resources/org/apache/geronimo/ src/mai...
Author: gnodet
Date: Thu Oct 25 01:38:26 2007
New Revision: 588164
URL: http://svn.apache.org/viewvc?rev=588164&view=rev
Log:
Change gshell branding to ServiceMix
Added:
incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/filtered-resources/
incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/filtered-resources/org/
incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/filtered-resources/org/apache/
incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/
incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/
incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/
incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties
incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/branding/
incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/branding/ServiceMixBranding.java
Modified:
incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/pom.xml
incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml
incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml
Modified: incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/pom.xml?rev=588164&r1=588163&r2=588164&view=diff
==============================================================================
--- incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/pom.xml (original)
+++ incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/pom.xml Thu Oct 25 01:38:26 2007
@@ -162,6 +162,22 @@
</dependencies>
<build>
+ <resources>
+ <resource>
+ <directory>${pom.basedir}/src/main/resources</directory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+
+ <resource>
+ <directory>${pom.basedir}/src/main/filtered-resources</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ </resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Added: incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties?rev=588164&view=auto
==============================================================================
--- incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties (added)
+++ incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/filtered-resources/org/apache/geronimo/gshell/branding/servicemix-version.properties Thu Oct 25 01:38:26 2007
@@ -0,0 +1,20 @@
+##
+## 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.
+##
+
+version=${pom.version}
Added: incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/branding/ServiceMixBranding.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/branding/ServiceMixBranding.java?rev=588164&view=auto
==============================================================================
--- incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/branding/ServiceMixBranding.java (added)
+++ incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/branding/ServiceMixBranding.java Thu Oct 25 01:38:26 2007
@@ -0,0 +1,92 @@
+package org.apache.geronimo.gshell.branding;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import jline.Terminal;
+import org.apache.geronimo.gshell.ansi.Buffer;
+import org.apache.geronimo.gshell.ansi.Code;
+import org.apache.geronimo.gshell.ansi.RenderWriter;
+import org.codehaus.plexus.util.StringUtils;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Oct 25, 2007
+ * Time: 10:14:06 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class ServiceMixBranding extends BrandingSupport {
+
+ private static final String[] BANNER = {
+ " ____ _ __ __ _ ",
+ "/ ___| ___ _ ____ _(_) ___ ___| \\/ (_)_ __",
+ "\\___ \\ / _ \\ '__\\ \\ / / |/ __/ _ \\ |\\/| | \\ \\/ /",
+ " ___) | __/ | \\ V /| | (_| __/ | | | |> <",
+ "|____/ \\___|_| \\_/ |_|\\___\\___|_| |_|_/_/\\_\\",
+ };
+
+ private VersionLoader versionLoader;
+
+ private Terminal terminal;
+
+ public ServiceMixBranding(final VersionLoader versionLoader, final Terminal terminal) {
+ this.versionLoader = versionLoader;
+ this.terminal = terminal;
+ }
+
+ public String getName() {
+ return "smx";
+ }
+
+ public String getDisplayName() {
+ return "ServiceMix";
+ }
+
+ public String getProgramName() {
+ return System.getProperty("program.name", "gsh");
+ }
+
+ public String getAbout() {
+ StringWriter writer = new StringWriter();
+ PrintWriter out = new RenderWriter(writer);
+
+ out.println("For information about @|cyan ServiceMix|, visit:");
+ out.println(" @|bold http://servicemix.apache.org| ");
+ out.flush();
+
+ return writer.toString();
+ }
+
+ public String getVersion() {
+ return versionLoader.getVersion();
+ }
+
+ public String getWelcomeBanner() {
+ StringWriter writer = new StringWriter();
+ PrintWriter out = new RenderWriter(writer);
+ Buffer buff = new Buffer();
+
+ for (String line : BANNER) {
+ buff.attrib(line, Code.CYAN);
+ out.println(buff);
+ }
+
+ out.println();
+ out.println(" @|bold ServiceMix| (" + getVersion() + ")");
+ out.println();
+ out.println("Type '@|bold help|' for more information.");
+
+ // If we can't tell, or have something bogus then use a reasonable default
+ int width = terminal.getTerminalWidth();
+ if (width < 1) {
+ width = 80;
+ }
+
+ out.print(StringUtils.repeat("-", width - 1));
+
+ out.flush();
+
+ return writer.toString();
+ }
+}
Modified: incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml?rev=588164&r1=588163&r2=588164&view=diff
==============================================================================
--- incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml (original)
+++ incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml Thu Oct 25 01:38:26 2007
@@ -28,7 +28,7 @@
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/osgi
- http://www.springframework.org/schema/osgi/spring-osgi-1.0-m3.xsd
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://www.springframework.org/schema/osgi-compendium
http://www.springframework.org/schema/osgi/spring-osgi-compendium.xsd">
Modified: incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml?rev=588164&r1=588163&r2=588164&view=diff
==============================================================================
--- incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml (original)
+++ incubator/servicemix/branches/servicemix-4.0/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml Thu Oct 25 01:38:26 2007
@@ -26,13 +26,13 @@
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
- <bean id="branding" class="org.apache.geronimo.gshell.branding.DefaultBranding">
+ <bean id="branding" class="org.apache.geronimo.gshell.branding.ServiceMixBranding">
<constructor-arg ref="versionLoader" />
<constructor-arg ref="terminal" />
</bean>
<bean id="versionLoader" class="org.apache.geronimo.gshell.branding.PropertiesVersionLoader">
- <constructor-arg value="version.properties" />
+ <constructor-arg value="servicemix-version.properties" />
</bean>
<bean id="terminal" class="jline.Terminal" factory-method="getTerminal" />