|
[
Permalink
| « Hide
]
Jason van Zyl added a comment - 29/Jun/05 04:41 PM
is it possible to add a flatten mapper inside the fileset with the refid, or is that an option you'd need added to the dependencies definition?
Use a 'build' directory to place all your files before you use the <war> task. This is good standard practice anyway, and then you can use a flatten mapper when you copy the dependencies into 'build'
The fileset created by Maven Ant Tasks points to files in the local repository, which are stored with directories.
I don't see how the fileset could be directly flattened: we have to use a mapper, or something like this. But <war><lib> doesn't support a mapper... stuck! I looked at o.a.t.a.tasks.War class: public void addLib(ZipFileSet fs) { // We just set the prefix for this fileset, and pass it up. fs.setPrefix("WEB-INF/lib/"); super.addFileset(fs); } instead of // We just set the prefix for this fileset, and pass it up. fs.setPrefix("WEB-INF/lib/"); I think // We just set the full path for this fileset, and pass it up. fs.setFullpath("WEB-INF/lib/"); would do what we are expecting. I'll look at Ant bug-tracking system to create an issue... found an old Bugzilla issue (10/2004) about flattening WEB-INF/lib:
http://issues.apache.org/bugzilla/show_bug.cgi?id=31947 but people did not seem to agree on the idea... this issue can't be solved by Maven: the fileset references files in the local repository, with complete directory structure.
It a problem with the Ant's war task if there is no feature to flatten the fileset when referencing it |
||||||||||||||||||||||||||||||||||||||||||||