Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Eclipse standard m2e Maven task "generate-sources" | Custom bound plug-ins (here: "wsimport" of "jax-ws")

Von: m2e-users-bounces@xxxxxxxxxxx [mailto:m2e-users-bounces@xxxxxxxxxxx] Im Auftrag von Anders Hammar
Gesendet: Donnerstag, 28. Februar 2013 16:40
An: Maven Integration for Eclipse users mailing list
Betreff: Re: [m2e-users] Eclipse standard m2e Maven task "generate-sources" | Custom bound plug-ins (here: "wsimport" of "jax-ws")

 

Ø  Not sure if that's the connector in the discovery catalog. But regardless, what do you mean by "without getting a better solution". What are you expecting to happen?

Well, the discovery dialog does not offer the m2e connector I mentioned:
http://jaxws-maven-connector.googlecode.com/svn/trunk/jaxws-connector-update-site

You initial question was regarding the plugin not being executed during the Maven build initiated through Run As->Maven generate-sources. Does that still not work? I think it does. It does not require a m2e connector as I stated earlier.

Yes – the execution does work J The only thing, I wanted to get rid of is the error message within the pom: “Plugin execution not covered by lifecycle configuration”

/Anders

 

On Thu, Feb 28, 2013 at 4:31 PM, King Holger (CI/AFP2) <Holger.King@xxxxxxxxxxxx> wrote:

Hi Matthew, Hi Anders,

 

yes, a quick fix is available, a m2e connector not. Just googled and found:

http://code.google.com/p/jaxws-maven-connector/

 

This m2e connector, I installed manually and restarted Eclipse without getting a better solution. Do I have to integrate it manually within the POM now?

 

Additionally, I read:

http://wiki.eclipse.org/M2E_plugin_execution_not_covered

 

Any further hints?

 

Von: m2e-users-bounces@xxxxxxxxxxx [mailto:m2e-users-bounces@xxxxxxxxxxx] Im Auftrag von Matthew Piggott
Gesendet: Donnerstag, 28. Februar 2013 15:47
An: Maven Integration for Eclipse users mailing list
Betreff: Re: [m2e-users] Eclipse standard m2e Maven task "generate-sources" | Custom bound plug-ins (here: "wsimport" of "jax-ws")

 

 

Ø  There should be a Quick Fix option available on the context menu

 

 

On 28 February 2013 09:45, King Holger (CI/AFP2) <Holger.King@xxxxxxxxxxxx> wrote:

You’re right:

-              now, the Maven run task “generate-sources” within Eclipse takes into account my “wsimport” plug-in J

-              when hovering over the line where Eclipse shows the red “X” within the pom.xml, I see the following message: “Plugin execution not covered by lifecycle configuration: org.jvnet.jax-ws-commons:jaxws-maven-plugin:2.2:wsimport (execution: default, phase: generate-sources)”

 

There is currently nothing mentioned regarding “discover new m2e connector”. Do you know how to proceed?

 

Von: m2e-users-bounces@xxxxxxxxxxx [mailto:m2e-users-bounces@xxxxxxxxxxx] Im Auftrag von Anders Hammar
Gesendet: Donnerstag,
28. Februar 2013 14:21
An: Maven Integration for Eclipse users mailing list
Betreff: Re: [m2e-users] Eclipse standard m2e Maven task "generate-sources" | Custom bound plug-ins (here: "wsimport" of "jax-ws")

 

To get the Maven execution from within Eclispe to work you don't have to do anything. But if you want to have incremental/runtime support in the IDE you should get the proper m2e connector. If you look at the pom in the POM editor in Eclipse, the plugin execution should be marked with a red error X. Hover on that and you should get an option to find one ("Discover new m2e connectors").

/Anders

 

On Thu, Feb 28, 2013 at 2:14 PM, King Holger (CI/AFP2) <Holger.King@xxxxxxxxxxxx> wrote:

Hi Anders,

 

thanks for the hint. I also reviewed the meaning between “pluginmanagement” and “plugins”. Now, I see the phase “generate-sources” within the lifecycle mapping of the Eclipse project. The element is marked in red color and does not own a mapping.

 

Do I have to map it directly within the POM “pom.xml” or do I have to offer a mapping in:

“D:/workspace/.metadata/.plugins/org.eclipse.m2e.core/lifecycle-mapping-metadata.xml” (what seems to be “experimental”)

 

via the following?

 

