Simon Laws wrote:
On Wed, Apr 14, 2010 at 7:51 PM, Simon Nash <[email protected]> wrote:
Simon Laws wrote:
I think the best solution is to include "binaries" in the main mvn build.
This guarantees that the build output in "binaries" will always work when
using either the default profile or mvn -Pselfcontained.  The space and
time overhead of doing this isn't very much (about 10% for space when
using the default profile, and less than that for time).

This doesn't affect the ant build because this doesn't produce a binary
package or use the "binaries" directory.

 Simon
Hi Simon

When you say "include "binaries" in the main mvn build." do you mean
the main mvn build of the distribution? I.e. you're shipping the
source and binaries in one distribution?

Simon

Sorry that I wasn't clear.  The distribution would be source only.
When someone downloads this distribution and builds it using maven, they
would get binaries within the source directories (under /target for each
source directory), and they would also get a complete set of binaries
(with no source) in the travelsample/binaries/target directory.

If someone builds the downloaded distribution using ant, they would just
get binaries within the source directories (under /target for each
source directory).  The ant build wouldn't produce any output in the
travelsample/binaries/target directory.

For both the maven and ant builds, the build wouldn't include the
"distribution" directory.  Anyone who needs to build the distribution
would need to run a maven build from the "distribution" directory,
just as they do with Tuscany SCA Java.

 Simon



Ok so just replaying this, and sticking with maven for a moment, the
build does the following:

- creates binaries under */target as you might expect
- creates binaries under  binaries/target

The distribution is not built by default.

Yes to all the above.

From earlier on in the thread the objective was to "explain how people
can package an application like this for redistribution in a
production environment". Will the content of binaries/target be used
or it is there for just for show? I.e. if I wanted to deploy the
application what would I have to do? presumably take the contents of
binaries/target + the dependencies and fire up the appropriate
launcher.

The dependencies (except for Tuscany SCA Java 1.6) are already included in
binaries/target so the only thing needed is to cd to binaries/target/launchers
and type "ant run-xyz" where xyz is the launcher name.  For example, to run
the "interaction" launcher, you would enter "ant run-interaction".  The ant
script is needed because it adds <TUSCANY_HOME>/lib/tuscany-sca-manifest.jar
to the classpath.  The README explains this.

The other option is to build using mvn -Pselfcontained which produces a
binaries/target directory with no external dependencies.  In this case you
could cd to binaries/target/launchers and enter "java -jar 
scatours-launcher-xyz.jar"
where xyz is the launcher name.  For example, to run the "interaction" launcher,
you would enter "java -jar scatours-launcher-interaction.jar".  This is also
explained in the README.

  Simon

Reply via email to