You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2016/02/01 18:29:23 UTC

[49/50] brooklyn-docs git commit: doc links updated to point at sonatype and maven central (in addition to cloudsoft) (backport cherrypicked from master)

doc links updated to point at sonatype and maven central (in addition to cloudsoft)
(backport cherrypicked from master)


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/8473e4b0
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/8473e4b0
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/8473e4b0

Branch: refs/heads/0.4.0
Commit: 8473e4b0e58f3d1e5fbf3ed5c812afd61b59dc49
Parents: 6c04910
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Fri Jan 11 16:50:17 2013 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Mon Jan 14 16:50:53 2013 +0000

----------------------------------------------------------------------
 docs/_includes/fields.md                  |  38 ++++++-
 docs/start/download.md                    | 131 +++++++++++++++++--------
 docs/use/examples/before-begin.include.md |  23 +++--
 3 files changed, 139 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/8473e4b0/docs/_includes/fields.md
----------------------------------------------------------------------
diff --git a/docs/_includes/fields.md b/docs/_includes/fields.md
index 72beb0f..96ceadb 100644
--- a/docs/_includes/fields.md
+++ b/docs/_includes/fields.md
@@ -1,8 +1,36 @@
 {% if site.brooklyn-version contains 'SNAPSHOT' %}{% capture SNAPSHOT %}true{% endcapture %}{% endif %}
 