<configuration>

        <lifecycleMappingMetadata>

               <pluginExecutions>

               <pluginExecution>

                            <pluginExecutionFilter>

                                <groupId>org.jvnet.jax-ws-commons</groupId>

                                <artifactId>jaxws-maven-plugin</artifactId>

                                <versionRange>[2.2,)</versionRange>

                                <goals>

                                    <goal>wsimport</goal>

                                </goals>

                            </pluginExecutionFilter>

                            <action>

                                <execute />

                            </action>

                       </pluginExecution>

               </pluginExecutions>                        

        </lifecycleMappingMetadata>

</configuration>

 

 

 

 

 

Von: m2e-users-bounces@xxxxxxxxxxx [mailto:m2e-users-bounces@xxxxxxxxxxx] Im Auftrag von Anders Hammar
Gesendet: Donnerstag, 28. Februar 2013 12:22
An: Maven Integration for Eclipse users mailing list
Betreff: Re: [m2e-users] Eclipse standard m2e Maven task "generate-sources" | Custom bound plug-ins (here: "wsimport" of "jax-ws")

 

Right, the problem is that you have the jax-ws plugin declared in the pluginManagement section. To get a binding to a phase it should be in build/plugins.
Performing a Maven build from CLI wouldn't work either, so I suspect that you're not doing the standard "mvn install"?

/Anders

 

On Thu, Feb 28, 2013 at 9:44 AM, King Holger (CI/AFP2) <Holger.King@xxxxxxxxxxxx> wrote:

Hi Anders,

 

when taking a look in the Eclipse-UI in the project properties under “Maven” -> “Lifecyle Mapping” (having checked the “Show lifecycle phases” checkbox and disabled “Show ignored executions”), I see the following content:

 

process-ressources

resources:resources     execute            default

 

compile

compiler:compile          configurator,configurator          extension

 

process-test-resources

resources:testResources          execute            default

 

test-compile

compiler:testCompile    configurator,configurator          extension

 

 

To my understanding this file shows the mapping between the Eclipse build lifecycle (runtime/incremental) and its bound Maven plugins. Currently, it does not contain the “jax-ws” plugin respectively its goal “wsimport”.

 

Additionally, you get – as you requested the complete Maven POM “pom.xml” file:

 

<?xml version="1.0" encoding="UTF-8"?>

