| Summary: | No argument constructor and setter methods removed from ResourceCollection | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Nils Breunese <nils> |
| Component: | server | Assignee: | Greg Wilkins <gregw> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | jetty-inbox, owen+findbugs, sdavids |
| Version: | 7.2.1 | ||
| Target Milestone: | 7.1.x | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Nils Breunese
Nils, my bad. Should not have changed that. I was concerned that resources instances should be immutable and fixed it with my 7.1 to 7.2 mind set still working. Now that I have broken it, I rather not simply revert back (unless there are many other uses of it). I'll research that maven XML syntax and see if it can call a static factory method rather than a setter. I'm adding a convenience method on the jetty maven plugin so that you can now do:
<resourceBases>
<resourceBase>/tmp</resourceBase>
<resourceBase>/home/gregw</resourceBase>
</resourceBases>
and not have to create a resource collection directly.
r6280
will be in next release.
So the setter method that accept a list of resources will stay gone? I have a bunch of resource paths that are shared between a couple of Maven profiles, so I store those paths in a property and currently use this with Jetty 7.2.0:
----
<resourcesAsCSV>
/path/to/profile/specific/dir,
${commonResources>
<resourcesAsCSV>
----
This doesn't work with Jetty 7.2.1 since the setter methods have disappeared and I also don't see how I can get something similar to work with your new proposed method.
I'd like to keep the setter methods gone. It was bad to remove them in a point release, but the reason for their removal is valid - Resources should be immutable.
I'll modify the convenience method so it will also look for CSV within each value, so you will be able to do:
<resourceBases>
<resourceBase>/tmp</resourceBase>
<resourceBase>${some-csv-list}</resourceBase>
</resourceBases>
Will that work for you?
Yes, great, that would certainly work for me.
I'm not sure if the naming of the elements still makes sense in that case (multiple resource bases in a single resourceBase element). If you're going to support CSV anyway I'd expect something like:
----
<resourceBases>/tmp,${some-csv-list}</resourceBases>
----
I see 7.2.2.v20101205 was released last month. Any news on progress of providing a new way of setting the resource paths from Maven configuration for scanning? Or will we need to stick with 7.2.0.v20101020 since that is the last version which has the setResourcesAsCSV method on the ResourceCollection class? Please document the changes AND the working solution(s) on: http://docs.codehaus.org/display/JETTY/Multiple+WebApp+Source+Directory |