ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44873] New: Mapper behaviour is different when using Java 6
Date Fri, 25 Apr 2008 14:41:43 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=44873

           Summary: Mapper behaviour is different when using Java 6
           Product: Ant
           Version: 1.7.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: notifications@ant.apache.org
        ReportedBy: edward.steel@detica.com


To be specific: using glob mappers and identity mappers within composite
mappers has different behaviour if using Java 6.

My build contains the following:
<target name="-export" if="project.exports">
    <mkdir dir="${dir.exp}"/>
    <copy todir="${dir.exp}">
        <fileset dir="${dir.jar}" includesfile="${file.exports}" 
                excludes="${pattern.dist.jars.exclude}"/>
            <compositemapper>
                <globmapper from="*-standalone.jar" to="*.jar"/>
                <globmapper from="*-common.jar" to="*.jar"/>
                <identitymapper/> <!-- let anything else through -->
            </compositemapper>
        </copy>
</target>

The intended behaviour of this is to rename any {project}-standalone or
{project}-common jar to {project}.jar, but let the jars go as they are
otherwise. This works as expected with Java 1.4.2 or Java 5 (1.5.0_12):

-export:
    [mkdir] Skipping D:\projects\NR52\TIGUtils\export because it already
exists.
fileset: Setup scanner in dir D:\projects\NR52\TIGUtils\tmp\jar with
patternSet{ includes: [] excludes: [] }
     [copy] TIGUtils-common.jar added as TIGUtils.jar doesn't exist.
     [copy] No sources found.
     [copy] Copying 1 file to D:\projects\NR52\TIGUtils\export
     [copy] Copying D:\projects\NR52\TIGUtils\tmp\jar\TIGUtils-common.jar to
D:\projects\NR52\TIGUtils\export\TIGUtils.jar


However, when using Java 6 (update 2 or update 6) this does not work:

-export:
    [mkdir] Skipping D:\projects\NR52\TIGUtils\export because it already
exists.
fileset: Setup scanner in dir D:\projects\NR52\TIGUtils\tmp\jar with
patternSet{ includes: [] excludes: [] }
     [copy] TIGUtils-common.jar added as TIGUtils-common.jar is outdated.
     [copy] No sources found.
     [copy] Copying 1 file to D:\projects\NR52\TIGUtils\export
     [copy] Copying D:\projects\NR52\TIGUtils\tmp\jar\TIGUtils-common.jar to
D:\projects\NR52\TIGUtils\export\TIGUtils-common.jar


When using just the two globmappers, the functionality is as expected, but any
jars that do not match the pattern will not be copied at all. The workaround is
to use two copy tasks, but I would rather keep it the way it is. I'm surprised
the behaviour is inconsistent between java versions.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message