[jboss-as7-dev] A mvn question - ejb/ear packaging

Stephen Coy steve.coy at me.com
Fri Oct 26 22:05:25 EDT 2012


Doh!

You wanted <includes> which does not seem to be supported by the maven-ejb-plugin.

I can think of two other options:

1. Use an ant run plugin task in the prepare-package phase to remove unwanted classes from ${project.build.outputDirectory}/classes

2. Use inclusion filters on the maven-compiler-plugin to compile only the desired classes from the outset. You would need to be careful of your IDE messing this up for you though.

Adding <includes> to the ejb-plugin looks like a trivial patch for what it's worth (and the jar plugin supports it).

Steve C


On 27/10/2012, at 11:58 AM, Stephen Coy <steve.coy at me.com> wrote:

> What's your actual use case?
> 
> This fragment:
> 
> <configuration>
>    ...
>     <excludes>
>       <exclude>**/*Impl.class</exclude>
>       <exclude>**/*Bean.class</exclude>
>     </excludes>
>    ...
> </configuration>
> 
> should work.
> 
> Steve C
> 
> On 26/10/2012, at 3:11 AM, Wolf-Dieter Fink <wfink at redhat.com> wrote:
> 
>> I want to add all classes in the ejb/jar follow a pattern:
>>  i.e.  all *Bean.class and *Impl.class
>> There are other classes in the path without that suffix that should not 
>> included.
>> 
>> I use different combinations of includes/excludes and 
>> useDefaultIncludes/useDefaultExcludes
>> 
>> But the result is more or less ALL or NO class in the jar.
>> 
>> I've google and look into the plugin docs but don't find a helpful hint.
>> 
>> 
>> Any ideas?
>> 
>> cheers
>> Wolf
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
> 
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev



More information about the jboss-as7-dev mailing list