<div dir="ltr"><div><div>Thanks Fred!<br><br></div>We'll explore some options and see what door we choose to open. :)<br><br></div>--Fitz<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 5, 2016 at 1:23 PM, Fred Bricon <span dir="ltr"><<a href="mailto:fbricon@redhat.com" target="_blank">fbricon@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Brian,<div><br></div><div>sooo, m2e doesn't know if it's safe to execute a 3rd party plugin or not, during an Eclipse build[1]. It needs hints whether to ignore or execute this maven plugin or maybe delegate its execution to some eclipse plugin adapter. </div><div><br></div><div>So the very first question you need to answer is : does the maven plugin need to be invoked during an eclipse (incremental or full) build, or can it be safely ignored? </div><div>I'm guessing (but you prolly want to ask the exoerts):</div><div>- <span style="font-size:12.8px">cxf-java2wadl-</span><span style="font-size:12.8px">plugin:</span><span style="font-size:12.8px">parsejavadoc: probably ignored</span></div><div><div>- <span style="font-size:12.8px">cxf-java2wadl-</span><span style="font-size:12.8px">plugin:</span><span style="font-size:12.8px"> java2wadl</span><span style="font-size:12.8px">: probably executed on full builds only (you don't want to regenerate the wadl every time you save a file in your project)</span></div></div><div><div>- <span style="font-size:12.8px">fabric-cxf-</span><span style="font-size:12.8px">plugins</span><span style="font-size:12.8px">:</span><span style="font-size:12.8px"> java2swagger</span><span style="font-size:12.8px">: </span><span style="font-size:12.8px">probably executed on full builds only</span></div></div><div><br></div><div>Once you have the answer to that question, the next step is to declare a lifecycle mapping (LM), which can be done in several ways, depending on your use case:</div><div><br></div><div>1 - add a LM descriptor within the maven plugin itself:</div><div> * this only affects consumers of the new maven plugin version containing the LM. For older versions, see #2-#3</div><div> * if must be executed, need to ensure this is done in an optimal way by using the incremental build API [2], to at least automatically refresh resources modified by the plugin execution</div><div>2 - define m2e LM in pom.xml</div><div> * define it once in a common parent pom to avoid xml bloat, that should be easy to do for new example projects, won't work for previous example releases </div><div>3 - create an m2e configurator (eclipse plugin) [3]</div><div> * can simply define the LM. Can also enhance eclipse integration by configuring some eclipse specific configuration</div><div> * the eclipse plugin needs to be added to the m2e discovery catalog [4]</div><div><br></div><div>You could reach out to the <span style="font-size:12.8px">fabric8 team and ask them if they're willing to make their plugins incremental-build friendly. For Apache CXF, that might be a bit more tricky, bit doesn't hurt to ask.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Chances are though, it'll be faster/easier to create an m2e eclipse plugin for that (#3). I have commit access to the m2e discovery repo, so it'll be easy to get in. </span>Now, the m2e project is not responsible for providing LMs for 3rd party maven plugins. <span style="font-size:12.8px">So I'd suggest you open JBIDE issues for each of your problems. </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Fred</span></div><div><span style="font-size:12.8px"><br></span></div><div><br></div><div>[1] <a href="https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html" style="border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:orange" target="_blank">https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html</a></div><div>[2] <a href="https://www.eclipse.org/m2e/documentation/m2e-making-maven-plugins-compat.html" style="border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:orange" target="_blank">https://www.eclipse.org/m2e/documentation/m2e-making-maven-plugins-compat.html</a></div><div>[3] <a href="https://www.eclipse.org/m2e/documentation/m2e-extension-development.html" style="border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:orange" target="_blank">https://www.eclipse.org/m2e/documentation/m2e-extension-development.html</a></div><div>[4] <a href="https://github.com/takari/m2e-discovery-catalog#m2e-discovery-catalog" style="border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:orange" target="_blank">https://github.com/takari/m2e-discovery-catalog#m2e-discovery-catalog</a></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, May 5, 2016 at 10:49 AM, Brian Fitzpatrick <span dir="ltr"><<a href="mailto:bfitzpat@redhat.com" target="_blank">bfitzpat@redhat.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Hey guys,<br><br></div><div>We've hit some maven plug-ins that aren't supported yet by m2e that we use in the Fuse world... if I was to log a feature request for some of these, should I put it in Eclipse? or in JBIDE?<br><br></div><div>Or a better question, what is the policy for additions to m2e? How do we petition to have plug-ins added or contribute back? These may not be broadly applicable to other projects, so less apt to be pushed upstream.<br><br></div><div>Thanks in advance.<br><br></div><div>--Fitz<br><br></div><div>p.s. For a bit more detail about what we're looking for... <br><br>Importing the camel-cxf example (<a href="https://github.com/jboss-fuse/quickstarts/tree/master/cxf/rest" target="_blank">https://github.com/jboss-fuse/quickstarts/tree/master/cxf/rest</a>) we hit three issues.<br></div><div><br></div><div>We have an org.apache.cxf plug-ins that isn't supported yet...<br><br> <plugin><br> <groupId>org.apache.cxf</groupId><br> <artifactId>cxf-java2wadl-plugin</artifactId><br> <version>3.0.4.redhat-621084</version><br> <executions><br> <execution><br> <id>parsejavadoc</id><br> <phase>generate-sources</phase><br> <goals><br> <goal>parsejavadoc</goal><br> </goals><br> </execution><br> <execution><br> <id>process-classes</id><br> <phase>process-classes</phase><br> <goals><br> <goal>java2wadl</goal><br> </goals><br> <configuration><br> <classResourceNames><br> <classResourceName>io.fabric8.quickstarts.rest.CustomerService</classResourceName><br> </classResourceNames><br> <docProvider>org.apache.cxf.maven_plugin.javatowadl.ResourceMapJavaDocProvider</docProvider><br> <attachWadl>false</attachWadl><br> </configuration><br> </execution><br> </executions><br> </plugin><br><br></div><div>And a fabric8 plug-in that isn't supported yet.<br><br> <plugin><br> <groupId>io.fabric8</groupId><br> <artifactId>fabric-cxf-plugins</artifactId><br> <version>1.2.0.redhat-621084</version><br> <executions><br> <execution><br> <id>process-classes</id><br> <phase>process-classes</phase><br> <goals><br> <goal>java2swagger</goal><br> </goals><br> <configuration><br> <classResourceNames><br> <classResourceName>io.fabric8.quickstarts.rest.CustomerService</classResourceName><br> </classResourceNames><br> <attachSwagger>false</attachSwagger><br> </configuration><br> </execution><br> </executions><br> </plugin><br><br></div></div>
<br></div></div>_______________________________________________<br>
jbosstools-dev mailing list<br>
<a href="mailto:jbosstools-dev@lists.jboss.org" target="_blank">jbosstools-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a><br></blockquote></div><br></div>
</blockquote></div><br></div>