<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Thanks Fred.<br>
    I refactored WebUtils.getWebRootFolders().<br>
    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.<br>
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <span class="Apple-style-span" style="color: rgb(74, 93, 117);
      font-family: arial, FreeSans, Helvetica, sans-serif; font-size:
      24px; font-style: normal; font-variant: normal; font-weight: bold;
      letter-spacing: normal; line-height: 28px; orphans: 2; text-align:
      -webkit-auto; text-indent: 0px; text-transform: none; white-space:
      normal; widows: 2; word-spacing: 0px;
      -webkit-text-decorations-in-effect: none;
      -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
      background-color: rgb(247, 247, 247); "></span><br>
    On 09/20/2011 03:44 PM, Fred Bricon wrote:
    <blockquote cite="mid:4E791768.3010302@redhat.com" type="cite">
      <pre wrap="">- 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 
<a class="moz-txt-link-freetext" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=121460">https://bugs.eclipse.org/bugs/show_bug.cgi?id=121460</a> and its attached 
patch : <a class="moz-txt-link-freetext" href="https://bugs.eclipse.org/bugs/attachment.cgi?id=201282&amp;action=diff">https://bugs.eclipse.org/bugs/attachment.cgi?id=201282&amp;action=diff</a>)
If you can't lock down the WTP version, you can call the new API using 
reflection like : 
<a class="moz-txt-link-freetext" href="https://github.com/sonatype/m2eclipse-wtp/commit/96acdcafaa233ebf00d3eb8dac00fe7f0d21d616#L5R560">https://github.com/sonatype/m2eclipse-wtp/commit/96acdcafaa233ebf00d3eb8dac00fe7f0d21d616#L5R560</a>

HIH

Fred Bricon

On 21/09/2011 00:35, Alexey Kazakov wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Hi guys!

We keep bumping into issues with multiple web root folders for mavenized
projects.
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
org.jboss.tools.jst.web.WebUtils.getWebRootFolders(IProject 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
<a class="moz-txt-link-abbreviated" href="mailto:jbosstools-dev@lists.jboss.org">jbosstools-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a>
</pre>
      </blockquote>
      <pre wrap="">
_______________________________________________
jbosstools-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:jbosstools-dev@lists.jboss.org">jbosstools-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>