<!--  the POM file is the source for Eclipse project configurations. Its values

      are setting up the Eclipse project, like used JRE/JDK version, project

      facets, builders, etc. -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

       <modelVersion>4.0.0</modelVersion>

       <groupId>com.bosch.bgn</groupId>

       <artifactId>FirstSpiritWeb</artifactId>

       <name>FirstSpiritWeb</name>

       <!-- if no packaging is named it will default to "jar", where each packaging

            type contains a list of goals to bind to a particular build phase -->

       <packaging>war</packaging>

       <licenses>

             <license>

                    <name>Bosch Corporate License</name>

                    <url>http://www.bosch.com</url>

                    <distribution>repo</distribution>

                    <comments>A Bosch corporate license</comments>

             </license>

       </licenses>

       <organization>

             <name>Robert Bosch GmbH</name>

             <url>http://www.bosch.com</url>

       </organization>

       <developers>

             <developer>

                    <id>kih1fe</id>

                    <name>Holger King</name>

                    <email>Holger.King@de.bosch.com</email>

                    <url>http://www.bosch.com</url>

                    <organization>Robert Bosch GmbH</organization>

                    <organizationUrl>http://www.bosch.com</organizationUrl>

             </developer>

       </developers>

       <version>1.0.0-BUILD-SNAPSHOT</version>

       <properties>

             <!-- to prevent encoding warnings during a maven run -->

             <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

             <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

             <org.springframework-version>3.1.1.RELEASE</org.springframework-version>

             <org.aspectj-version>1.6.10</org.aspectj-version>

             <org.slf4j-version>1.6.6</org.slf4j-version>

       </properties>

       <dependencies>

             <!-- FirstSpirit -->

             <dependency>

                    <!-- scope sets how the dependency is handled in the package -->

                    <groupId>de.espirit.firstspirit</groupId>

                    <artifactId>fs-webrt</artifactId>

                    <version>4.2.476</version>

                    <scope>provided</scope>

             </dependency>

             <dependency>

                    <groupId>de.espirit.firstspirit</groupId>

                    <artifactId>fs-access</artifactId>

                    <version>4.2.476</version>

                    <scope>provided</scope>

             </dependency>

             <dependency>

                    <groupId>firstspirit.personalisation</groupId>

                    <artifactId>FIRSTpersonalisation</artifactId>

                    <version>2.0.20</version>

                    <scope>compile</scope>

             </dependency>

            

             <!-- Spring -->

             <dependency>

                    <groupId>org.springframework</groupId>

                    <artifactId>spring-context</artifactId>

                    <version>${org.springframework-version}</version>

                    <exclusions>

                           <!-- Exclude Commons Logging in favor of SLF4j -->

                           <exclusion>

                                  <groupId>commons-logging</groupId>

                                  <artifactId>commons-logging</artifactId>

                           </exclusion>

                    </exclusions>

             </dependency>

             <dependency>

                    <groupId>org.springframework</groupId>

                    <artifactId>spring-webmvc</artifactId>

                    <version>${org.springframework-version}</version>

             </dependency>

                          

             <!-- AspectJ -->

             <dependency>

                    <groupId>org.aspectj</groupId>

                    <artifactId>aspectjrt</artifactId>

                    <version>${org.aspectj-version}</version>

             </dependency>

            

             <!-- Logging -->

             <dependency>

                    <groupId>org.slf4j</groupId>

                    <artifactId>slf4j-api</artifactId>

                    <version>1.7.2</version>

             </dependency>

             <dependency>

                    <groupId>org.slf4j</groupId>

                    <artifactId>jcl-over-slf4j</artifactId>

                    <version>${org.slf4j-version}</version>

                    <scope>runtime</scope>

             </dependency>

             <dependency>

                    <groupId>org.slf4j</groupId>

                    <artifactId>slf4j-log4j12</artifactId>

                    <version>${org.slf4j-version}</version>

                    <scope>runtime</scope>

             </dependency>

             <dependency>

                    <groupId>log4j</groupId>

                    <artifactId>log4j</artifactId>

                    <version>1.2.15</version>

                    <exclusions>

                           <exclusion>

                                  <groupId>javax.mail</groupId>

                                  <artifactId>mail</artifactId>

                           </exclusion>

                           <exclusion>

                                  <groupId>javax.jms</groupId>

                                  <artifactId>jms</artifactId>

                           </exclusion>

                           <exclusion>

                                  <groupId>com.sun.jdmk</groupId>

                                  <artifactId>jmxtools</artifactId>

                           </exclusion>

                           <exclusion>

                                  <groupId>com.sun.jmx</groupId>

                                  <artifactId>jmxri</artifactId>

                           </exclusion>

                    </exclusions>

                    <scope>runtime</scope>

             </dependency>

 

             <!-- @Inject -->

             <dependency>

                    <groupId>javax.inject</groupId>

                    <artifactId>javax.inject</artifactId>

                    <version>1</version>

             </dependency>

                          

             <!-- Servlet -->

             <dependency>

                    <groupId>javax.servlet</groupId>

                    <artifactId>servlet-api</artifactId>

                    <version>2.5</version>

                    <scope>provided</scope>

             </dependency>

             <dependency>

                    <groupId>javax.servlet.jsp</groupId>

                    <artifactId>jsp-api</artifactId>

                    <version>2.1</version>

                    <scope>provided</scope>

             </dependency>

             <dependency>

                    <groupId>javax.servlet</groupId>

                    <artifactId>jstl</artifactId>

                    <version>1.2</version>

             </dependency>

      

             <!-- Test -->

             <dependency>

                    <groupId>junit</groupId>

                    <artifactId>junit</artifactId>

                    <version>4.7</version>

                    <scope>test</scope>

             </dependency>

            

             <!-- JAX-WS -->

             <dependency>

                    <groupId>com.sun.xml.ws</groupId>

                    <artifactId>jaxws-rt</artifactId>

                    <version>2.2.7</version>

                    <scope>compile</scope>

             </dependency>

             <dependency>

                    <groupId>org.slf4j</groupId>

                    <artifactId>slf4j-simple</artifactId>

                    <version>1.7.2</version>

             </dependency>

       </dependencies>

    <build>

       <finalName>FirstSpiritWeb</finalName>

       <defaultGoal>compile</defaultGoal>

       <sourceDirectory>src/main/java</sourceDirectory>

       <testSourceDirectory>src/test/java</testSourceDirectory>

       <outputDirectory>target/main</outputDirectory>

       <testOutputDirectory>target/test</testOutputDirectory>

       <pluginManagement>

               <!-- plugins are artifacts that provide goals for Maven. Where a

                    plugin may have one or more goals. These goals can be bound to

                    Maven build lifecycles phases. -->

               <plugins>

                   <plugin>

                       <artifactId>maven-eclipse-plugin</artifactId>

                       <version>2.9</version>

                       <configuration>

                           <additionalProjectnatures>

                               <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>

                           </additionalProjectnatures>

                           <additionalBuildcommands>

                               <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>

                           </additionalBuildcommands>

                           <downloadSources>true</downloadSources>

                           <downloadJavadocs>true</downloadJavadocs>

                       </configuration>

                   </plugin>

                   <plugin>

                       <groupId>org.apache.maven.plugins</groupId>

                       <artifactId>maven-compiler-plugin</artifactId>

                       <version>2.5.1</version>

                       <configuration>

                           <source>1.6</source>

                           <!-- this verion also controls the used Eclipse Java

                                version when running "Maven" -> "Update project".

                                It changes the "JRE System Library" version within

                                the "Package Explorer" -->

                           <target>1.7</target>

                           <compilerArgument>-Xlint:all</compilerArgument>

                           <showWarnings>true</showWarnings>

                           <showDeprecation>true</showDeprecation>

                       </configuration>

                   </plugin>

                   <plugin>

                       <groupId>org.codehaus.mojo</groupId>

                       <artifactId>exec-maven-plugin</artifactId>

                       <version>1.2.1</version>

                       <configuration>

                           <mainClass>org.test.int1.Main</mainClass>

                       </configuration>

                   </plugin>

                   <plugin>

                   <groupId>org.apache.maven.plugins</groupId>

                   <artifactId>maven-war-plugin</artifactId>

                   <version>2.2</version>

                   </plugin>

                   <!-- JAX-WS does not support RPC/ENC based WSDL files, details

                     see: http://java.net/projects/metro/lists/users/archive/2007-01/message/79 -->

                   <plugin>

                   <!-- the plug-in can be called via the configured alias

                        "goalPrefix" mentioned in the plugin descriptor of the

                        plugin -->

                                  <groupId>org.jvnet.jax-ws-commons</groupId>

                                  <artifactId>jaxws-maven-plugin</artifactId>

                                  <version>2.2</version>

                                  <executions>

                                        <execution>

                                               <!-- binds the plug-in goal to the Maven lifecycle

                                                    phase. A plug-in can offer a default binding

                                                    to the lifecycle phase. Details can be found

                                                    in the "plug.xml" descriptor file of the

                                                    plug-in. For this plug-in its default phase is:

                                                    "generate-sources" -->

                                               <phase>generate-sources</phase>

                                               <!-- To identify which plugins is bound to which

                                                    phase, use the "help" plugin in combination

                                                    with goal "effective-pom" -->

                                               <goals>

                                                      <!-- goals are tasks within build phases and can

                                                           be bound to them -->

                                                      <goal>wsimport</goal>

                                               </goals>

                                        </execution>

                                  </executions>

                                  <configuration>

                                        <destDir>${project.build.directory}</destDir>

                                        <implDestDir>${project.build.sourceDirectory}</implDestDir>

                                        <keep>true</keep>

                                        <wsdlFiles>

                                               <wsdlFile>UserInfoService_DOC_LIT.wsdl</wsdlFile>

                                        </wsdlFiles>

                                        <packageName>com.bosch.personalisation</packageName>

                                        <verbose>true</verbose>                                    

                                  </configuration>

                                 

                                  <!-- if you want to use a specific version of JAX-WS, you can do so like this -->

                                  <dependencies>

                                        <dependency>

                                               <groupId>com.sun.xml.ws</groupId>

                                               <artifactId>jaxws-tools</artifactId>

                                               <version>2.2.7</version>

                                               <exclusions>

                                                      <exclusion>

                                                            <groupId>org.jvnet.staxex</groupId>

                                                            <artifactId>stax-ex</artifactId>

                                                      </exclusion>

                                               </exclusions>

                                        </dependency>

                                        <dependency>

                                               <groupId>org.jvnet.staxex</groupId>

                                               <artifactId>stax-ex</artifactId>

                                               <version>1.7.1</version>

                                               <exclusions>

                                                 <exclusion>

                                                   <groupId>javax.xml.stream</groupId>

                                                   <artifactId>stax-api</artifactId>

                                                 </exclusion>

                                               </exclusions>

                                        </dependency>

                                  </dependencies>

                           </plugin>

               </plugins>

             </pluginManagement>

    </build>

