No, the jar plugin is ok, the maven.jar.incluse is set latter.
The problem was that I set when building the main jar the explude path, and 
when I tried to set the filters for the second jar, the exclude path cannot be 
set with <jelly:set> only with <maven:set>.

Now it works :) Thanks for help.

-----Original Message-----
From: Eric Giguere [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 23, 2004 9:27 AM
To: Maven Users List
Subject: Re: maven.jar.includes could not work?

Hello
I think that the support for the include property in the jar plugin was 
lost during a merge for version 1.6 of the plugin, its a feature I've 
submitted earlier and it got lost.

Check in the plugin.jelly file  around the use of the jar tag, you 
should see in the jar:jar goal:
    <ant:jar
      jarfile="${maven.build.dir}/${maven.final.name}.jar"
      basedir="${maven.build.dest}"
      index="${maven.jar.index}"
      compress="${maven.jar.compress}"
      excludes="${maven.jar.excludes}">

Replace this by:
    <ant:jar
      jarfile="${maven.build.dir}/${maven.final.name}.jar"
      basedir="${maven.build.dest}"
      index="${maven.jar.index}"
      compress="${maven.jar.compress}"
      excludes="${maven.jar.excludes}"
      includes="${maven.jar.includes}">

This will fix the problem.

Hope it helps
Eric.

 
Adrian Tarau wrote:

>Hmmm, it doesn't work.
>
>I use it like this: in a postGoal jar:jar I want to call again the jar:jar 
>goal with some properties changed to create another jar. For that I must 
>changed maven.jar.includes and maven.jar.excludes to put a different classes 
>in this second jar.
>
><postGoal name="jar:jar">
>        <j:if test="${jar_second_loop != 'true'}">
>            <j:set var="oldMavenFinalName" value="${maven.final.name}" />
>            <j:set var="maven.final.name" 
> value="${pom.artifactId}-j2ee-${pom.currentVersion}"/>
>            <echo>Building J2EE Notification JAR: ${maven.final.name}</echo>
>            <attainGoal name="j2ee-jar:prepare-jar-filters"/>
>            <j:set var="jar_second_loop" value="true"/>
>            <attainGoal name="jar:jar"/>
>            <j:set var="maven.final.name" value="${oldMavenFinalName}"/>
>        </j:if>
>    </postGoal>
>
>and 
>
><goal name="j2ee-jar:prepare-jar-filters">
>        <maven:set plugin="maven-jar-plugin" property="maven.jar.includes" 
> value="${notification.j2ee.includes}"/>
>        <j:set var="maven.jar.excludes" value="${oldJarExcludes}"/>
>    </goal>
>
>
>
>-----Original Message-----
>From: Brett Porter [mailto:[EMAIL PROTECTED] 
>Sent: Monday, November 22, 2004 5:25 PM
>To: Maven Users List
>Subject: Re: maven.jar.includes could not work?
>
>Depending on when you are calling that, you may need to use
>
><maven:set plugin="maven-jar-plugin" property="maven.jar.includes"
>value="com/xxx/yyy/**" />
>
>- Brett
>
>
>On Mon, 22 Nov 2004 17:21:46 -0500, Adrian Tarau
><[EMAIL PROTECTED]> wrote:
>  
>
>>Hi,
>>
>>I want to change maven.jar.includes from build.xml and I set the include 
>>pattern but the jar doesn't have any class inside(only the manifest).
>>
>>The pattern is <j:set var="maven.jar.includes" value="com/xxx/yyy/**"/>
>>
>>Thanks.
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>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]
>
>
>  
>


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

Reply via email to