Thanks Fred.
I refactored WebUtils.getWebRootFolders().
Now it eliminates derived folders and in case of availability of new WTP 3.3.1 API it also puts the default root folder to the very beginning of the list.

On 09/20/2011 03:44 PM, Fred Bricon wrote:
- You'd better check if the folder is not derived (cause it doesn't need 
to be target/*) to get a valid candidate (maven's build output directory 
is derived)
- WTP 3.2.5/3.3.1 introduces a new tag="defaultRootSource" attribute for 
virtual folders in .component (see the upstream change in and its attached 
patch :
If you can't lock down the WTP version, you can call the new API using 
reflection like :


Fred Bricon

On 21/09/2011 00:35, Alexey Kazakov wrote:
Hi guys!

We keep bumping into issues with multiple web root folders for mavenized
The resent ones are found by Max in VPE.
There are a few places where we have to handle multiple web roots: code
completion, validation, openOns, VPE, ...
In most cases it's enough just to look at all the roots but in some
cases we should avoid looking at target folder. For instance it's better
not to use "target" folder in validation.
So far we have to hardcode "target" name and don't use it when it's
critical. But of course it's not a perfect solution.
No we have a utility method project,
boolean ignoreTarget) which we use to get all the relevant roots.
Fred, Rob, do we have any way to distinguish such a folder?
jbosstools-dev mailing list
jbosstools-dev mailing list