Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] generate-sources

Hi,

> Generally, code generation requires explicit support from one of
> installed m2e extensions. There is currently support for modello and
> antlr/antlr3 available from m2e-extras update site.
> 
> To make this work in m2e 0.12.x, you need to configure what we call
> "custom lifecycle mapping" and you can find few examples in [1] and [2].
> 
> In m2e 0.13.x, code generation is expected to work without any
> configuration in pom.xml or at least you should get clear error message
> what additional m2e extensions are required.

In my pom.xml I'm using the axistools-maven-plugin to generate Java code 
from a WSDL:

<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>axistools-maven-plugin</artifactId>
        <version>1.4</version>
        <executions>
                <execution>
                        <id>create-java-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                                <goal>wsdl2java</goal>
                        </goals>
                        <configuration>
                                <wrapArrays>false</wrapArrays>
 <typeMappingVersion>1.2</typeMappingVersion>
                        </configuration>
                </execution>
        </executions>
        <dependencies>
                <dependency>
                        <groupId>javax.mail</groupId>
                        <artifactId>mail</artifactId>
                        <version>1.4.1</version>
                </dependency>
                <dependency>
                        <groupId>javax.activation</groupId>
                        <artifactId>activation</artifactId>
                        <version>1.1</version>
                </dependency>
        </dependencies>
</plugin>


The code gets generated in the folder 
target/generated-sources/axistools/wsdl2java. Works nice, both from the 
command-line and from within Eclipse. AFAIR the only thing I had to do 
only once after adding the plugin was to right-click on the project and 
then select Maven -> Update Project Configuration.

I don't see why it's necessary to create a custom lifecyle mapping, at 
least for axistools-m-p...?


Regards

Thorsten


Back to the top