-{% capture maven_this_version_base_url %}http://developers.cloudsoftcorp.com/maven/{% if SNAPSHOT %}snapshots/{% else %}releases/{% endif %}{% endcapture %}
-{% capture dist_url_dir %}{{ maven_this_version_base_url }}io/brooklyn/brooklyn-dist/{{ site.brooklyn-version }}{% endcapture %}
-{% if SNAPSHOT %}{% else %}
-  {% capture dist_url_zip %}{{ dist_url_dir }}/brooklyn-{{ site.brooklyn-version }}-dist.zip{% endcapture %}
-  {% capture dist_url_zip %}{{ dist_url_tgz }}/brooklyn-{{ site.brooklyn-version }}-dist.tar.gz{% endcapture %}
+{% capture brooklyn_examples_branch %}{% if SNAPSHOT %}{{ site.brooklyn-snapshot-git-branch }}{% else %}{{ site.brooklyn-version }}{% endif %}{% endcapture %}
+
+{% capture cloudsoft_snapshots_base_url %}http://developers.cloudsoftcorp.com/maven/snapshots/{% endcapture %}
+{% capture cloudsoft_releases_base_url %}http://developers.cloudsoftcorp.com/maven/releases/{% endcapture %}
+{% capture cloudsoft_this_version_base_url %}http://developers.cloudsoftcorp.com/maven/{% if SNAPSHOT %}snapshots/{% else %}releases/{% endif %}{% endcapture %}
+
+{% capture cloudsoft_this_version_groupid_url %}{{ cloudsoft_this_version_base_url }}io/brooklyn/{% endcapture %}
+{% capture cloudsoft_this_dist_url_dir %}{{ cloudsoft_this_version_groupid_url }}brooklyn-dist/{{ site.brooklyn-version }}/{% endcapture %}
+{% capture cloudsoft_this_alljar_url_dir %}{{ cloudsoft_this_version_groupid_url }}brooklyn-all/{{ site.brooklyn-version }}/{% endcapture %}
+
+<!--- both snapshots and releases -->
+{% capture sonatype_repo_groupid_url %}https://oss.sonatype.org/content/groups/public/io/brooklyn/{% endcapture %}
+<!--- releases --> 
+{% capture mavencentral_repo_groupid_url %}http://repo1.maven.org/maven2/io/brooklyn/{% endcapture %}
+
+{% if SNAPSHOT %}
+  {% capture this_anything_url_search %}https://oss.sonatype.org/index.html#nexus-search;gav~io.brooklyn~~{{ site.brooklyn-version }}~~{% endcapture %}
+  {% capture this_dist_url_search %}https://oss.sonatype.org/index.html#nexus-search;gav~io.brooklyn~brooklyn-dist~{{ site.brooklyn-version }}~~{% endcapture %}
+  {% capture this_alljar_url_search %}https://oss.sonatype.org/index.html#nexus-search;gav~io.brooklyn~brooklyn-dist~{{ site.brooklyn-version }}~~{% endcapture %}
+  {% capture this_dist_url_dir %}{{ sonatype_repo_groupid_url }}brooklyn-dist/{{ site.brooklyn-version }}/{% endcapture %}
+  {% capture this_alljar_url_dir %}{{ sonatype_repo_groupid_url }}brooklyn-all/{{ site.brooklyn-version }}/{% endcapture %}
+  {% capture this_dist_url_zip %}https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn&v={{ site.brooklyn-version }}&a=brooklyn-dist&c=dist&e=zip{% endcapture %}
+  {% capture this_dist_url_tgz %}https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn&v={{ site.brooklyn-version }}&a=brooklyn-dist&c=dist&e=tar.gz{% endcapture %}
+  {% capture this_alljar_url_jar  %}https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn&v={{ site.brooklyn-version }}&a=brooklyn-all&c=with-dependencies&e=jar{% endcapture %}
+{% else %}<!--- RELEASE -->
+  {% capture this_anything_url_search %}http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22io.brooklyn%22%20AND%20AND%20v%3A%22{{ site.brooklyn-version }}%22{% endcapture %}
+  {% capture this_dist_url_search %}http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22io.brooklyn%22%20AND%20a%3A%22brooklyn-dist%22%20AND%20v%3A%22{{ site.brooklyn-version }}%22{% endcapture %}
+  {% capture this_alljar_url_search %}http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22io.brooklyn%22%20AND%20a%3A%22brooklyn-all%22%20AND%20v%3A%22{{ site.brooklyn-version }}%22{% endcapture %}
+  {% capture this_dist_url_dir %}{{ mavencentral_repo_groupid_url }}brooklyn-dist/{{ site.brooklyn-version }}/{% endcapture %}
+  {% capture this_alljar_url_dir %}{{ mavencentral_repo_groupid_url }}brooklyn-all/{{ site.brooklyn-version }}/{% endcapture %}
+  {% capture this_dist_url_zip %}{{ mavencentral_repo_groupid_url }}brooklyn-dist/{{ site.brooklyn-version }}/brooklyn-dist-{{ site.brooklyn-version }}-dist.zip{% endcapture %}
+  {% capture this_dist_url_tgz %}{{ mavencentral_repo_groupid_url }}brooklyn-dist/{{ site.brooklyn-version }}/brooklyn-dist-{{ site.brooklyn-version }}-dist.tar.gz{% endcapture %}
+  {% capture this_alljar_url_jar %}{{ mavencentral_repo_groupid_url }}brooklyn-all/{{ site.brooklyn-version }}/brooklyn-all-{{ site.brooklyn-version }}-with-dependencies.jar{% endcapture %}
 {% endif %}

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/8473e4b0/docs/start/download.md
----------------------------------------------------------------------
diff --git a/docs/start/download.md b/docs/start/download.md
index a53dd8e..c56c34f 100644
--- a/docs/start/download.md
+++ b/docs/start/download.md
@@ -17,61 +17,116 @@ toc: ../toc.json
 
 {% include fields.md %}
 
