Permalink
Browse files

issue #4 : add support for maven-processor-plugin

A complete refactoring was undertaken to provide support for
org.bsc.maven:maven-processor-plugin :

- all classes were moved to an internal package as we can not guarantee a
  public API at this point.
- plugin dependencies are added to the factory path
- compile AND runtime dependencies are searched for / added to the factory
  path
- java nature is added if missing, as the APT configuration is triggered
  before the Java one, it needs to work with a Java project.
- unused code was removed (mostly marker management).

Signed-off-by: Fred Bricon <fbricon@gmail.com>
  • Loading branch information...
fbricon committed Apr 23, 2012
1 parent ff70274 commit 3c6bf77be327b9342d50199f22a57899095f2ca5
Showing with 1,195 additions and 266 deletions.
  1. +4 −1 org.jboss.tools.maven.apt.core/.settings/org.eclipse.jdt.core.prefs
  2. +54 −2 org.jboss.tools.maven.apt.core/.settings/org.eclipse.jdt.ui.prefs
  3. +1 −2 org.jboss.tools.maven.apt.core/META-INF/MANIFEST.MF
  4. +18 −2 org.jboss.tools.maven.apt.core/lifecycle-mapping-metadata.xml
  5. +10 −3 org.jboss.tools.maven.apt.core/plugin.xml
  6. +151 −248 ...boss/tools/maven/apt/{AptProjectConfigurator.java → internal/AbstractAptProjectConfigurator.java}
  7. +31 −0 ...tools.maven.apt.core/src/org/jboss/tools/maven/apt/internal/AnnotationProcessorConfiguration.java
  8. +1 −1 ...ss.tools.maven.apt.core/src/org/jboss/tools/maven/apt/{ → internal}/AnnotationServiceLocator.java
  9. +81 −0 ...aven.apt.core/src/org/jboss/tools/maven/apt/internal/DefaultAnnotationProcessorConfiguration.java
  10. +86 −0 ...ls.maven.apt.core/src/org/jboss/tools/maven/apt/internal/MavenCompilerAptProjectConfigurator.java
  11. +2 −2 org.jboss.tools.maven.apt.core/src/org/jboss/tools/maven/apt/{ → internal}/MavenJdtAptPlugin.java
  12. +64 −0 ...s.maven.apt.core/src/org/jboss/tools/maven/apt/internal/MavenProcessorAptProjectConfigurator.java
  13. +106 −0 org.jboss.tools.maven.apt.core/src/org/jboss/tools/maven/apt/internal/PluginDependencyResolver.java
  14. +74 −0 org.jboss.tools.maven.apt.tests/.settings/org.eclipse.jdt.core.prefs
  15. +56 −0 org.jboss.tools.maven.apt.tests/.settings/org.eclipse.jdt.ui.prefs
  16. +3 −0 org.jboss.tools.maven.apt.tests/.settings/org.hibernate.eclipse.console.prefs
  17. +53 −0 org.jboss.tools.maven.apt.tests/projects/eclipselink/pom.xml
  18. +28 −0 org.jboss.tools.maven.apt.tests/projects/eclipselink/src/main/java/foo/bar/Dummy.java
  19. +8 −0 org.jboss.tools.maven.apt.tests/projects/eclipselink/src/main/java/foo/bar/DummyStuff.java
  20. +5 −0 org.jboss.tools.maven.apt.tests/projects/eclipselink/src/main/resources/META-INF/persistence.xml
  21. +34 −0 org.jboss.tools.maven.apt.tests/projects/p2/pom.xml
  22. +18 −0 org.jboss.tools.maven.apt.tests/projects/p2/src/main/java/foo/bar/Dummy.java
  23. +8 −0 org.jboss.tools.maven.apt.tests/projects/p2/src/main/java/foo/bar/DummyStuff.java
  24. +51 −0 org.jboss.tools.maven.apt.tests/projects/p3/pom.xml
  25. +18 −0 org.jboss.tools.maven.apt.tests/projects/p3/src/main/java/foo/bar/Dummy.java
  26. +8 −0 org.jboss.tools.maven.apt.tests/projects/p3/src/main/java/foo/bar/DummyStuff.java
  27. +34 −0 org.jboss.tools.maven.apt.tests/projects/p4/pom.xml
  28. +18 −0 org.jboss.tools.maven.apt.tests/projects/p4/src/main/java/foo/bar/Dummy.java
  29. +8 −0 org.jboss.tools.maven.apt.tests/projects/p4/src/main/java/foo/bar/DummyStuff.java
  30. +35 −0 org.jboss.tools.maven.apt.tests/projects/p5/pom.xml
  31. +18 −0 org.jboss.tools.maven.apt.tests/projects/p5/src/main/java/foo/bar/Dummy.java
  32. +8 −0 org.jboss.tools.maven.apt.tests/projects/p5/src/main/java/foo/bar/DummyStuff.java
  33. +101 −5 ...boss.tools.maven.apt.tests/src/org/jboss/tools/maven/apt/tests/M2eAptProjectconfiguratorTest.java
