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> > > 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 > > 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. > > Thoughts? Are any of you interested in experimenting? > > Thanks, > Raymond > > > We also now have the "compact" distribution which fixes these same problems, is even easier to use, and is also fast to build (<20 secs on my laptop). I think its worth including this as a released distribution option and used by some samples. ...ant
