ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <levylamb...@tiscali-dsl.de>
Subject Re: Zipfileset in <path>
Date Wed, 12 Feb 2003 08:52:12 GMT
What you want does not seem to be possible with the current ant
Remarks IMHO :
  1    semantically,  <path> is used mainly for compilation classpaths,
   2   the Zip or Jar tasks do not accept the <path> type as a nested
element to indicate some of the files which get into the archive,
   3   according to the source code ZipFileSet cannot be defined outside of
the Zip class
My understanding is that it does not make sense currently to define
ZipFileSet outside of the Zip class, because ZipFileSet cannot be cloned
properly
(clone method is not implemented for ZipFileSet ) so a clone of a ZipFileSet
would actually be a FileSet (????) not good

     4 there is no type available to store a set comprising of FileSet(s) or
ZipFileSet(s)

To solve your problem, point 4 and maybe also point 3 should be addressed.
Maybe you should go to http://nagoya.apache.org/bugzilla and enter your
wishes there as enhancement request(s)

My advice would be that you enter two requests :
1)
   - summary : allow to define ZipFileSet(s) outside of Zip task
   - description
     allow to define ZipFileSet(s) outside of Zip task
     allow to use ZipFileSet(s) in packaging tasks by refid="xyz"
I would think this one is relatively easy in terms of programming and would
already help you.
Structurally, it would correct a strange limitation in the current ant

2)
   - summary : create new type Set of FileSets and ZipFileSets
   - description :
    create a new type which would be a set of FileSet(s) and/or
ZipFileSet(s)
    make this type be accepted as nested element in the packaging tasks
(Zip, Jar, War, Ear)

this one is probably much more work, but is doable too.

Advantages of entering enhancement or bugs in bugzilla is that the ant
committers can refer to bugzilla for an overview of all outstanding work.
Also you can get other ant users to vote for your bugs, and various people
can add comments.

----- Original Message -----
From: "Casey Daniell" <CDaniell@realm.com>
To: <user@ant.apache.org>
Sent: Wednesday, February 12, 2003 12:55 AM
Subject: Zipfileset in <path>


> I have several jar files, realmutils.jar, arch.jar. base.jar which contain
> classes that I need in various other jar files,  rbac.jar and  client.jar.
>
> Is there anyway that I can use the zipfileset task within a <path> type
tag?
> What I am trying to do is similar to the below:
>
> Create a path id to reference later in the build process, not all files in
> any jar file is included this is selecting a subset of classes in each
jar:
>
> <path id="bac-client-files">
>    <fileset dir="com/realm/portal/data/security/rbac/ejb">
>       <exclude name="**/jboss.xml"/>
>       <include name="META-INF/*.xml"/>
>    </fileset>
>    <zipfileset src="${parentdir}/lib/realmutils.jar"
>                    includes="com/realm/utils/string/StringCipher.class"/>
>    <zipfileset src="${parentdir}/lib/arch.jar"
>                    includes="com/realm/utils/log/ILogger.class"/>
>    <zipfileset src="${parentdir}/lib/arch.jar"
>                    includes="com/realm/utils/log/RealmLogger.class"/>
>    <zipfileset src="${parentdir}/lib/base.jar"
> </path>
>
> With the path id created I would then like to build my multiple jar files
> referencing the id "bac-client-files", and adding in some other files
> specific to each jar:
>
> <jar destfile="${rbac.jar}">
>      <fileset refid="bac-client-files"/>
>      <....other files added here.....>
> </jar>
>
> The above code needs to be run for a couple of different jar files that
all
> contain the "bac-client-files".
>
> Is there a way to accomplish this? I am getting, "The <path> data type
> doesn't support the the nested "zipfile" element" error message when I try
> to create the <path> above.
>
> Thanks,
> Casey B. Daniell
> Realm Business Solutions, Inc.
> 13727 Noel Rd. Suite 800
> Dallas, TX 75240
> cdaniell@realm.com <mailto:cdaniell@realm.com>
> O:(469) 791-1065
> C:(512) 589-3667
>
>


Mime
View raw message