Message:

   The following issue has been closed.

   Resolver: Felipe Leme
       Date: Tue, 16 Nov 2004 12:28 AM

I opted for a simpler solution: forbid a project of setting both properties 
with the same value!
---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/browse/MPEAR-24

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MPEAR-24
    Summary: Duplicated entries if maven.ear.src and maven.ear.resources are 
the same
       Type: Bug

     Status: Closed
   Priority: Critical
 Resolution: FIXED

 Original Estimate: 1 hour
 Time Spent: Unknown
  Remaining: 1 hour

    Project: maven-ear-plugin
   Fix Fors:
             1.6
   Versions:
             1.5

   Assignee: Felipe Leme
   Reporter: Felipe Leme

    Created: Thu, 14 Oct 2004 9:33 AM
    Updated: Tue, 16 Nov 2004 12:28 AM

Description:
The value of these 2 variables are different by default, but if the user change 
them so they become equals, the entries on that directory will be added twice 
in the generated ear.

That happens because we have 2 fileset entries in the Jelly script:

          <fileset dir="${maven.ear.resources}" />
        <fileset dir="${maven.ear.src}" casesensitive="false" 
          excludes="**/META-INF/application.xml"/>

The solution is simple, it's just a matter of adding an <j:if> as shown below:

      <j:if test="${!pom.build.resources.isEmpty()}">
        <mkdir dir="${maven.ear.resources}"/>
        <maven:copy-resources resources="${pom.build.resources}" 
todir="${maven.ear.resources}"/>
<!-- if added below -->
        <j:if test="${context.getVariable('maven.ear.resources') != 
context.getVariable('maven.ear.src')}">
          <fileset dir="${maven.ear.resources}" />
        </j:if>
      </j:if>

(and also, that block should come before the other <fileset> block)

I will fix it later (the most difficult part will be writing a test case :-)


-- Felipe






---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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

Reply via email to