<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div><br></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div class="moz-cite-prefix">BTW we also have a special validation
that checks the order of the builders and create a warning with a
quickfix if there is a problem.<br>
For example in CDI:
<a href="https://github.com/jbosstools/jbosstools-javaee/blob/master/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java#L280" target="_blank">https://github.com/jbosstools/jbosstools-javaee/blob/master/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java#L280</a><br>
I think it's better to use such validation for your validator
anyway. You can reuse it (
KBValidator.validateBuilderOrder()).<br>
Let see what can happen if m2e enables CDI and JAX-RS when the
project is importing as an existing maven project.<br>
1. m2e enables CDI.<br>
2. CDI tools add CDI builder and WST validation builder.<br>
3. m2e, I guess, enables JAX-RS<br><br>
So if JAX-RS tools just add its builder to the .project when CDI
has been enabled then you will get a problem. You wil get
something like this in the .project:<br><br>
java builder<br>
cdi builder<br>
wst validation builder<br>
jax-rs builder<br><br>
So validation will be invoked before you JAX-RS builder.<br>
It's not a problem for CDI validation since CDI tools take care of
builder order when enabling CDI support.<br><br>
If m2e is the last one in .project then I don't see problems here.
If m2e builder changes any resources in the project then eclipse
will run all the builders again.</div></blockquote><div>This may be part of the problem. If you have m2e-wtp and you're using facets, validation may get disabled for target/ (part of the problem I had: I was waiting for the output file to update before validating). I'm not sure of all the facets, but the utility module facet does add ignore target/ to the validator preferences for the project.<br></div><div><br></div><div>https://github.com/eclipse/m2e.wtp/blob/master/org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/UtilityProjectConfigurator.java#L73</div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div class="moz-cite-prefix"><br><br><br>
On 10/11/2013 08:32 AM, Xavier Coulon wrote:<br></div><blockquote cite="mid:AC6F38FA-12AA-419B-84EA-96DE74EDBBF2@redhat.com">Rob,
<div><br></div><div>That's what Fred showed me, too. But in my case, it's an
import of an existing project, thus the builders (JAX-RS, m2e
and Validation, amongst others) are already configured.</div><div><br></div><div>Thanks for your help !</div><div><br><div><span class="Apple-style-span" style="border-collapse:
separate; color: rgb(0, 0, 0); font-family: Helvetica;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;
-webkit-text-decorations-in-effect: none;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width:
0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0);
font-family: Helvetica; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space:
normal; widows: 2; word-spacing: 0px;
-webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;
-webkit-text-decorations-in-effect: none;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width:
0px; font-size: medium; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode:
space; -webkit-line-break: after-white-space; ">Best
regards,</div>
<div style="word-wrap: break-word; -webkit-nbsp-mode:
space; -webkit-line-break: after-white-space; ">/Xavier<br><br><br></div>
</span></span></div><br><div><div>On Oct 11, 2013, at 3:00 PM, Rob Cernich wrote:</div><br class="Apple-interchange-newline"><blockquote><div><blockquote>Xavier,<br></blockquote><blockquote><br></blockquote><blockquote>Worth checking out if your two
different flows might be caused by your<br></blockquote><blockquote>validator/builder being added in
different sequence. Causing you to miss<br></blockquote><blockquote>java changes ?<br></blockquote><br>
Max, I think the m2e builder always wants to be last: <a href="https://github.com/eclipse/m2e-core/blob/master/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java#L563" target="_blank">https://github.com/eclipse/m2e-core/blob/master/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java#L563</a><br><br><blockquote><br></blockquote><blockquote>/max (sent from my phone)<br></blockquote><blockquote><br></blockquote><blockquote><br></blockquote><blockquote><blockquote>On 10/10/2013, at 20.06, Alexey
Kazakov <<a href="mailto:akazakov@exadel.com" target="_blank">akazakov@exadel.com</a>>
wrote:<br></blockquote></blockquote><blockquote><blockquote><br></blockquote></blockquote><blockquote><blockquote>I didn't notice any problems
with CDI validation for m2e projects.<br></blockquote></blockquote><blockquote><blockquote>But when we enable CDI support
on the project (there is the only method<br></blockquote></blockquote><blockquote><blockquote>for that which is used by m2e,
preference pages, new project wizard,<br></blockquote></blockquote><blockquote><blockquote>install facet delegates, etc)<br></blockquote></blockquote><blockquote><blockquote>we make sure we have builders in
.project in a proper order.<br></blockquote></blockquote><blockquote><blockquote>So we don't just add cdi and
validation builders. We re-order the list<br></blockquote></blockquote><blockquote><blockquote>of builders in .project. See<br></blockquote></blockquote><blockquote><blockquote>WebModelPlugin.addNatureToProjectWithValidationSupport();<br></blockquote></blockquote><blockquote><blockquote>In our case four builders are
critical: Java, KB, CDI, WST validation.<br></blockquote></blockquote><blockquote><blockquote>And the order of these builders
is critical for us.<br></blockquote></blockquote><blockquote><blockquote>Every time m2e changes something
in the project, the whole stack of<br></blockquote></blockquote><blockquote><blockquote>builders is invoked and even if
it does change the project step-by-step<br></blockquote></blockquote><blockquote><blockquote>the final changing/building will
fix false validation problems caused by<br></blockquote></blockquote><blockquote><blockquote>previous changes.<br></blockquote></blockquote><blockquote><blockquote><br></blockquote></blockquote><blockquote><blockquote>On 10/10/2013 09:50 AM, Rob
Cernich wrote:<br></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote>There is something badly
wrong if we need to start making that the habit<br></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote>(if<br></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote>your project is m2e then
disable the validation and do it in a maven<br></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote>plugin/extension instead) :)<br></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote>Yes. That is the plan moving
forward, but it was easier to get validation<br></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote>into the tooling than it was
to get it into the mojo, so...<br></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><br></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote>...but that said - I know
we've seen more than a few issues with m2e vs<br></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote>eclipse causing "havoc" on
builds.<br></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><br></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote>/max<br></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><br></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>On Thu, Oct 10, 2013 at
11:49:10AM -0400, Rob Cernich wrote:<br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>Hey Xavier,<br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>I had a similar problem
with the SwitchYard validator. Upon further<br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>investigation, it appears
m2e wants the Maven builder to be last in the<br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>list. Based on that, I
eventually gave up, disabled the SwitchYard<br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>validator from the build
and invoked it directly from the SwitchYard m2e<br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>build participant. I
suspect something similar will probably need to
be<br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>done in your case,
assuming there is a JAX-RS participant for m2e.<br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>Hope that helps,<br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>Rob<br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>----- Original Message
-----<br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>hello,<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>I'm banging my head
against the wall trying to fix this issue: On
a<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>Full<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>Publish LiveReload
refreshes the browser before the application
is<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>fully<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>restarted<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>Here's the context: I
have a kitchensink project in which there are
are<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>JAX-RS errors (a custom
JAX-RS HTTP Method is missing some
annotations)<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>Now, here's the problem
I have:<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>- in some cases, the
metamodel exists and is complete (i.e.: the
m2e<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>dependencies were
properly set *before* the metamodel was
built), and<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>then,<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>the validation occurs on
the whole project, and I have the expect<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>errors<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>reported.<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>- in other cases, the
validation on the whole project is executed<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>*before*<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>m2e did set the
dependencies on the project's classpath. At
this stage,<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>the<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>metamodel exists but it
is empty (the java classes have compilation<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>errors<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>because of missing libs,
so no JAX-RS element was created). The<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>metamodel<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>is<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>completed after m2e
updated the project's classpath, but then a<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>validation<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>job is triggered because
of bunch of xml files (not related to the<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>JAX-RS<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>classes) were processed
by m2e and copied into the /target/classes<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>output<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>folder. This means that
the full validation was not executed.<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>Basically, it looks as
if some operations (m2e / JAX-RS / validation)<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>don't<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>always occur in the same
order, which sometimes result in incomplete<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>validation and missing
markers as expected. (not to mention that I
have<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>no<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>clue how to force the
order of execution, which makes the debugging<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>*not<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>fun*...)<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>Any idea how I could
make sure the validation (based on<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>org.jboss.tools.common.validation)
could be always called on the<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>project<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>after m2e sets the
dependencies in the classpath ?<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>Thanks for your help ;-)<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>Best regards,<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>/Xavier<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>_______________________________________________<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>jbosstools-dev mailing
list<br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><a href="mailto:jbosstools-dev@lists.jboss.org" target="_blank">jbosstools-dev@lists.jboss.org</a><br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><a href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a><br></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>_______________________________________________<br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>jbosstools-dev mailing
list<br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><a href="mailto:jbosstools-dev@lists.jboss.org" target="_blank">jbosstools-dev@lists.jboss.org</a><br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><a href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a><br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote>_______________________________________________<br></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote>jbosstools-dev mailing list<br></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><a href="mailto:jbosstools-dev@lists.jboss.org" target="_blank">jbosstools-dev@lists.jboss.org</a><br></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><a href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a><br></blockquote></blockquote></blockquote><blockquote><blockquote><br></blockquote></blockquote><blockquote><blockquote>_______________________________________________<br></blockquote></blockquote><blockquote><blockquote>jbosstools-dev mailing list<br></blockquote></blockquote><blockquote><blockquote><a href="mailto:jbosstools-dev@lists.jboss.org" target="_blank">jbosstools-dev@lists.jboss.org</a><br></blockquote></blockquote><blockquote><blockquote><a href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a><br></blockquote></blockquote><blockquote><br></blockquote><blockquote>_______________________________________________<br></blockquote><blockquote>jbosstools-dev mailing list<br></blockquote><blockquote><a href="mailto:jbosstools-dev@lists.jboss.org" target="_blank">jbosstools-dev@lists.jboss.org</a><br></blockquote><blockquote><a href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a><br></blockquote><blockquote><br></blockquote>
_______________________________________________<br>
jbosstools-dev mailing list<br><a href="mailto:jbosstools-dev@lists.jboss.org" target="_blank">jbosstools-dev@lists.jboss.org</a><br><a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a><br></div></blockquote></div><br></div><br><br><pre>_______________________________________________
jbosstools-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:jbosstools-dev@lists.jboss.org" target="_blank">jbosstools-dev@lists.jboss.org</a><a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a><br data-mce-bogus="1"></pre></blockquote><br><br>_______________________________________________<br>jbosstools-dev mailing list<br>jbosstools-dev@lists.jboss.org<br>https://lists.jboss.org/mailman/listinfo/jbosstools-dev</blockquote><div><br></div></div></body></html>