Issue Details (XML | Word | Printable)

Key: MANTTASKS-39
Type: Sub-task Sub-task
Status: Closed Closed
Resolution: Won't Fix
Priority: Minor Minor
Assignee: Unassigned
Reporter: Anders Harrisson
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Maven 2.x Ant Tasks
MANTTASKS-38

Flattened fileset reference

Created: 29/Jun/05 06:33 AM   Updated: 10/Nov/07 12:02 PM
Component/s: dependencies task
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide
Having the dependency fileset-reference flattened would really simplify some use of it, ie direct reference of the fileset in the lib-element of the War-task.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
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?

Dave Brondsema added a comment - 26/Sep/05 07:51 AM
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'

Herve Boutemy added a comment - 29/May/07 11:49 AM
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.
The only drawback is that you can't create WEB-INF/lib subdirectories any more with <lib>: I personnally don't think it is a problem, but perhaps somebody will not be ok...

I'll look at Ant bug-tracking system to create an issue...


Herve Boutemy added a comment - 29/May/07 11:56 AM
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...
I cross-link the issues, and perhaps 2,5 years later we can talk about it once more, now that Maven is here and a Ant+Maven is a great target


Herve Boutemy added a comment - 10/Nov/07 12:02 PM
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