Repository: ambari Updated Branches: refs/heads/trunk e58e53fab -> a00189a36
AMBARI-9023. License issue in Ambari Shell. (Krisztian Horvath via yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a00189a3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a00189a3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a00189a3 Branch: refs/heads/trunk Commit: a00189a36375038c3d500f3f36e03b4aa4191737 Parents: e58e53f Author: Yusaku Sako <[email protected]> Authored: Wed Jan 7 12:31:12 2015 -0800 Committer: Yusaku Sako <[email protected]> Committed: Wed Jan 7 12:31:12 2015 -0800 ---------------------------------------------------------------------- ambari-project/pom.xml | 5 ----- ambari-shell/ambari-groovy-shell/pom.xml | 5 +---- .../apache/ambari/shell/customization/AmbariBanner.java | 11 ++++++++--- .../ambari-groovy-shell/src/main/resources/banner.txt | 5 +++++ 4 files changed, 14 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/a00189a3/ambari-project/pom.xml ---------------------------------------------------------------------- diff --git a/ambari-project/pom.xml b/ambari-project/pom.xml index 1ce8595..6bae5ab 100644 --- a/ambari-project/pom.xml +++ b/ambari-project/pom.xml @@ -444,11 +444,6 @@ <version>1.0.2.RELEASE</version> </dependency> <dependency> - <groupId>com.github.lalyos</groupId> - <artifactId>jfiglet</artifactId> - <version>0.0.3</version> - </dependency> - <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-all</artifactId> <version>2.1.8</version> http://git-wip-us.apache.org/repos/asf/ambari/blob/a00189a3/ambari-shell/ambari-groovy-shell/pom.xml ---------------------------------------------------------------------- diff --git a/ambari-shell/ambari-groovy-shell/pom.xml b/ambari-shell/ambari-groovy-shell/pom.xml index ed4d0b6..6739137 100644 --- a/ambari-shell/ambari-groovy-shell/pom.xml +++ b/ambari-shell/ambari-groovy-shell/pom.xml @@ -44,10 +44,6 @@ <artifactId>spring-boot-starter-test</artifactId> </dependency> <dependency> - <groupId>com.github.lalyos</groupId> - <artifactId>jfiglet</artifactId> - </dependency> - <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.3</version> @@ -94,6 +90,7 @@ <configuration> <excludes> <exclude>src/main/resources/elephant.txt</exclude> + <exclude>src/main/resources/banner.txt</exclude> <exclude>src/test/resources/2columns</exclude> <exclude>src/test/resources/3columns</exclude> <exclude>src/test/resources/testBlueprint.json</exclude> http://git-wip-us.apache.org/repos/asf/ambari/blob/a00189a3/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/customization/AmbariBanner.java ---------------------------------------------------------------------- diff --git a/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/customization/AmbariBanner.java b/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/customization/AmbariBanner.java index f97ef59..850687e 100644 --- a/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/customization/AmbariBanner.java +++ b/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/customization/AmbariBanner.java @@ -17,11 +17,12 @@ */ package org.apache.ambari.shell.customization; +import java.io.IOException; + +import org.apache.commons.io.IOUtils; import org.springframework.shell.plugin.BannerProvider; import org.springframework.stereotype.Component; -import com.github.lalyos.jfiglet.FigletFont; - /** * Prints the banner when the user starts the shell. */ @@ -35,7 +36,11 @@ public class AmbariBanner implements BannerProvider { @Override public String getBanner() { - return FigletFont.convertOneLine("AmbariShell"); + try { + return IOUtils.toString(getClass().getResourceAsStream("/banner.txt")); + } catch (IOException e) { + return "AmbariShell"; + } } @Override http://git-wip-us.apache.org/repos/asf/ambari/blob/a00189a3/ambari-shell/ambari-groovy-shell/src/main/resources/banner.txt ---------------------------------------------------------------------- diff --git a/ambari-shell/ambari-groovy-shell/src/main/resources/banner.txt b/ambari-shell/ambari-groovy-shell/src/main/resources/banner.txt new file mode 100644 index 0000000..338418e --- /dev/null +++ b/ambari-shell/ambari-groovy-shell/src/main/resources/banner.txt @@ -0,0 +1,5 @@ + _ _ _ ____ _ _ _ + / \ _ __ ___ | |__ __ _ _ __ (_)/ ___| | |__ ___ | || | + / _ \ | '_ ` _ \ | '_ \ / _` || '__|| |\___ \ | '_ \ / _ \| || | + / ___ \ | | | | | || |_) || (_| || | | | ___) || | | || __/| || | +/_/ \_\|_| |_| |_||_.__/ \__,_||_| |_||____/ |_| |_| \___||_||_|