</project>

 

 

 

Von: m2e-users-bounces@xxxxxxxxxxx [mailto:m2e-users-bounces@xxxxxxxxxxx] Im Auftrag von Anders Hammar
Gesendet: Do
nnerstag, 28. Februar 2013 09:02
An: Maven Integration for Eclipse users mailing list
Betreff: Re: [m2e-users] Eclipse standard m2e Maven task "generate-sources" | Custom bound plug-ins (here: "wsimport" of "jax-ws")

 

 

the Maven->Lifecycle Mapping has been verified. Indeed, the execution of the JAX-WS plugin is NOT listed there for the phase “generate-sources”. My question: how to modify it? Within Eclipse it seems not to be possible to do it directly in the GUI frontend. Right? Has it to be edited externally within a text editor?

 

You need to edit the pom. It controls this. You initial pom xml snippet looked ok (although it lacks the id element), but I would need to see the complete pom. Actually, what Maven uses is the "effective POM" which should be verified.

Btw, as the plugin IS executed when you execute Maven, could you look in the UI to which phase it is bound?

 

 

Additionally, my understanding up to now: this lifecycle mapping does not concern the Maven lifecycle – does it? Is this file (see: Window -> Preferences -> Maven -> Lifecycle Mappings) just available for the Eclipse IDE to take care of the lifecycle mappings although they are available within the POM file?

 

