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")

 

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



Back to the top