It's me again.
There is something bothering me - when I'm running the ant script written below
(from my previous mail), I don't see in the output that the Zip task is being
executed. Even if I add update="true", the task still not getting executed.
If I change the destfile to be new file (and not the already existent
common.jar) - the target is executed successfully. The common.jar file has 777
permission.
My question is why the Zip target not updates an existent file? Is there
workaround I can use?
Thanks again,
Barak.
-----Original Message-----
From: Barak Yaish
Sent: ?? 22 ?????? 2006 10:30?
To: Ant Users List
Subject: RE: Question regarding the Jar task
Hello again,
Here is the target I configured in the build.xml, but it doesn't seems to be
work:
<target name="jar_test" depends="compile_test">
<jar destfile="${jars}/test.jar" update="true">
<fileset dir="${common_output}" includes="com/manager/test/**"/>
<fileset dir="${sources}/test/" includes="properties/*.xml"/>
</jar>
<copy file="${sources}/common/properties/server_config.properties"
todir="/tmp"/>
<replace file="/tmp/server_config.properties" token="is_allow_mirror "
value="do_not_allow_mirror"/>
<zip destfile="${jars}/common.jar">
<zipfileset dir="/tmp" includes="server_config.properties"
fullpath="properties"/>
</zip>
</target>
where common.jar is jar created in previous target.
This is the relevant part of the ant output:
jar_test:
[jar] Building jar: /home/barak/exec/debug_exec/lib/test.jar
[copy] Copying 1 file to /tmp
BUILD SUCCESSFUL
Total time: 30 seconds
When I check the content of common.jar, I see the old version of
server_config.properties (with "is_allow_mirror"). The file under /tmp has the
new value "do_not_allow_mirror".
Can you advice on that, please?
Thanks,
Barak.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: ?? 22 ?????? 2006 10:04?
To: [email protected]
Subject: AW: Question regarding the Jar task
Because <jar> extends <zip> this example from the manual should help
<zip destfile="${dist}/manual.zip">
<zipfileset dir="htdocs/manual" prefix="docs/user-guide"/>
<zipfileset dir="." includes="ChangeLog27.txt"
fullpath="docs/ChangeLog.txt"/>
<zipfileset src="examples.zip" includes="**/*.html" prefix="docs/examples"/>
</zip>
zips all files in the htdocs/manual directory into the docs/user-guide
directory in
the archive, adds the file ChangeLog27.txt in the current directory as
docs/ChangeLog.txt, and includes all the html files in examples.zip under
docs/examples. The archive might end up containing the files:
docs/user-guide/html/index.html
docs/ChangeLog.txt
docs/examples/index.html
Jan
>-----Ursprüngliche Nachricht-----
>Von: Barak Yaish [mailto:[EMAIL PROTECTED]
>Gesendet: Mittwoch, 22. Februar 2006 08:33
>An: [email protected]
>Betreff: Question regarding the Jar task
>
>Hello all,
>
>Is it possible using the Jar task to add a file to a specific
>location in a jar file?
>For example, if there is a jar containing a folder named z
>inside a folder named x (/x/z). How should I use the Jar task
>to add some file into the z folder inside the jar file?
>
>Thanks,
>
>Barak.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]