Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Annotations Processing Contribution

Note while doing some more digging I found a more concise way to do the annotation processor config: http://planet.jboss.org/view/post.seam?post=a_more_concise_way_to_generate_the_jpa_2_metamodel_in_maven

So even better would be to work on a m2e extension that allows the compiler and build-helper plugins to run at the correct time in eclipse. Again I'm more than happy to do this work I'm just looking for any tips or other ideas before getting started.

-Eric

On 7/8/11 9:30 PM, Eric Dalquist wrote:
I have a project that uses the hibernate-jpamodelgen library to generate code based on annotations. We had this working for our project under the old m2eclipse plugin by using the maven-processor-plugin and build-helper-maven-plugin, I've included the config below.

I'm interested in helping figure out the best way to do this and write the m2e plugin to get it working. I've looked over the source for the m2e jaxb feature that was created for this issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=350299 that gives me some ideas but before I started playing with code I was wondering if anyone here had any words of wisdom to share.

Thanks,
-Eric

<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.0.2</version>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<outputDirectory>target/generated-sources/metamodel</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>target/generated-sources/metamodel</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>

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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Back to the top