brooklyncentral/brooklyn — pull request #246 by cosmin-dumitrache (2012-07-23 12:10:46+00:00)
Title: Simplify and make version-neutral the structure of usage/dist/target

As Alex said:

> What I mean is, currently the binary is at different locations depending on version:
>
> .../usage/dist/target/brooklyn-0.4.0-M2-dist/brooklyn/bin/brooklyn
> .../usage/dist/target/brooklyn-0.4.0-SNAPSHOT-dist/brooklyn-0.4.0-SNAPSHOT/bin/brooklyn
>
> What I'd like ideally is for the binary to sit at:
>
> .../usage/dist/target/brooklyn-dist/bin/brooklyn
>
> This way it is easy to create a link independent of version:
>
> ln -s .../usage/dist/target/brooklyn-dist/bin/brooklyn ~/bin/brooklyn
>
> Of course when we tar it up we want to create versioned artifacts, e.g.:
>
> .../usage/dist/target/brooklyn-VERSION-dist.tgz
>
> Where this contains everything inside a dir called brooklyn-VERSION-dist/ :
>
> brooklyn-VERSION/bin/brooklyn

So with this change you get:
* .../usage/dist/target/brooklyn-dist/{ bin/brooklyn , lib/*.jar , LICENSE.txt , README.srt}
* .../usage/dist/target/brooklyn-VERSION-dist.tar.gz -> brooklyn-VERSION-dist/{bin/brooklyn , lib/*.jar , LICENSE.txt , README.srt}
* .../usage/dist/target/brooklyn-VERSION-dist.zip -> brooklyn-VERSION-dist/{bin/brooklyn , lib/*.jar , LICENSE.txt , README.srt}

I'm not entirely sure if this is the best possible way to do this with Maven so I welcome any feedback. There is a lot of duplication between ```build-dstribution-archive.xml``` and ```build-distribution-dir.xml```.