I didn't get any feedback or comments on these changes, so I am
going to assume that I am on the right track and I will continue
with the conversion of the rest of the samples.  If anyone doesn't
agree with this, please let me know asap.

  Simon

Simon Nash wrote:

I was able to solve this problem using the "wrapping" approach
without needing to add any src/test code to the jar file.  I did
the following to convert implementation-crud:

1. Created an implementation-crud module under sca/itest/samples.
2. Created a pom for this module that uses <testResources> to copy
   the contents of samples/implementation-crud/target/test-classes.
3. Removed src/test/CRUDTestCase.java from samples/implementation-crud.
4. Created src/test/crud/CRUDTestCase.java in sca/itest/samples/implementation-crud.
   This "wrapper" JUnit test case is as follows:

     package crud;

     import junit.framework.TestCase;

     public class CRUDTestCase extends TestCase {

         public void test() throws Exception {
             CRUDClient.main(null);
         }
     }
5. That's all!  sca/itest/samples/implementation-crud gets the
   crud.CRUDClient class from <testResources> and all the extension
   implementation classes from the sample-implementation-crud
   dependency.  There's no need to add any src/test classes to the
   jar file.

I have created TUSCANY-1264 for this change and I have attached a
patch to convert the simple-bigbank and implementation-crud samples.
These samples and itests build and run with maven but I haven't built
a new distribution to verify that the sample ant scripts still work.

  Simon

Simon Laws wrote:



I've checked in changes to allows the provided jar to be run (and built).


Outstanding is the issue of including classes from
src/test in the sample jar or alternatively moving the application classes
to src/main. This effect of this currently is that

binding.echo
databinding.echo
implementation.crud

Don't work out of the box with

ant

You have to do

ant compile
ant

If we don't want to ship junit in the binary distribution we should move
them. The binary distribution ships the src for the Junit tests b.t.w. so
I'm going to take a quick look at why maven isn't packaging the classes.

Simon




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to