@@ -1,4 +1,3 @@
-#Thu Jul 07 08:59:26 MST 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.builder.cleanOutputFolder=clean
org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -76,13 +75,17 @@ org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warnin
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -4,7 +4,6 @@ Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.jboss.tools.maven.apt.core;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Localization: plugin
-Export-Package: org.jboss.tools.maven.apt
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.jdt.core,
@@ -15,7 +14,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.m2e.maven.runtime,
org.slf4j.api;bundle-version="1.6.1"
Eclipse-LazyStart: true
-Bundle-Activator: org.jboss.tools.maven.apt.MavenJdtAptPlugin
+Bundle-Activator: org.jboss.tools.maven.apt.internal.MavenJdtAptPlugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5,
JavaSE-1.6
Bundle-Vendor: %Bundle-Vendor
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
-
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
@@ -17,7 +16,24 @@
</pluginExecutionFilter>
<action>
<configurator>
- <id>org.jboss.tools.maven.apt.AptProjectConfigurator</id>
+ <id>org.jboss.tools.maven.apt.MavenCompilerAptProjectConfigurator</id>
+ </configurator>
+ </action>
+ </pluginExecution>
+
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.bsc.maven</groupId>
+ <artifactId>maven-processor-plugin</artifactId>
+ <versionRange>[1.3.0,)</versionRange>
+ <goals>
+ <goal>process</goal>
+ <goal>process-test</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <configurator>
+ <id>org.jboss.tools.maven.apt.MavenProcessorAptProjectConfigurator</id>
</configurator>
</action>
</pluginExecution>
@@ -11,11 +11,18 @@
<extension
point="org.eclipse.m2e.core.projectConfigurators">
<configurator
- class="org.jboss.tools.maven.apt.AptProjectConfigurator"
- id="org.jboss.tools.maven.apt.AptProjectConfigurator"
- name="%configurator.jdt.apt.name"
+ class="org.jboss.tools.maven.apt.internal.MavenCompilerAptProjectConfigurator"
+ id="org.jboss.tools.maven.apt.MavenCompilerAptProjectConfigurator"
+ name="%configurator.jdt.apt.name compiler"
secondaryTo="org.eclipse.m2e.jdt.javaConfigurator">
</configurator>
+
+ <configurator
+ class="org.jboss.tools.maven.apt.internal.MavenProcessorAptProjectConfigurator"
+ id="org.jboss.tools.maven.apt.MavenProcessorAptProjectConfigurator"
+ name="%configurator.jdt.apt.name processor"
+ >
+ </configurator>
</extension>
<extension
point="org.eclipse.m2e.core.lifecycleMappingMetadataSource">
Oops, something went wrong.

0 comments on commit 3c6bf77

Please sign in to comment.