Hi Marshall,

thanks for the information.

Just a short question so that I might understand the maven stuff a bit more.

This lifecylce mapping deactivates the mentioned goals and therefore some projects cannot be built with m2e, e.g., the runtime plugin because of the inclusion of the other projects, right?

I observe this when I build UIMA and was wondering if this is normal to add the mapping in order to get rid of the (m2e) problems. I did this in my workspace, but haven't seen any comments on the webpage about that. However, all works fine when I build the projects directly with "run as maven build... package". Please correct me, if I got something wrong.

Best,

Peter


On 02.07.2012 18:02, Marshall Schor wrote:
I'm trying this out - with a new Eclipse 4.2 install, and the version of m2e
that comes with Eclipse 4.2 also installed.

Some issues I've found and their workarounds:

1) I only had Java 7 in the list of installed JREs in Eclipse.  This made some
compiles fail which referred to an imported class named "Type" but where for
some unknown reason, even though there was an import for this, it was associated
to a different Type class that's available in Java 7.

Adding other JREs (java 5 and 6) fixed this.

2) m2e attempts to get identical builds between Eclipse and Maven.  To that end,
for the Eclipse builds it runs more of the maven builds, and needs some bridging
to do that.  The bridging is supplied by connectors and some maven plugins we
use don't have those.  The solution is to skip that part of the Maven build.

The Eclipse plugin projects are affected by this, and some of the other
packaging is also affected.

The skipping is configured by a new element in the pom (eventually this will be
in a top-level pom, and inherited).  For now, I'm putting the configuration in
the xxx-parent pom associated with major component (with a plan to promote this
to the common UIMA-wide pom with this info when we get it all figured out).

The updates for this I let Eclipse do automatically (there's some "quick-fix"
things that do it).  The result is this additional stanza in the<build>  
element:

      <pluginManagement>
           <plugins>
               <!--This plugin's configuration is used to store Eclipse m2e
settings only. It has no influence on the Maven build itself.-->
               <plugin>
                   <groupId>org.eclipse.m2e</groupId>
                   <artifactId>lifecycle-mapping</artifactId>
                   <version>1.0.0</version>
                   <configuration>
                       <lifecycleMappingMetadata>
                           <pluginExecutions>
                               <pluginExecution>
                                   <pluginExecutionFilter>
                                       <groupId>org.apache.uima</groupId>
                                       <artifactId>
                                           uima-build-helper-maven-plugin
                                       </artifactId>
                                       <versionRange>[2,)</versionRange>
                                       <goals>
                                           <goal>parse-date-time</goal>
                                       </goals>
                                   </pluginExecutionFilter>
                                   <action>
                                       <ignore></ignore>
                                   </action>
                               </pluginExecution>
                               <pluginExecution>
                                   <pluginExecutionFilter>
                                       <groupId>
                                           org.apache.felix
                                       </groupId>
                                       <artifactId>
                                           maven-bundle-plugin
                                       </artifactId>
                                       <versionRange>
                                           [2.3.4,)
                                       </versionRange>
                                       <goals>
                                           <goal>manifest</goal>
                                       </goals>
                                   </pluginExecutionFilter>
                                   <action>
                                       <ignore></ignore>
                                   </action>
                               </pluginExecution>
                               <pluginExecution>
                                   <pluginExecutionFilter>
                                       <groupId>
                                           org.apache.maven.plugins
                                       </groupId>
                                       <artifactId>
                                           maven-dependency-plugin
                                       </artifactId>
                                       <versionRange>
                                           [2.3,)
                                       </versionRange>
                                       <goals>
                                           <goal>unpack</goal>
                                           <goal>
                                               unpack-dependencies
                                           </goal>
                                       </goals>
                                   </pluginExecutionFilter>
                                   <action>
                                       <ignore></ignore>
                                   </action>
                               </pluginExecution>
                           </pluginExecutions>
                       </lifecycleMappingMetadata>
                   </configuration>
               </plugin>
           </plugins>
       </pluginManagement>

-Marshall


--
---------------------------------------------------------------------
Dipl.-Inf. Peter Klügl
Universität Würzburg        Tel.: +49-(0)931-31-86741
Am Hubland                  Fax.: +49-(0)931-31-86732
97074 Würzburg              mail: [email protected]
     http://www.is.informatik.uni-wuerzburg.de/en/staff/kluegl_peter/
---------------------------------------------------------------------

Reply via email to