Simon Laws wrote:

snip



My suggestion was much simpler, i.e., that we could keep the client
code out of the sample extension jar and include a .class file for the
client code for these 3 samples in the binary distro.  This is similar
to what real users will do when developing extensions.


Making this happen is a little complicated from what I can see. I put the
client code in the test directory in the first place because I couldn't see
a way of excluding it using pom configuration. I've gone back and had a play
with it and I still can't see how to exclude a class file from a jar file
using the jar plugin. There maybe something that can be done with the
assembly plugin but I'm not really familiar with it so maybe one of our
Maven experts can help?

I spent a while looking for a way to do this but like you I have come
up empty.  It seems that the Maven 1.x jar plugin supports a property
maven.jar.excludes that does this, but this capability is not supported
by the Maven 2.x jar plugin.  There's a JIRA issue MJAR-30 for this issue,
but not much sign of interest by the maven developers in addressing this.

If we do want to  exclude "application" code from the sample extension jar
(which I grant you does make sense for the extension samples) then we can
either leave the code where it is in the test dir or put it in another
sample project. I added this latter proposition because if it's in the test
dir then we don't meet the 'run out of the box from a java command line'
aspiration that has been expressed previously.

Without a maven solution for this, I think you are correct that these
are unfortunately the only options.  I'll sleep on this and see if
anything else occurs to me.

  Simon


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

Reply via email to