There are two mappings. When talking about phases and the problem you're having we're talking about bindings between a plugin the a phase in the Maven build lifecycle. Then there may also be abinding between the execution of a plugin and the Eclipse build (runtime/incremental) lifecycle. That it not your problem here so I rather not bring that complicated topic into the discussion.

/Anders

 

The current file shows the content being attached.

 

Kind regards,

Holger

 

Von: m2e-users-bounces@xxxxxxxxxxx [mailto:m2e-users-bounces@xxxxxxxxxxx] Im Auftrag von Anders Hammar
Gesendet: Donnerstag, 28. Februar 2013 08:23
An: Maven Integration for Eclipse users mailing list
Betreff: Re: [m2e-users] Eclipse standard m2e Maven task "generate-sources" | Custom bound plug-ins (here: "wsimport" of "jax-ws")

 

Strange. I tested a project of mine which has the modello plugin bound to that phase and it works as expected. Could you right-click on your project, select Properties, then select Maven->Lifecycle Mapping. Be sure to check "Show lifecycle phases". Is the execution of the jax-ws plugin listed for the generate-sources phase?

For anyone to reproduce you will need to create a simple test project. It can later also be used to verify if this is in fact a bug in m2e.

 

/Anders

 

On Thu, Feb 28, 2013 at 8:17 AM, King Holger (CI/AFP2) <Holger.King@xxxxxxxxxxxx> wrote:

Dear m2e community,

I'm just using:
- Eclipse Juno 4.2
- Eclipse m2e 1.3.1
- Maven 3.xx

having a typical JAX-WS Maven plug-in mentioned in my POM whose default goal "wsimport" by default is assigned to the Maven "generate-sources" lifecycle phase (see: https://repository.sonatype.org/service/local/repositories/central-proxy/archive/org/jvnet/jax-ws-commons/jaxws-maven-plugin/2.2/jaxws-maven-plugin-2.2.jar/!/META-INF/maven/plugin.xml):

...
<plugin>
            <!-- the plug-in can be called via the configured alias
                  "goalPrefix" mentioned in the plugin descriptor of the
                  plugin -->
            <groupId>org.jvnet.jax-ws-commons</groupId>
            <artifactId>jaxws-maven-plugin</artifactId>
            <version>2.2</version>
            <executions>
                        <execution>
                                   <phase>generate-sources</phase>
                                   <goals>
                                               <goal>wsimport</goal>
                                   </goals>
                        </execution>
            </executions>
...
</plugin>
...

The problem: although this plug-in is bound to lifecycle phase "generate-sources", it's not taken into account when starting the m2e run task "Maven generate-sources" via:
- right-click on Eclipse project
- choose "Run as"
- select "9 Maven generate-sources"

This run is provided by default when installing m2e via the SpringSource tool suite.

I only get the following log output:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building FirstSpiritWeb 1.0.0-BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.142s
[INFO] Finished at: Mon Feb 25 19:41:58 CET 2013
[INFO] Final Memory: 1M/15M
[INFO] ------------------------------------------------------------------------

When creating a custom run configuration, the plug-in is executed completely successfully. Any idea why that happens and how to solve?

Kind regards,
Holger

_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users

 


_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users

 


_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users

 


_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users

 


_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users

 


_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users

 


Back to the top