-You can grab the distribution artifact, containing Brooklyn, its dependencies and launch scripts, 
-here{% if site.brooklyn-version contains 'SNAPSHOT' %} (but please **check the date** on snapshot artifacts){% endif %}:
-
-* [{{ site.brooklyn-version }}]({{ dist_url_dir }}/)
-* [all stable versions](http://developers.cloudsoftcorp.com/maven/releases/io/brooklyn/brooklyn-dist/)
-* [all snapshot versions](http://developers.cloudsoftcorp.com/maven/snapshots/io/brooklyn/brooklyn-dist/)
+Distribution archives containing Brooklyn as a standalone executable package 
+are available in the following formats and locations:
+
+* **v{{ site.brooklyn-version }}** at
+  {% if SNAPSHOT %}[Sonatype]({{ this_dist_url_search }})
+  {% else %}[Maven Central]({{ this_dist_url_search }})
+  {% endif %}: 
+  **[zip]({{ this_dist_url_zip }})** 
+  **[tgz]({{ this_dist_url_tgz }})** 
+  **[dir]({{ this_dist_url_dir }})** 
+* **all stable versions**: 
+  at [Maven Central]({{ mavencentral_repo_groupid_url }}brooklyn-dist/)
+  and [Cloudsoft]({{ cloudsoft_releases_base_url}}io/brooklyn/brooklyn-dist/) 
+* **all snapshot versions**: 
+  at [Sonatype]({{ sonatype_repo_groupid_url }}brooklyn-dist/)
+  and [Cloudsoft]({{ cloudsoft_snapshots_base_url }}io/brooklyn/brooklyn-dist/)
 
 Just download your preferred flavour and unpack.
 
+{% if site.brooklyn-version contains 'SNAPSHOT' %} 
+**Please note**: You are reading the documentation for a snapshot version of Brooklyn.
+You should always confirm that the source and date for snapshot artifacts.
+{% endif %}
+
+
 <a name="alljar"></a>
 ## The All Jar
 
 You can grab a single JAR containing all of Brooklyn and its dependencies 
-here{% if site.brooklyn-version contains 'SNAPSHOT' %} (again please check the date on snapshot artifacts){% endif %}:
+here:
+
+* **v{{ site.brooklyn-version }}** at
+  {% if SNAPSHOT %}[Sonatype]({{ this_alljar_url_search }})
+  {% else %}[Maven Central]({{ this_alljar_url_search }})
+  {% endif %}: 
+  **[jar]({{ this_alljar_url_jar }})** 
+  **[dir]({{ this_alljar_url_dir }})** 
+* **all stable versions**: 
+  at [Maven Central]({{ mavencentral_repo_groupid_url }}brooklyn-all/)
+  and [Cloudsoft]({{ cloudsoft_releases_base_url}}/io/brooklyn/brooklyn-all/) 
+* **all snapshot versions**: 
+  at [Sonatype]({{ sonatype_repo_groupid_url }}brooklyn-all/)
+  and [Cloudsoft]({{ cloudsoft_snapshots_base_url }}io/brooklyn/brooklyn-all/)
 
-* [{{ site.brooklyn-version }}]({{ maven_this_version_base_url }}io/brooklyn/brooklyn-all/{{ site.brooklyn-version }}/)
-* [all stable versions](http://developers.cloudsoftcorp.com/maven/releases/io/brooklyn/brooklyn-all/)
-* [all snapshot versions](http://developers.cloudsoftcorp.com/maven/snapshots/io/brooklyn/brooklyn-all/)
+Just download your preferred flavour and add it to your classpath{% if site.brooklyn-version contains 'SNAPSHOT' %} 
+(but again, check the source and date for snapshot JARs){% endif %}.
 
-Just download your preferred flavour and add it to your classpath.
 
 <a name="examples"></a>
 ## Examples
 
-You can clone the most recent stable examples from the [brooklyn-examples git repository](http://github.com/brooklyncentral/brooklyn-examples):
+You can checkout the examples from the [brooklyn-examples git repository](http://github.com/brooklyncentral/brooklyn-examples).
+Maven (v3) is required to build them, as described [here]({{ site.url }}/dev/build/).
+The examples for this version ({{ site.brooklyn-version }}) are in the branch 
+`{% if SNAPSHOT %}{{ site.brooklyn-snapshot-git-branch }}{% else %}{{ site.brooklyn-version }}{% endif %}`,
+so if you have `git` and `mvn` already, you can simply:
 
 {% highlight bash %}
 % git clone https://github.com/brooklyncentral/brooklyn-examples.git
+% cd brooklyn-examples
+{% if brooklyn_examples_branch == 'master' %}{% else %}% git checkout {{ brooklyn_examples_branch }}
+{% endif %}% mvn clean install
 {% endhighlight %}
 
-You can also download them from [here](https://github.com/brooklyncentral/brooklyn-examples/tarball/master).
-
-If you prefer to do this from the command-line, use:
-
-{% highlight bash %}
-% curl -L https://github.com/brooklyncentral/brooklyn-examples/tarball/master -o brooklyn-latest.tgz
-{% endhighlight %}
+{% if SNAPSHOT %}
+**Please note**: for snapshot versions of Brooklyn, 
+the examples in this repository may not be automatically synched.
+It is recommended that you use the code for the examples included
+in the main Brooklyn codebase, or use a released version.
+{% endif %}  
 
-If you are looking for a specific version (e.g. to run examples compiled for a specific Brooklyn version) try the following command:
+If you don't use `git`, you can download the projects as a tarball instead
+from [this link](https://github.com/brooklyncentral/brooklyn-examples/tarball/{{ brooklyn_examples_branch }}). 
+These commands should do the trick:
 
 {% highlight bash %}
-% export BV=0.4.0-M2
-% curl -L https://github.com/brooklyncentral/brooklyn-examples/tarball/${BV} -o brooklyn-${BV}.tgz
+% curl -L -o brooklyn-examples-{{ brooklyn_examples_branch }}.tgz \
+     https://github.com/brooklyncentral/brooklyn-examples/tarball/{{ brooklyn_examples_branch }}
+% tar xvfz brooklyn-examples-{{ brooklyn_examples_branch }}.tgz
+% mv brooklyncentral-brooklyn-examples-* brooklyn-examples-{{ brooklyn_examples_branch }} \
+     # change the strange name which github assigns in the tarball
+% mvn clean install
 {% endhighlight %}
 
-Once you have the examples you can build them with [maven (v3)]({{site.url}}/dev/build/).
+A good example to start with is the [Elastic Web Cluster]({{site.url}}/use/examples/webcluster.html).
 
-Note however, that you still need to have the Brooklyn installed in order to run them.
 
-A good entry point is the [Elastic Web Cluster]({{site.url}}/use/examples/webcluster.html).
 
 <a name="maven"></a>
 ## Maven
 
-If you use maven, you can add Brooklyn with the following entries in your pom:
+If you use maven, you can add Brooklyn with the following in your pom:
+
+{% highlight xml %}
+    <dependencies>
+        <dependency>
+            <groupId>io.brooklyn</groupId>
+            <artifactId>brooklyn-all</artifactId>
+            <version>{{ site.brooklyn-version }}</version>
+        </dependency>
+    </dependencies>
+{% endhighlight %}
+
+`brooklyn-all` (used above) brings in all dependencies, including jclouds and Apache Whirr.
+If you prefer a smaller repo you might want just ``brooklyn-core``,  ``brooklyn-policies``, 
+and some of ``brooklyn-software-webapp``,  ``brooklyn-software-database``, ``brooklyn-software-messaging``, or others
+(browse the full list [here]({{ this_anything_url_search }})).
+
+If you wish to use the Sonatype and/or Cloudsoft repositories (particularly for snapshots),
+you can add some of the following sections:
 
 {% highlight xml %}
     <repositories>
@@ -81,6 +136,13 @@ If you use maven, you can add Brooklyn with the following entries in your pom:
         </repository>
         <!-- optional for snapshot versions -->
         <repository>
+            <id>sonatype-nexus-snapshots</id>
+            <name>Sonatype Nexus Snapshots</name>
+            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
+            <releases> <enabled>false</enabled> </releases>
+            <snapshots> <enabled>true</enabled> </snapshots>
+        </repository>
+        <repository>
             <id>cloudsoft-cloudfront-snapshots-repo</id>
             <url>http://developers.cloudsoftcorp.com/maven/snapshots/</url>
             <snapshots>
@@ -90,22 +152,13 @@ If you use maven, you can add Brooklyn with the following entries in your pom:
            </snapshots>
          </repository>
     </repositories>
-        
-    <dependencies>
-        <dependency>
-            <groupId>io.brooklyn</groupId>
-            <artifactId>brooklyn-all</artifactId>
-            <version>{{ site.brooklyn-version }}</version>
-        </dependency>
-    </dependencies>
 {% endhighlight %}
 
-Brooklyn-All (used above) brings in all dependencies, including jclouds and Apache Whirr.
-If you prefer a smaller repo you might want just ``brooklyn-core``,  ``brooklyn-policies``, 
-and some of: ``brooklyn-software-webapp``,  ``brooklyn-software-database``, ``brooklyn-software-messaging``, ``brooklyn-systems-hadoop``.
-(Browse the full list [here](http://ccweb.cloudsoftcorp.com/maven/libs-snapshot-local/io/brooklyn/).)
+{% if SNAPSHOT %}
+**Please note**: to use a snapshot version of Brooklyn, you must either have Brooklyn built locally
+or one of the additional snapshot repositories above.
+{% endif %}
 
-**TODO: we are moving to mavencentral so the repositories section will shortly be unnecessary**
 
 <a name="source"></a>
 ## Source Code

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/8473e4b0/docs/use/examples/before-begin.include.md
----------------------------------------------------------------------
diff --git a/docs/use/examples/before-begin.include.md b/docs/use/examples/before-begin.include.md
index d453943..547c57a 100644
--- a/docs/use/examples/before-begin.include.md
+++ b/docs/use/examples/before-begin.include.md
@@ -1,27 +1,30 @@
 ## Before You Begin
 
-To use the examples, you'll need ``curl``, ``java``, and ``maven`` (v3) installed.
+To use the examples, you'll need ``curl``, ``git``, ``java`` (1.6+), and ``maven`` (v3) installed.
 
 {% include fields.md %}
 
 {% if SNAPSHOT %}
 
-First, grab a copy of the Brooklyn snapshot distribution you wish to use from [the repo]({{ dist_url_dir }}/)
+First, grab a copy of the Brooklyn snapshot distribution you wish to use from 
+[the Sonatype snapshot repo]({{ sonatype_repo_groupid_url }}brooklyn-dist/)
 (or build it yourself following instructions [here]({{ site.url }}/dev/build/)),
 unpack it to your favourite location (e.g. `$(pwd)`), 
 and export `BROOKLYN_HOME`:
 
 {% highlight bash %}
+% curl -L -o brooklyn-dist-{{ site.brooklyn-version }}-dist.tar.gz {{ this_dist_tgz_url }}
+% tar xvzf brooklyn-dist-{{ site.brooklyn-version }}-dist.tar.gz
 % export BROOKLYN_HOME=$(pwd)/brooklyn-{{ site.brooklyn-version }}/
 {% endhighlight %}
 
 {% else %}
 
-First, grab a copy of the Brooklyn distribution:
+First, grab a copy of the Brooklyn distribution and set up `BROOKLYN_HOME`:
 
 {% highlight bash %}
-% curl -LO {{ dist_url_tgz }}
-% tar xvzf brooklyn-dist-0.4.0-M2-dist.tar.gz
+% curl -LO {{ this_dist_url_tgz }}
+% tar xvzf brooklyn-dist-{{ site.brooklyn-version }}-dist.tar.gz
 % export BROOKLYN_HOME=$(pwd)/brooklyn-{{ site.brooklyn-version }}/
 {% endhighlight %}
 
@@ -33,13 +36,15 @@ Then, grab a copy of the brooklyn-examples source code and build with Maven:
 {% highlight bash %}
 % git clone https://github.com/brooklyncentral/brooklyn-examples.git
 % cd brooklyn-examples
-% git checkout {% if SNAPSHOT %}{{ site.brooklyn-snapshot-git-branch }}{% else %}{{ site.brooklyn-version }}{% endif %}
-% mvn clean install
+{% if brooklyn_examples_branch == 'master' %}{% else %}% git checkout {{ brooklyn_examples_branch }}
+{% endif %}% mvn clean install
 {% endhighlight %}
 
-{% if SNAPSHOT %}Please note, these instructions are for a SNAPSHOT release of Brooklyn,
+{% if SNAPSHOT %}
+Please note, these instructions are for a SNAPSHOT release of Brooklyn,
 so proceed with caution. 
-For the latest stable version, go [here](/meta/versions.html). {% endif %}
+For the latest stable version, go [here](/meta/versions.html). 
+{% endif %}
 For more information on ways to download Brooklyn please
 see the [download page]({{site.url}}/start/download.html).
 For more information on the Brooklyn CLI and launching apps,