Skip to content

Commit

Permalink
Add an Eclipse-specific profile to help with annotation processing
Browse files Browse the repository at this point in the history
Eclipse does not execute annotation processors as part of the build, in
particular not as part of the incremental build. However, scijava-common's
annotation processor is quite able to run as part of the incremental
build.

Let's use pom-scijava to auto-activate the newly introduced goal of the
scijava-maven-plugin to beat Eclipse into submission, so that we can work
around Eclipse's failure to abide by the Java specification (that
*mandates* running all annotation processors available on the class path
*unless* turned off explicitly).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Aug 21, 2014
1 parent 772dd61 commit e68cb0f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,33 @@ Projects wishing to use pom-scijava as a parent project need to override the &lt
</repository>
</distributionManagement>
</profile>

<!-- This profile helps Eclipse parse SciJava annotations of imported projects. -->
<profile>
<id>only-eclipse</id>
<activation>
<property>
<name>m2e.version</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.scijava</groupId>
<artifactId>scijava-maven-plugin</artifactId>
<version>${scijava-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>eclipse-helper</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>

0 comments on commit e68cb0f

Please sign in to comment.