ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34619] New: - basedir attribute corrupts jar filesets
Date Tue, 26 Apr 2005 10:03:32 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34619>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34619

           Summary: basedir attribute corrupts jar filesets
           Product: Ant
           Version: 1.6.2
          Platform: Other
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: bas@traserv.com


Please consider the build file below. The basedir attribute of the jar task is
set to ".". With this attribute the result is chaos (see below); without the
attribute the result is correct.

<project name="test" basedir="." default="jar">
	<property name="name" value="antbug"/>
	<property name="sandbox" value="sandbox"/>
	<property name="container" value="../${name}.jar"/>
	<target name="jar">
		<delete file="${container}"/>
		<jar destfile="${container}" basedir=".">
			<fileset dir=".">
				<include name="*.txt"/>
			</fileset>
			<fileset dir="${sandbox}">
				<include name="*.txt"/>
				<exclude name="*.ini"/>
			</fileset>
		</jar>
	</target>
</project>

Given these files:
	[C:\ant-bug\build.xml]
	[C:\ant-bug\readme.txt]
	[C:\ant-bug\sandbox\exclude_me.ini]
	[C:\ant-bug\sandbox\include_me.txt]
the result (using 'jar tf antbug.jar') with the jar-basedir is:
	[META-INF]
	[META-INF/MANIFEST.MF]
	[readme.txt]
	[include_me.txt]
whilst the result without the jar-basedir is:
	[META-INF/]
	[META-INF/MANIFEST.MF]
	[build.xml]
	[readme.txt]
	[sandbox/]
	[sandbox/exclude_me.ini]
	[sandbox/include_me.txt]
	[readme.txt]
	[include_me.txt]
The excludes are ignored, and everything (except the manifest) is added twice:
once with path-information and once without path-information.

My diagnostics:
------- Ant diagnostics report -------
Apache Ant version 1.6.2 compiled on July 16 2004

-------------------------------------------
 Implementation Version (JDK1.2+ only)
-------------------------------------------
core tasks     : 1.6.2
optional tasks : 1.6.2

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: C:\Tools\apache-ant-1.6.2\bin\..
ant-antlr.jar (5659 bytes)
ant-apache-bcel.jar (8609 bytes)
ant-apache-bsf.jar (12589 bytes)
ant-apache-log4j.jar (3014 bytes)
ant-apache-oro.jar (48015 bytes)
ant-apache-regexp.jar (3706 bytes)
ant-apache-resolver.jar (4073 bytes)
ant-commons-logging.jar (3856 bytes)
ant-commons-net.jar (35242 bytes)
ant-icontract.jar (9713 bytes)
ant-jai.jar (21351 bytes)
ant-javamail.jar (6753 bytes)
ant-jdepend.jar (8152 bytes)
ant-jmf.jar (6596 bytes)
ant-jsch.jar (22604 bytes)
ant-junit.jar (73665 bytes)
ant-launcher.jar (8673 bytes)
ant-netrexx.jar (9990 bytes)
ant-nodeps.jar (407573 bytes)
ant-starteam.jar (35463 bytes)
ant-stylebook.jar (2320 bytes)
ant-swing.jar (6755 bytes)
ant-trax.jar (68833 bytes)
ant-vaj.jar (48623 bytes)
ant-weblogic.jar (14355 bytes)
ant-xalan1.jar (4457 bytes)
ant-xslp.jar (2236 bytes)
ant.jar (999966 bytes)
xercesImpl.jar (1010675 bytes)
xml-apis.jar (124724 bytes)

-------------------------------------------
 Tasks availability
-------------------------------------------
image : Missing dependency com.sun.media.jai.codec.FileSeekableStream
sshexec : Missing dependency com.jcraft.jsch.UserInfo
scp : Missing dependency com.jcraft.jsch.UserInfo
cvsversion : Not Available
jdepend : Missing dependency jdepend.xmlui.JDepend
junit : Missing dependency junit.framework.Test

-------------------------------------------
 org.apache.env.Which diagnostics
-------------------------------------------
Not available.
Download it at http://xml.apache.org/commons/

-------------------------------------------
 XML Parser information
-------------------------------------------
XML Parser : org.apache.xerces.jaxp.SAXParserImpl
XML Parser Location: C:\Tools\apache-ant-1.6.2\lib\xercesImpl.jar

-------------------------------------------
 System properties
-------------------------------------------
java.runtime.name : Java(TM) 2 Runtime Environment, Standard Edition
sun.boot.library.path : C:\j2sdk1.4.2_07\jre\bin
java.vm.version : 1.4.2_07-b05
ant.library.dir : C:\Tools\apache-ant-1.6.2\lib
java.vm.vendor : Sun Microsystems Inc.
java.vendor.url : http://java.sun.com/
path.separator : ;
java.vm.name : Java HotSpot(TM) Client VM
file.encoding.pkg : sun.io
user.country : NL
sun.os.patch.level : Service Pack 2
java.vm.specification.name : Java Virtual Machine Specification
user.dir : C:\ant-bug
java.runtime.version : 1.4.2_07-b05
java.awt.graphicsenv : sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs : C:\j2sdk1.4.2_07\jre\lib\endorsed
os.arch : x86
java.io.tmpdir : C:\TEMP\
line.separator : 

