Repository: brooklyn-docs
Updated Branches:
  refs/heads/master 284fd72d2 -> 7df556977


Updated the maven archetype doc to more explicity show adding the JAR to 
Brooklyn


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

Branch: refs/heads/master
Commit: 792b72dc560c8d2e07c367c663fbc58de7095c53
Parents: 284fd72
Author: graeme.miller <graeme.mil...@cloudsoftcorp.com>
Authored: Fri Aug 5 16:56:14 2016 +0100
Committer: graeme.miller <graeme.mil...@cloudsoftcorp.com>
Committed: Fri Aug 5 16:56:14 2016 +0100

----------------------------------------------------------------------
 guide/java/archetype.md | 35 +++++++++++++++++++++++++----------
 1 file changed, 25 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/792b72dc/guide/java/archetype.md
----------------------------------------------------------------------
diff --git a/guide/java/archetype.md b/guide/java/archetype.md
index 3bd3426..8a9ac11 100644
--- a/guide/java/archetype.md
+++ b/guide/java/archetype.md
@@ -61,19 +61,34 @@ $ mvn clean install
 The build will produce an OSGi bundle in 
`target/autobrick-0.1.0-SNAPSHOT.jar`, suitable for 
 use in the [Brooklyn catalog]({{ site.path.guide }}/ops/catalog/) (using 
`brooklyn.libraries`).
 
-The project comes with a `sample.bom` file, located in `src/test/resources`. 
You will first have 
-to copy the target jar to a suitable location, and update the URL in 
`sample.bom` to point at that 
-jar.
-
-The command below will use the REST api to add this to the catalog of a 
running Brooklyn instance:
+To use this in your Brooklyn catalog you will first have to copy the target 
jar to a suitable location. 
+For developing/testing purposes storing on the local filesystem is fine. 
+For production use, we recommend uploading to a remote maven repository or 
similar.
+
+Once your jar is in a suitable location the next step is to add a new catalog 
item to Brooklyn. 
+The project comes with a `catalog.bom` file, located in `src/main/resources`. 
+Modify this file by adding a 'brooklyn.libraries' statement to the bom 
pointing to the jar. 
+For example:
+
+{% highlight yaml %}
+brooklyn.catalog:
+    brooklyn.libraries:
+    - file:///path/to/jar/autobrick-0.1.0-SNAPSHOT.jar     
+    itemType: entity
+    items:
+    - id: com.acme.MySample
+      item:
+        type: com.acme.MySample
+{% endhighlight %}
 
-    curl -u admin:pa55w0rd http://127.0.0.1:8081/v1/catalog --data-binary 
@src/test/resources/sample.bom
+The command below will use the CLI to add this to the catalog of a running 
Brooklyn instance:
 
-The YAML blueprint below shows an example usage of this blueprint:
+{% highlight bash %}
+    br add-catalog src/main/resources/catalog.bom
+{% endhighlight %}
 
-    name: my sample
-    services:
-    - type: com.acme.MySampleInCatalog:1.0
+After running that command the entity will have been added to your catalog and 
can be used
+in the same way as regular Brooklyn entities.
 
 
 ### Testing Entities

Reply via email to