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 49886] New: Pathconvert with nested mapper: 1.8.1 differs from 1.7.1
Date Mon, 06 Sep 2010 14:29:34 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49886

           Summary: Pathconvert with nested mapper: 1.8.1 differs from
                    1.7.1
           Product: Ant
           Version: 1.8.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: efouche.externe@pagesjaunes.fr


Created an attachment (id=25993)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25993)
Pathconvert test case

Hi

Environnement:
Windows XP and 2008
Java Sun-1.6.0_14
ANT-1.7.1, migrating to 1.8.1

I work on a project that create a standalone java application. 
To reduces modication of the startup shell script, we define the application's
classpath using a MANIFEST-only JAR containing the appropriate "Class-Path"
entry. 
This MANIFEST is created by ANT with the following code using the pathconvert
task

<pathconvert targetos="unix" property="classpath.in.manifest"
refid="cp.classpath.in.manifest" pathsep=" ">
   <compositemapper>
      <mapper type="glob" from="${lib1.location}"
to="file:///${lib1.mapped.location}"/>
      <mapper type="glob" from="${lib2.location}" to="."/>
   </compositemapper>
</pathconvert>
<jar jarfile="${jar.file}">
   <manifest>
      <attribute name="Built-By" value="${user.name}"/>
      <attribute name="Class-Path" value="${classpath.in.manifest}"/>
   </manifest>
</jar>

With ANT-1.7.1 runtime, this generates the expected MANIFEST in the jar.

Exemple [truncated]:
Class-Path: file:///e:/toto/libs/antlr-2.7.6/antlr-2.7.6.jar file:///e
 :/toto/libs/apache-log4j-1.2.15/log4j-1.2.15.jar file:///e:/toto/libs
 /aspectj-1.6.2/aspectjrt.jar file:///e:/toto/libs/aspectj-1.6.2/aspec
 tjweaver.jar file:///e:/toto/libs/c3p0/c3p0-0.9.1.2.jar 

Using ANT-1.8.1 runtime, ${classpath.in.manifest} is evaluated to the empty
string.

The workaroud is to use nested <map> elements of pathconvert, but is it the
intended behaviour for nested <mapper> ?

Attached test case requires:
ANT-1.7.1 & 1.8.1 binary distribution
Update of the schell script to point to the correct installation directories

Output is written to "ant171.log" and "ant181.log" in ${basedir}


Regards

-- 
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