java.vm.specification.vendor : Sun Microsystems Inc.
user.variant : 
os.name : Windows XP
ant.home : C:\Tools\apache-ant-1.6.2\bin\..
sun.java2d.fontpath : 
java.library.path :
C:\j2sdk1.4.2_07\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\basa\bin;C:\oracle\ora92\bin;C:\j2sdk1.4.2_07\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
java.specification.name : Java Platform API Specification
java.class.version : 48.0
java.util.prefs.PreferencesFactory : java.util.prefs.WindowsPreferencesFactory
os.version : 5.1
user.home : C:\Documents and Settings\Alberts
user.timezone : Europe/Berlin
java.awt.printerjob : sun.awt.windows.WPrinterJob
file.encoding : Cp1252
java.specification.version : 1.4
java.class.path :
C:\Tools\apache-ant-1.6.2\bin\..\lib\ant-launcher.jar;C:\Tools\apache-ant-1.6.2\lib\ant-antlr.jar;C:\Tools\apache-ant-1.6.2\lib\ant-apache-bcel.jar;C:\Tools\apache-ant-1.6.2\lib\ant-apache-bsf.jar;C:\Tools\apache-ant-1.6.2\lib\ant-apache-log4j.jar;C:\Tools\apache-ant-1.6.2\lib\ant-apache-oro.jar;C:\Tools\apache-ant-1.6.2\lib\ant-apache-regexp.jar;C:\Tools\apache-ant-1.6.2\lib\ant-apache-resolver.jar;C:\Tools\apache-ant-1.6.2\lib\ant-commons-logging.jar;C:\Tools\apache-ant-1.6.2\lib\ant-commons-net.jar;C:\Tools\apache-ant-1.6.2\lib\ant-icontract.jar;C:\Tools\apache-ant-1.6.2\lib\ant-jai.jar;C:\Tools\apache-ant-1.6.2\lib\ant-javamail.jar;C:\Tools\apache-ant-1.6.2\lib\ant-jdepend.jar;C:\Tools\apache-ant-1.6.2\lib\ant-jmf.jar;C:\Tools\apache-ant-1.6.2\lib\ant-jsch.jar;C:\Tools\apache-ant-1.6.2\lib\ant-junit.jar;C:\Tools\apache-ant-1.6.2\lib\ant-launcher.jar;C:\Tools\apache-ant-1.6.2\lib\ant-netrexx.jar;C:\Tools\apache-ant-1.6.2\lib\ant-nodeps.jar;C:\Tools\apache-ant-1.6.2\lib\ant
 -starteam.jar;C:\Tools\apache-ant-1.6.2\lib\ant-stylebook.jar;C:\Tools\apache-ant-1.6.2\lib\ant-swing.jar;C:\Tools\apache-ant-1.6.2\lib\ant-trax.jar;C:\Tools\apache-ant-1.6.2\lib\ant-vaj.jar;C:\Tools\apache-ant-1.6.2\lib\ant-weblogic.jar;C:\Tools\apache-ant-1.6.2\lib\ant-xalan1.jar;C:\Tools\apache-ant-1.6.2\lib\ant-xslp.jar;C:\Tools\apache-ant-1.6.2\lib\ant.jar;C:\Tools\apache-ant-1.6.2\lib\xercesImpl.jar;C:\Tools\apache-ant-1.6.2\lib\xml-apis.jar;C:\j2sdk1.4.2_07\lib\tools.jar
user.name : Alberts
java.vm.specification.version : 1.0
java.home : C:\j2sdk1.4.2_07\jre
sun.arch.data.model : 32
user.language : nl
java.specification.vendor : Sun Microsystems Inc.
awt.toolkit : sun.awt.windows.WToolkit
java.vm.info : mixed mode
java.version : 1.4.2_07
java.ext.dirs : C:\j2sdk1.4.2_07\jre\lib\ext
sun.boot.class.path :
C:\j2sdk1.4.2_07\jre\lib\rt.jar;C:\j2sdk1.4.2_07\jre\lib\i18n.jar;C:\j2sdk1.4.2_07\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_07\jre\lib\jsse.jar;C:\j2sdk1.4.2_07\jre\lib\jce.jar;C:\j2sdk1.4.2_07\jre\lib\charsets.jar;C:\j2sdk1.4.2_07\jre\classes
java.vendor : Sun Microsystems Inc.
file.separator : \
java.vendor.url.bug : http://java.sun.com/cgi-bin/bugreport.cgi
sun.io.unicode.encoding : UnicodeLittle
sun.cpu.endian : little
sun.cpu.isalist : pentium i486 i386

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message