You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Travis Martensen (JIRA)" <ji...@codehaus.org> on 2008/07/15 01:54:26 UTC

[jira] Created: (MANT-45) basedir attribute of task of package target in generated Ant build causes files to be archived twice

basedir attribute of <war> task of package target in generated Ant build causes files to be archived twice
----------------------------------------------------------------------------------------------------------

                 Key: MANT-45
                 URL: http://jira.codehaus.org/browse/MANT-45
             Project: Maven 2.x Ant Plugin
          Issue Type: Bug
    Affects Versions: 2.1
         Environment: Windows XP Professional SP2, Ant 1.7.0
            Reporter: Travis Martensen
            Priority: Minor


When comparing the WAR file built by Ant generated from a POM and the WAR file from the Maven build, it appears that files are doubled in the WAR (with different paths) when build by the Ant file.  A workaround for this is to remove the line below:

{code:xml}
basedir="${maven.build.outputDir}"
{code}

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MANT-45) basedir attribute of task of package target in generated Ant build causes files to be archived twice

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MANT-45?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MANT-45.
---------------------------------

         Assignee: Benjamin Bentmann
       Resolution: Fixed
    Fix Version/s: 2.1.1

Fixed in [r691615|http://svn.apache.org/viewvc?view=rev&revision=691615].

The new target looks like
{code:xml}
<target name="package" depends="compile,test" description="Package the application">
  <mkdir dir="${maven.build.dir}/${maven.build.finalName}/WEB-INF/lib"/>
  <war destfile="${maven.build.dir}/${maven.build.finalName}.war" 
       compress="true" 
       webxml="src/main/webapp/WEB-INF/web.xml">
    <lib dir="${maven.build.dir}/${maven.build.finalName}/WEB-INF/lib"/>
    <classes dir="${maven.build.outputDir}"/>
    <fileset dir="src/main/webapp" 
             excludes="WEB-INF/web.xml"/>
  </war>
</target>
{code}
i.e. I removed the basedir attribute as suggested but removed the <webinf> tag instead of the <fileset> tag. The later one denotes the WEB-INF's parent directory and usually contains additional files.

> basedir attribute of <war> task of package target in generated Ant build causes files to be archived twice
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: MANT-45
>                 URL: http://jira.codehaus.org/browse/MANT-45
>             Project: Maven 2.x Ant Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1
>         Environment: Windows XP Professional SP2, Ant 1.7.0
>            Reporter: Travis Martensen
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>             Fix For: 2.1.1
>
>
> When comparing the WAR file built by Ant generated from a POM and the WAR file from the Maven build, it appears that files are doubled in the WAR (with different paths) when build by the Ant file.  A workaround for this is to remove the line below:
> {code:xml}
> basedir="${maven.build.outputDir}"
> {code}

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MANT-45) basedir attribute of task of package target in generated Ant build causes files to be archived twice

Posted by "Travis Martensen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANT-45?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=141776#action_141776 ] 

figjam68 edited comment on MANT-45 at 7/14/08 7:14 PM:
---------------------------------------------------------------

This is also happening with any files in the WEB-INF directory.  This may be caused by declaring both the <webinf> tag and the <fileset> tag.  

{code:xml}
        <war destfile="${maven.build.dir}/${maven.build.finalName}.war"
     compress="true"
     webxml="${basedir}/src/main/webapp/WEB-INF/web.xml">
    <lib dir="${maven.build.dir}/${maven.build.finalName}/WEB-INF/lib"/>
    <classes dir="${maven.build.outputDir}"/>
    <webinf dir="${basedir}/src/main/webapp/WEB-INF"
            excludes="web.xml"/>
    <fileset dir="${basedir}/src/main/webapp"/>
</war>
{code}

This can be worked around by getting rid of the <fileset> entry.

      was (Author: figjam68):
    This is also happening with any files in the WEB-INF directory.  This may be caused by declaring both the <webinf> tag and the <fileset> tag.  

{code:xml}
        <war destfile="${maven.build.dir}/${maven.build.finalName}.war"
     compress="true"
     webxml="${basedir}/src/main/webapp/WEB-INF/web.xml">
    <lib dir="${maven.build.dir}/${maven.build.finalName}/WEB-INF/lib"/>
    <classes dir="${maven.build.outputDir}"/>
    <webinf dir="${basedir}/src/main/webapp/WEB-INF"
            excludes="web.xml"/>
</war>
{code}

This can be worked around by getting rid of the <fileset> entry.
  
> basedir attribute of <war> task of package target in generated Ant build causes files to be archived twice
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: MANT-45
>                 URL: http://jira.codehaus.org/browse/MANT-45
>             Project: Maven 2.x Ant Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1
>         Environment: Windows XP Professional SP2, Ant 1.7.0
>            Reporter: Travis Martensen
>            Priority: Minor
>
> When comparing the WAR file built by Ant generated from a POM and the WAR file from the Maven build, it appears that files are doubled in the WAR (with different paths) when build by the Ant file.  A workaround for this is to remove the line below:
> {code:xml}
> basedir="${maven.build.outputDir}"
> {code}

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MANT-45) basedir attribute of task of package target in generated Ant build causes files to be archived twice

Posted by "Travis Martensen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANT-45?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=141776#action_141776 ] 

Travis Martensen commented on MANT-45:
--------------------------------------

This is also happening with any files in the WEB-INF directory.  This may be caused by declaring both the <webinf> tag and the <fileset> tag.  

{code:xml}
        <war destfile="${maven.build.dir}/${maven.build.finalName}.war"
     compress="true"
     webxml="${basedir}/src/main/webapp/WEB-INF/web.xml">
    <lib dir="${maven.build.dir}/${maven.build.finalName}/WEB-INF/lib"/>
    <classes dir="${maven.build.outputDir}"/>
    <webinf dir="${basedir}/src/main/webapp/WEB-INF"
            excludes="web.xml"/>
</war>
{code}

This can be worked around by getting rid of the <fileset> entry.

> basedir attribute of <war> task of package target in generated Ant build causes files to be archived twice
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: MANT-45
>                 URL: http://jira.codehaus.org/browse/MANT-45
>             Project: Maven 2.x Ant Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1
>         Environment: Windows XP Professional SP2, Ant 1.7.0
>            Reporter: Travis Martensen
>            Priority: Minor
>
> When comparing the WAR file built by Ant generated from a POM and the WAR file from the Maven build, it appears that files are doubled in the WAR (with different paths) when build by the Ant file.  A workaround for this is to remove the line below:
> {code:xml}
> basedir="${maven.build.outputDir}"
> {code}

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira