You must understand that excludes limits the set configured by includes.
So your configuration will has no sources as Quote.java will be discarded
by Q*.java

Review your configuration

Jeff


On Mon, May 21, 2012 at 7:44 PM, Ryan Connolly <[email protected]> wrote:

> Hello, Maven Users:
> I am faced with a situation where we are generating two sets of sources at
> build time and I would like to exclude the sources generated by one of
> these plugins when creating our source jar by using a regex expression.
>
> For example, we have a source file Quote.java that plugin1 uses to generate
> QQuote.java and plugin2 uses to generate IQuote.java.  Is there any way to
> supply a regex that would exclude the QQuote.java file while including the
> Quote.java and IQuote.java sources in our source jar?
>
> I have tried the following with version 2.1.2 but this configuration
> produces output declaring that there are no sources (when in fact there
> are) and I can't seem to find any examples of using the %regex[expr] syntax
> with the m-source-p.  Any help would be greatly appreciated.
>
>          <includes>
>            <include>**/model/Quote.java</include>
>          </includes>
>          <excludes>
>            <exclude>**/model/Q*.java</exclude>
>            <exclude>**/*.gwt.xml</exclude>
>          </excludes>
>
>
> Best,
> -Ryan Connolly
>



-- 
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually
working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury

Reply via email to