allow locations to be overridden when referring to a type

not sure of the cleanest way to achieve this, but where a type includes a location,
a caller may wish to override it, such as in the default catalog references to template 2.

previously i think locations in referenced types were just dropped (?)
but then it was changed to be additive, which makes sense and is consistent, but
breaks the examples and means there was no way to override a location in a referenced type.

this changes it so that *if* a location block is included on the *referencer*, even if empty,
it overrides the locations on the referenced type. examples are updated accordingly.

an alternative would be to introduce a new explicit field to clear locations;
or a very different alternative would be to put locations in comments in the examples,
and clarify in the code templates/applications (as presently the presence of a location
is what triggers something being editable!); those are worth considering, especially the latter,
but the present change actually seems sensible as it is rare a caller would want to *add*
a location to a referenced type!
3 files changed
tree: 9da235fd7690f4e8d66899d171190ffee6a43932
  1. brooklyn/
  2. brooklyn-dist/
  3. brooklyn-docs/
  4. brooklyn-library/
  5. brooklyn-server/
  6. brooklyn-ui/
  7. docs/
  8. usage/
  9. .gitattributes
  10. .gitignore
  11. LICENSE
  12. NOTICE
  13. pom.xml
  14. README.md
README.md

Brooklyn

Apache Brooklyn Incubator Historic Repo

This is the historical incubator repo for Apache Brooklyn.

Brooklyn has graduated. Visit us here.

The sub-directories in this project correspond to multiple separate repositories in apache. (The link above to brooklyn/ started life exactly as a copy of brooklyn/ in this folder, as an uber-project for the others, including the server and the ui.)

To Build

The code can be built with a:

mvn clean install

This creates a build in usage/dist/target/brooklyn-dist. Run with bin/brooklyn launch.