You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polygene.apache.org by ni...@apache.org on 2016/06/10 05:35:38 UTC
[1/2] zest-java git commit: ZEST-143 - Documentation
Repository: zest-java
Updated Branches:
refs/heads/develop 9a1fed06d -> 160face48
ZEST-143 - Documentation
Project: http://git-wip-us.apache.org/repos/asf/zest-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-java/commit/28e2b695
Tree: http://git-wip-us.apache.org/repos/asf/zest-java/tree/28e2b695
Diff: http://git-wip-us.apache.org/repos/asf/zest-java/diff/28e2b695
Branch: refs/heads/develop
Commit: 28e2b695e124cb19b6f8a606e2c20ac8005e8d8b
Parents: 9a1fed0
Author: Niclas Hedhman <ni...@hedhman.org>
Authored: Fri Jun 10 11:29:15 2016 +0800
Committer: Niclas Hedhman <ni...@hedhman.org>
Committed: Fri Jun 10 11:29:15 2016 +0800
----------------------------------------------------------------------
manual/src/docs/website/intro.txt | 4 ++
tools/shell/src/dist/bin/zest-boot | 0
tools/shell/src/docs/quick-start.txt | 61 +++++++++++++++++++++++++++++++
tools/shell/src/docs/use-boot.txt | 46 +++++++++++++++++++++++
4 files changed, 111 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/zest-java/blob/28e2b695/manual/src/docs/website/intro.txt
----------------------------------------------------------------------
diff --git a/manual/src/docs/website/intro.txt b/manual/src/docs/website/intro.txt
index 1e17772..66142b2 100644
--- a/manual/src/docs/website/intro.txt
+++ b/manual/src/docs/website/intro.txt
@@ -28,6 +28,10 @@ include::../../../../tutorials/introduction/src/docs/highlights.txt[]
:leveloffset: 2
+include::../../../../tools/shell/src/docs/quick-start.txt[]
+
+:leveloffset: 2
+
include::../../../../tutorials/introduction/src/docs/background.txt[]
:leveloffset: 2
http://git-wip-us.apache.org/repos/asf/zest-java/blob/28e2b695/tools/shell/src/dist/bin/zest-boot
----------------------------------------------------------------------
diff --git a/tools/shell/src/dist/bin/zest-boot b/tools/shell/src/dist/bin/zest-boot
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/zest-java/blob/28e2b695/tools/shell/src/docs/quick-start.txt
----------------------------------------------------------------------
diff --git a/tools/shell/src/docs/quick-start.txt b/tools/shell/src/docs/quick-start.txt
new file mode 100644
index 0000000..50efae5
--- /dev/null
+++ b/tools/shell/src/docs/quick-start.txt
@@ -0,0 +1,61 @@
+///////////////////////////////////////////////////////////////
+ * 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.
+///////////////////////////////////////////////////////////////
+
+WARNING! This guide is written before the code, and may not work yet.
+
+[[quick-start,Quick Start Guide]]
+= Quick Start =
+If you want to test Apache Zest in the smallest amount of time possible,
+without getting bogged down by the details, you have come to the right
+place.
+
+== Quick Download / No Install ==
+The following procedure will download one JAR file, one script and put it
+on your PATH.
+
+=== Windows ===
+TBD.
+
+=== Linux / Mac OSX ===
+The assumption is that ==wget== is installed.
+
+[snippet,bash]
+----
+source=tools/shell/src/docs/use-boot.txt
+tag=boot-quick
+----
+
+The boot script will place the the ==zest== script and the accompanying
+jar file into the $HOME/bin directory, which should already be on your PATH.
+
+== Create a small Project ==
+
+[snippet,bash]
+----
+source=tools/shell/src/docs/use-boot.txt
+tag=create-singleton
+----
+
+== Create a complete Project ==
+
+[snippet,bash]
+----
+source=tools/shell/src/docs/use-boot.txt
+tag=create-ngheroes
+----
http://git-wip-us.apache.org/repos/asf/zest-java/blob/28e2b695/tools/shell/src/docs/use-boot.txt
----------------------------------------------------------------------
diff --git a/tools/shell/src/docs/use-boot.txt b/tools/shell/src/docs/use-boot.txt
new file mode 100644
index 0000000..3f14825
--- /dev/null
+++ b/tools/shell/src/docs/use-boot.txt
@@ -0,0 +1,46 @@
+///////////////////////////////////////////////////////////////
+ * 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.
+///////////////////////////////////////////////////////////////
+
+THIS FILE CONTAINS SNIPPETS for quick-start.txt and shell.txt. DO NOT INCLUDE IN DOCUMENTATION.
+
+
+START SNIPPET: boot-quick
+wget http://zest.apache.org/latest/shell/zest-boot
+sh zest-boot quick
+END SNIPPET: boot-quick
+
+START SNIPPET: boot-sdk
+wget http://zest.apache.org/latest/shell/zest-boot
+sh zest-boot sdk
+END SNIPPET: boot-sdk
+
+START SNIPPET: create-singleton
+zest create-project singleton com.acme.quick quickstart
+cd quickstart
+./gradlew assemble
+./gradlew run
+END SNIPPET: create-singleton
+
+START SNIPPET: create-ngheroes
+zest create-project ng-heroes com.acme.heroes heroes
+cd heroes
+./gradlew assemble
+./gradlew run
+END SNIPPET: create-ngheroes
+
[2/2] zest-java git commit: ZEST-143 - Better to have a single script
that downloads the needed bit if not already done so. I am calling this
QuickStart mode.
Posted by ni...@apache.org.
ZEST-143 - Better to have a single script that downloads the needed bit if not already done so. I am calling this QuickStart mode.
Project: http://git-wip-us.apache.org/repos/asf/zest-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-java/commit/160face4
Tree: http://git-wip-us.apache.org/repos/asf/zest-java/tree/160face4
Diff: http://git-wip-us.apache.org/repos/asf/zest-java/diff/160face4
Branch: refs/heads/develop
Commit: 160face48358fade99a05b5d3319726b12b694ea
Parents: 28e2b69
Author: Niclas Hedhman <ni...@hedhman.org>
Authored: Fri Jun 10 13:35:34 2016 +0800
Committer: Niclas Hedhman <ni...@hedhman.org>
Committed: Fri Jun 10 13:35:34 2016 +0800
----------------------------------------------------------------------
tools/shell/src/dist/bin/zest | 31 ----------------
tools/shell/src/dist/bin/zest-boot | 60 +++++++++++++++++++++++++++++++
tools/shell/src/dist/bin/zest.bat_ | 25 -------------
tools/shell/src/docs/quick-start.txt | 4 +--
4 files changed, 62 insertions(+), 58 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/zest-java/blob/160face4/tools/shell/src/dist/bin/zest
----------------------------------------------------------------------
diff --git a/tools/shell/src/dist/bin/zest b/tools/shell/src/dist/bin/zest
deleted file mode 100644
index c1918de..0000000
--- a/tools/shell/src/dist/bin/zest
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# Capture current directory
-CWD=`pwd`
-
-# Goto directory where this script was started from.
-cd `dirname $0`
-# Up one level
-cd ..
-# Get the home directory of Zest
-ZESTPATH=`pwd`
-
-# Restore the current directory
-cd $CWD
-
-java -Dzest.home=$ZESTPATH -jar $ZESTPATH/libs/org.apache.zest.tool.shell-@version@.jar "$@"
http://git-wip-us.apache.org/repos/asf/zest-java/blob/160face4/tools/shell/src/dist/bin/zest-boot
----------------------------------------------------------------------
diff --git a/tools/shell/src/dist/bin/zest-boot b/tools/shell/src/dist/bin/zest-boot
index e69de29..9db6db8 100644
--- a/tools/shell/src/dist/bin/zest-boot
+++ b/tools/shell/src/dist/bin/zest-boot
@@ -0,0 +1,60 @@
+#!/bin/sh
+# This files copies itself to $HOME/bin, renames itself to "zest"
+# and from then on pretends to be the tools.shell script.
+#
+
+JARNAME=org.apache.zest.tool.shell-@version@.jar
+
+MYNAME=`basename $0`
+
+# check if it is executing as boot script or regular script.
+if [ "$MYNAME" == "zest-boot" ] ; then
+ mkdir $HOME/bin >/dev/null 2>&1
+ cp $0 $HOME/bin/zest
+ if [ -f $HOME/bin/$JARNAME ] ; then
+ echo "JAR file exists."
+ else
+ JAR_URL=http://repo1.maven.org/maven2/org/apache/zest/$JARNAME
+
+ # check for wget
+ WGET=`which wget`
+
+ if [ "$WGET" == "" ] ; then
+
+ # check for curl
+ CURL=`which curl`
+ if [ "$CURL" == "" ] ; then
+ echo "You need either wget or curl installed to use this script."
+ exit 1
+ else
+ curl --output $HOME/bin/zest $JAR_URL
+ fi
+ else
+ wget --output-document=$HOME/bin/zest $HOME/bin/zest $JAR_URL
+ fi
+ fi
+else
+ # Capture current directory
+ CWD=`pwd`
+
+ # Goto directory where this script was started from.
+ cd `dirname $0`
+ # Up one level
+ cd ..
+ # Get the home directory of Zest
+ ZESTPATH=`pwd`
+
+ # Figure out if we are executing from within the SDK or the QuickStart
+ if [ -f libs/$JARNAME ] ; then
+ JARFILE=libs/$JARNAME
+ else
+ if [ -f bin/$JARNAME ] ; then
+ JARFILE=bin/$JARNAME
+ else
+ fi
+ fi
+ # Restore the current directory
+ cd $CWD
+
+ java -Dzest.home=$ZESTPATH -jar $ZESTPATH/$JARFILE "$@"
+fi
http://git-wip-us.apache.org/repos/asf/zest-java/blob/160face4/tools/shell/src/dist/bin/zest.bat_
----------------------------------------------------------------------
diff --git a/tools/shell/src/dist/bin/zest.bat_ b/tools/shell/src/dist/bin/zest.bat_
deleted file mode 100644
index 3d85fbf..0000000
--- a/tools/shell/src/dist/bin/zest.bat_
+++ /dev/null
@@ -1,25 +0,0 @@
-REM Licensed to the Apache Software Foundation (ASF) under one or more
-REM contributor license agreements. See the NOTICE file distributed with
-REM this work for additional information regarding copyright ownership.
-REM The ASF licenses this file to You under the Apache License, Version 2.0
-REM (the "License"); you may not use this file except in compliance with
-REM the License. You may obtain a copy of the License at
-REM
-REM http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing, software
-REM distributed under the License is distributed on an "AS IS" BASIS,
-REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM See the License for the specific language governing permissions and
-REM limitations under the License.
-
-
-REM TODO: Windows user to fix this script, please!
-
-REM Absolute path to this script, e.g. /home/user/bin/foo.sh
-REM ZESTSCRIPT=$(readlink -f "$0")
-REM Absolute path this script is in, thus /home/user/bin
-REM ZESTPATH=$(dirname "$ZESTSCRIPT")
-
-java -Dzest.home=$ZESTPATH -jar org.apache.zest.tools.shell-@@version@@.jar "$@"
-
http://git-wip-us.apache.org/repos/asf/zest-java/blob/160face4/tools/shell/src/docs/quick-start.txt
----------------------------------------------------------------------
diff --git a/tools/shell/src/docs/quick-start.txt b/tools/shell/src/docs/quick-start.txt
index 50efae5..644ebd9 100644
--- a/tools/shell/src/docs/quick-start.txt
+++ b/tools/shell/src/docs/quick-start.txt
@@ -33,7 +33,7 @@ on your PATH.
TBD.
=== Linux / Mac OSX ===
-The assumption is that ==wget== is installed.
+The assumption is that +wget+ is installed.
[snippet,bash]
----
@@ -41,7 +41,7 @@ source=tools/shell/src/docs/use-boot.txt
tag=boot-quick
----
-The boot script will place the the ==zest== script and the accompanying
+The boot script will place the the +zest+ script and the accompanying
jar file into the $HOME/bin directory, which should already be on your PATH.
== Create a small Project ==