Hi Raymond

Comments in line...

Simon

On Wed, Dec 10, 2008 at 9:52 PM, Raymond Feng <[EMAIL PROTECTED]> wrote:

> Hi,
>
> It has always been a pain to run the ANT scripts against the samples
> manually at the last moment for releases. We often see inconsistent
> behaviors depending on whether a sample is run against the distribution or
> the maven dependencies.  One of the culprits is that the ANT script sets the
> classpath on the distribution while the maven build sets the classpath based
> on the maven dependencies.
>
> In the 2.x stream, we now have opportunities to solve this problem:
>
> 1) Instead of just an all-in-one package, we now have a set of
> distributions to include selected Tuscany modules and 3rd-party jars based
> on the functions. The pom.xml for each distribution well defines the
> dependencies.
> 2) Building the distributions is much faster than before (only a 1-2
> minutes on my laptop).
> 3) Meanwhile, we would like to run the samples under both JSE and OSGi.
> OSGi typically requires a distribution on the file system that is compatible
> with the bundle structure.
>
> I suggest that we better align the samples with a selected distribution and
> automate the testing under JSE and OSGi with Maven and Ant. We can do the
> following:
>
> 1) Simply the maven dependency in the pom.xml for samples to only declare a
> distribution, for example,
>
>       <dependency>
>           <groupId>org.apache.tuscany.sca</groupId>
>           <artifactId>tuscany-distribution-core</artifactId>
>           <type>pom</type>
>           <version>2.0-SNAPSHOT</version>
>       </dependency>


Sounds like it's worth a try. Anything we can do to make the samples
automatically consistent with the distribution gets a bit +1 from me

>
>
> 2) Modify the build.xml to use Node (Standalone and Equinox) launchers to
> run the samples. And explore the "junit" Ant task to run test cases in the
> Ant build


I've created a new build.xml for calculator-exquinox that relies on running
either the JSE or Equinox launcher. Two separate targets at the moment. I'm
not so keen on using Ant to call JUnit simply because I'd like the user to
be able to look in the ant script and see the commands they would type on
the command line being used.


>
>
> 3) Automate the post-distribution build to run the test cases in the
> samples to make sure the samples are validated as part of the build.
>

Are you suggesting that the samples would be build as part of the normal to
down build?


>
> Thoughts? Are any of you interested in experimenting?
>
> Thanks,
> Raymond
>
>
>

Reply via email to