Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

Error in documentation (zipfileset, single argument resource collection)

Jann Röder

2010-08-19

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi,
I think I might have found an error in the documentation. On the page
about the jar task (http://ant.apache.org/manual/Tasks/jar.html) it says:

[quote]
  <jar destfile="build/main/checksites.jar">
    <fileset dir="build/main/classes"/>
    <zipfileset includes="**/*.class">
      <fileset dir="lib/main" includes="**/*.jar"/>
    </zipfileset>
    <manifest>
      <attribute name="Main-Class"
          value="com.acme.checksites.Main"/>
    </manifest>
   </jar>

Creates an executable jar file with a main class
"com.acme.checksites.Main", and embeds all the classes from all the jars
in lib/main.
[/quote]

However if I do that, I get this error:
"only single argument resource collections are supported as archives"

My experiments have shown that this means that one may only use filesets
that contain exactly one file. Is this a mistake in the documentation or
stupidity on my part?

Thanks,
Jann


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.