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=35685>. 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=35685 Summary: convert absolute paths to relative paths Product: Ant Version: 1.6.5 Platform: Other OS/Version: other Status: NEW Severity: enhancement Priority: P3 Component: Core tasks AssignedTo: dev@ant.apache.org ReportedBy: [EMAIL PROTECTED] Hi, At runtime my program is stored like this: ./myprogram.jar ./lib/commons/commons-net.jar ./lib/commons/commons-configuration.jar ./lib/spring/spring_jar1.jar ./lib/spring/spring_jar2.jar ./lib/some/other/jarfile.jar And I would like my ANT script to create this .jar file plus manifest automatically. I tried this target: <target name="dist" depends="compile"> <mkdir dir="${build.dist.dir}/lib"/> <copy todir="${build.dist.dir}/lib"> <fileset dir="${lib.runtime.dir}" includes="**/*.jar"/> </copy> <path id="manifest.classpath.path"> <fileset dir="${build.dist.dir}" includes="lib/**/*.jar"/> </path> <pathconvert property="manifest.classpath.prop" pathsep=" "> <path refid="manifest.classpath.path"/> </pathconvert> <property name="manifest.classpath.prop" refid="manifest.classpath.path"/> <jar destfile="${build.dist.dir}/${dist.jar.filename}"> <fileset dir="${build.classes.dir}" includes="**/*.class"/> <manifest> <attribute name="Built-By" value="${user.name}"/> <attribute name="Main-Class" value="${project.main.class}"/> <attribute name="Class-Path" value="${manifest.classpath.prop}"/> </manifest> </jar> </target> However, this target only writes absolute paths which is not allowed or practical in the manifest Class-Path. I would like to be able to convert absolute paths into relative ones (conversion with respect to some given basedir). I looked at the pathconvert task and at a bunch of mappers but none of them seem to do what I need. -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]