-
Notifications
You must be signed in to change notification settings - Fork 17
Home
This site provides some custom extensions for the m2e Maven-Eclipse Integration. Currently available:
- JAXB extension
From your Eclipse menu bar, select Help | Install New Software... and enter this update site URL in the Work with field:
https://github.com/hwellmann/m2eclipse-extras/raw/master/p2/
Select the Omadac m2e Extensions category and the features you require.
Installation via the Discovery process under Window | Preferences | Maven is not yet supported.
The m2e extension for JAXB supports the maven-jaxb2-plugin, which is typically configured in the POM of your project like this:
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.7.4</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<extension>true</extension>
<schemaIncludes>
<include>xsd/whizbang.xsd</include>
</schemaIncludes>
</configuration>
</plugin>
There are two optional configuration elements schemaDirectory
and generateDirectory
specifying the directories for your input schemas and for the JAXB classes to be generated by xjc.
The default values are:
- schemaDirectory: src/main/resources
- generateDirectory: target/generated-sources/xjc
The m2e JAXB extension automatically adds the generateDirectory
source folder to your Eclipse project. It automatically runs xjc via the maven-jaxb2-plugin
whenever you modify any resources in schemaDirectory
.
This repository is a fork of Sonatype's official m2eclipse-extras repository. The Sonatype sources are still left in trunk for reference and as a basis for further extensions. All custom plugins and features have a name prefix of org.omadac
.
The top-level aggregator POM only builds the org.omadac
modules.