From 3ec2718dfe15dab8782c06a4027ddd353296a543 Mon Sep 17 00:00:00 2001 From: bsorrentino Date: Tue, 25 Feb 2020 21:37:03 -0600 Subject: [PATCH] issue #79 make multimodule project --- pom.xml | 302 +++++------------- processor/pom.xml | 219 +++++++++++++ .../AbstractAnnotationProcessorMojo.java | 0 .../AnnotationProcessorCompiler.java | 0 .../MainAnnotationProcessorMojo.java | 0 .../TestAnnotationProcessorMojo.java | 0 .../maven/plugin/processor/ZipFileObject.java | 0 .../src}/main/resources/COPYING.LESSER | 0 {src => processor/src}/site/apt/usage.apt | 0 {src => processor/src}/site/markdown/qa.md | 0 .../site/resources/site2/css/maven-base.css | 0 .../site/resources/site2/css/maven-theme.css | 0 .../src}/site/resources/site2/css/print.css | 0 .../src}/site/resources/site2/css/site.css | 0 .../site/resources/site2/dependencies.html | 0 .../site2/distribution-management.html | 0 .../src}/site/resources/site2/help-mojo.html | 0 .../site/resources/site2/images/close.gif | Bin .../site/resources/site2/images/collapsed.gif | Bin .../site/resources/site2/images/expanded.gif | Bin .../site/resources/site2/images/external.png | Bin .../resources/site2/images/icon_error_sml.gif | Bin .../resources/site2/images/icon_info_sml.gif | Bin .../site2/images/icon_success_sml.gif | Bin .../site2/images/icon_warning_sml.gif | Bin .../images/logos/build-by-maven-black.png | Bin .../images/logos/build-by-maven-white.png | Bin .../site2/images/logos/maven-feather.png | Bin .../site/resources/site2/images/newwindow.png | Bin .../src}/site/resources/site2/index.html | 0 .../site/resources/site2/integration.html | 0 .../site/resources/site2/issue-tracking.html | 0 .../src}/site/resources/site2/license.html | 0 .../src}/site/resources/site2/mail-lists.html | 0 .../site/resources/site2/plugin-info.html | 0 .../resources/site2/plugin-management.html | 0 .../src}/site/resources/site2/plugins.html | 0 .../site/resources/site2/process-mojo.html | 0 .../resources/site2/process-test-mojo.html | 0 .../site/resources/site2/project-info.html | 0 .../site/resources/site2/project-reports.html | 0 .../site/resources/site2/project-summary.html | 0 .../resources/site2/source-repository.html | 0 .../src}/site/resources/site2/team-list.html | 0 .../src}/site/resources/site2/usage.html | 0 {src => processor/src}/site/site.xml | 0 .../maven/plugin/processor/ProcessorTest.java | 0 test/pom.xml | 35 +- .../processor/test/TESTWikiProcessor.java | 72 +---- utils/pom.xml | 148 +++------ .../bsc/processor/BaseAbstractProcessor.java | 19 +- 51 files changed, 369 insertions(+), 426 deletions(-) create mode 100644 processor/pom.xml rename {src => processor/src}/main/java/org/bsc/maven/plugin/processor/AbstractAnnotationProcessorMojo.java (100%) rename {src => processor/src}/main/java/org/bsc/maven/plugin/processor/AnnotationProcessorCompiler.java (100%) rename {src => processor/src}/main/java/org/bsc/maven/plugin/processor/MainAnnotationProcessorMojo.java (100%) rename {src => processor/src}/main/java/org/bsc/maven/plugin/processor/TestAnnotationProcessorMojo.java (100%) rename {src => processor/src}/main/java/org/bsc/maven/plugin/processor/ZipFileObject.java (100%) rename {src => processor/src}/main/resources/COPYING.LESSER (100%) rename {src => processor/src}/site/apt/usage.apt (100%) rename {src => processor/src}/site/markdown/qa.md (100%) rename {src => processor/src}/site/resources/site2/css/maven-base.css (100%) rename {src => processor/src}/site/resources/site2/css/maven-theme.css (100%) rename {src => processor/src}/site/resources/site2/css/print.css (100%) rename {src => processor/src}/site/resources/site2/css/site.css (100%) rename {src => processor/src}/site/resources/site2/dependencies.html (100%) rename {src => processor/src}/site/resources/site2/distribution-management.html (100%) rename {src => processor/src}/site/resources/site2/help-mojo.html (100%) rename {src => processor/src}/site/resources/site2/images/close.gif (100%) rename {src => processor/src}/site/resources/site2/images/collapsed.gif (100%) rename {src => processor/src}/site/resources/site2/images/expanded.gif (100%) rename {src => processor/src}/site/resources/site2/images/external.png (100%) rename {src => processor/src}/site/resources/site2/images/icon_error_sml.gif (100%) rename {src => processor/src}/site/resources/site2/images/icon_info_sml.gif (100%) rename {src => processor/src}/site/resources/site2/images/icon_success_sml.gif (100%) rename {src => processor/src}/site/resources/site2/images/icon_warning_sml.gif (100%) rename {src => processor/src}/site/resources/site2/images/logos/build-by-maven-black.png (100%) rename {src => processor/src}/site/resources/site2/images/logos/build-by-maven-white.png (100%) rename {src => processor/src}/site/resources/site2/images/logos/maven-feather.png (100%) rename {src => processor/src}/site/resources/site2/images/newwindow.png (100%) rename {src => processor/src}/site/resources/site2/index.html (100%) rename {src => processor/src}/site/resources/site2/integration.html (100%) rename {src => processor/src}/site/resources/site2/issue-tracking.html (100%) rename {src => processor/src}/site/resources/site2/license.html (100%) rename {src => processor/src}/site/resources/site2/mail-lists.html (100%) rename {src => processor/src}/site/resources/site2/plugin-info.html (100%) rename {src => processor/src}/site/resources/site2/plugin-management.html (100%) rename {src => processor/src}/site/resources/site2/plugins.html (100%) rename {src => processor/src}/site/resources/site2/process-mojo.html (100%) rename {src => processor/src}/site/resources/site2/process-test-mojo.html (100%) rename {src => processor/src}/site/resources/site2/project-info.html (100%) rename {src => processor/src}/site/resources/site2/project-reports.html (100%) rename {src => processor/src}/site/resources/site2/project-summary.html (100%) rename {src => processor/src}/site/resources/site2/source-repository.html (100%) rename {src => processor/src}/site/resources/site2/team-list.html (100%) rename {src => processor/src}/site/resources/site2/usage.html (100%) rename {src => processor/src}/site/site.xml (100%) rename {src => processor/src}/test/java/org/bsc/maven/plugin/processor/ProcessorTest.java (100%) diff --git a/pom.xml b/pom.xml index 723399e..662deb3 100644 --- a/pom.xml +++ b/pom.xml @@ -1,10 +1,10 @@ 4.0.0 org.bsc.maven - maven-processor-plugin - maven-plugin + maven-processor-plugin-parent + pom 4.0-SNAPSHOT - MAVEN PROCESSOR PLUGIN - ${project.version} + MAVEN PROCESSOR PLUGIN :: PARENT A maven plugin to process annotation for jdk6 at compile time This plugin helps to use from maven the new annotation processing provided by JDK6 integrated in java compiler @@ -32,9 +32,6 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo. 1.9 1.9 UTF-8 - 3.5.4 - 3.6.0 - 2.8.3 sonatype-repo https://oss.sonatype.org/content/repositories/snapshots @@ -81,104 +78,49 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo. + + processor + utils + test + - - org.codehaus.plexus - plexus-compiler-api - ${plexus.compiler.version} - - - org.codehaus.plexus - plexus-compiler-manager - ${plexus.compiler.version} - - - org.codehaus.plexus - plexus-compiler-javac - ${plexus.compiler.version} - compile - - - - org.apache.maven - maven-plugin-api - ${maven.plugin.version} - - - org.apache.maven - maven-core - ${maven.version} - - - - org.apache.maven.plugin-tools - maven-plugin-annotations - ${maven.plugin.version} - - - - org.codehaus.plexus - plexus-utils - 3.1.1 - - - org.codehaus.plexus - plexus-compiler-api - - - org.codehaus.plexus - plexus-compiler-manager - - - org.codehaus.plexus - plexus-compiler-javac - + junit junit - 4.11 + 4.13 test - + + + org.apache.maven.plugins - maven-plugin-plugin - ${maven.plugin.version} + maven-compiler-plugin + 3.8.1 org.apache.maven.plugins - maven-project-info-reports-plugin - 2.4 - - - - false - + maven-site-plugin + 3.8.2 - - + - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - @@ -194,149 +136,79 @@ This plugin could be considered the 'alter ego' of maven apt plugin http://mojo. - - org.apache.maven.plugins - maven-plugin-plugin - ${maven.plugin.version} - - true - - - - mojo-descriptor - - descriptor - - - - - help-goal - - helpmojo - - - - - - - - org.apache.maven.plugins - maven-site-plugin - 3.8.2 - - - - org.apache.maven.plugin-tools - maven-plugin-annotations - ${maven.plugin.version} - runtime - - - - org.apache.maven.reporting - maven-reporting-exec - 1.4 - - - - org.apache.maven.doxia - doxia-module-markdown - 1.9.1 - - - - - - - - - - release - - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.3 - - - - sign-artifacts - verify - - sign - - - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.5.1 - true - - sonatype-server - https://oss.sonatype.org/ - - - - - - - - - report - - - - - - com.github.github - site-maven-plugin - 0.10 - - Creating site for ${project.version} - github - maven-annotation-plugin - bsorrentino - - - - - site - - site - - - - - - - - - - - + + + release + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-no-snapshots + + enforce + + verify + + + + No Snapshots Allowed! + + + true + + + + + + + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + --pinentry-mode + loopback + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.5.1 + true + + sonatype-server + https://oss.sonatype.org/ + + + + + + + diff --git a/processor/pom.xml b/processor/pom.xml new file mode 100644 index 0000000..b43e573 --- /dev/null +++ b/processor/pom.xml @@ -0,0 +1,219 @@ + + 4.0.0 + maven-processor-plugin + maven-plugin + MAVEN PROCESSOR PLUGIN + A maven plugin to process annotation for jdk6 at compile time + +This plugin helps to use from maven the new annotation processing provided by JDK6 integrated in java compiler + +This plugin could be considered the 'alter ego' of maven apt plugin http://mojo.codehaus.org/apt-maven-plugin/ + https://github.com/bsorrentino/maven-annotation-plugin + + + org.bsc.maven + maven-processor-plugin-parent + 4.0-SNAPSHOT + + + + 3.5.4 + 3.6.0 + 2.8.3 + + + + + + org.codehaus.plexus + plexus-compiler-api + ${plexus.compiler.version} + + + org.codehaus.plexus + plexus-compiler-manager + ${plexus.compiler.version} + + + org.codehaus.plexus + plexus-compiler-javac + ${plexus.compiler.version} + compile + + + + + + + org.apache.maven + maven-plugin-api + ${maven.plugin.version} + + + org.apache.maven + maven-core + ${maven.version} + + + + + org.apache.maven.plugin-tools + maven-plugin-annotations + ${maven.plugin.version} + + + + org.codehaus.plexus + plexus-utils + 3.1.1 + + + org.codehaus.plexus + plexus-compiler-api + + + org.codehaus.plexus + plexus-compiler-manager + + + org.codehaus.plexus + plexus-compiler-javac + + + + + + + + org.apache.maven.plugins + maven-plugin-plugin + ${maven.plugin.version} + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.4 + + + + false + + + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + org.apache.maven.plugins + maven-plugin-plugin + ${maven.plugin.version} + + true + + + + mojo-descriptor + + descriptor + + + + + help-goal + + helpmojo + + + + + + + + org.apache.maven.plugins + maven-site-plugin + + + + org.apache.maven.plugin-tools + maven-plugin-annotations + ${maven.plugin.version} + runtime + + + + org.apache.maven.reporting + maven-reporting-exec + 1.4 + + + + org.apache.maven.doxia + doxia-module-markdown + 1.9.1 + + + + + + + + + + + + + + + report + + + + + + com.github.github + site-maven-plugin + 0.10 + + Creating site for ${project.version} + github + maven-annotation-plugin + bsorrentino + + + + + site + + site + + + + + + + + + + + + + diff --git a/src/main/java/org/bsc/maven/plugin/processor/AbstractAnnotationProcessorMojo.java b/processor/src/main/java/org/bsc/maven/plugin/processor/AbstractAnnotationProcessorMojo.java similarity index 100% rename from src/main/java/org/bsc/maven/plugin/processor/AbstractAnnotationProcessorMojo.java rename to processor/src/main/java/org/bsc/maven/plugin/processor/AbstractAnnotationProcessorMojo.java diff --git a/src/main/java/org/bsc/maven/plugin/processor/AnnotationProcessorCompiler.java b/processor/src/main/java/org/bsc/maven/plugin/processor/AnnotationProcessorCompiler.java similarity index 100% rename from src/main/java/org/bsc/maven/plugin/processor/AnnotationProcessorCompiler.java rename to processor/src/main/java/org/bsc/maven/plugin/processor/AnnotationProcessorCompiler.java diff --git a/src/main/java/org/bsc/maven/plugin/processor/MainAnnotationProcessorMojo.java b/processor/src/main/java/org/bsc/maven/plugin/processor/MainAnnotationProcessorMojo.java similarity index 100% rename from src/main/java/org/bsc/maven/plugin/processor/MainAnnotationProcessorMojo.java rename to processor/src/main/java/org/bsc/maven/plugin/processor/MainAnnotationProcessorMojo.java diff --git a/src/main/java/org/bsc/maven/plugin/processor/TestAnnotationProcessorMojo.java b/processor/src/main/java/org/bsc/maven/plugin/processor/TestAnnotationProcessorMojo.java similarity index 100% rename from src/main/java/org/bsc/maven/plugin/processor/TestAnnotationProcessorMojo.java rename to processor/src/main/java/org/bsc/maven/plugin/processor/TestAnnotationProcessorMojo.java diff --git a/src/main/java/org/bsc/maven/plugin/processor/ZipFileObject.java b/processor/src/main/java/org/bsc/maven/plugin/processor/ZipFileObject.java similarity index 100% rename from src/main/java/org/bsc/maven/plugin/processor/ZipFileObject.java rename to processor/src/main/java/org/bsc/maven/plugin/processor/ZipFileObject.java diff --git a/src/main/resources/COPYING.LESSER b/processor/src/main/resources/COPYING.LESSER similarity index 100% rename from src/main/resources/COPYING.LESSER rename to processor/src/main/resources/COPYING.LESSER diff --git a/src/site/apt/usage.apt b/processor/src/site/apt/usage.apt similarity index 100% rename from src/site/apt/usage.apt rename to processor/src/site/apt/usage.apt diff --git a/src/site/markdown/qa.md b/processor/src/site/markdown/qa.md similarity index 100% rename from src/site/markdown/qa.md rename to processor/src/site/markdown/qa.md diff --git a/src/site/resources/site2/css/maven-base.css b/processor/src/site/resources/site2/css/maven-base.css similarity index 100% rename from src/site/resources/site2/css/maven-base.css rename to processor/src/site/resources/site2/css/maven-base.css diff --git a/src/site/resources/site2/css/maven-theme.css b/processor/src/site/resources/site2/css/maven-theme.css similarity index 100% rename from src/site/resources/site2/css/maven-theme.css rename to processor/src/site/resources/site2/css/maven-theme.css diff --git a/src/site/resources/site2/css/print.css b/processor/src/site/resources/site2/css/print.css similarity index 100% rename from src/site/resources/site2/css/print.css rename to processor/src/site/resources/site2/css/print.css diff --git a/src/site/resources/site2/css/site.css b/processor/src/site/resources/site2/css/site.css similarity index 100% rename from src/site/resources/site2/css/site.css rename to processor/src/site/resources/site2/css/site.css diff --git a/src/site/resources/site2/dependencies.html b/processor/src/site/resources/site2/dependencies.html similarity index 100% rename from src/site/resources/site2/dependencies.html rename to processor/src/site/resources/site2/dependencies.html diff --git a/src/site/resources/site2/distribution-management.html b/processor/src/site/resources/site2/distribution-management.html similarity index 100% rename from src/site/resources/site2/distribution-management.html rename to processor/src/site/resources/site2/distribution-management.html diff --git a/src/site/resources/site2/help-mojo.html b/processor/src/site/resources/site2/help-mojo.html similarity index 100% rename from src/site/resources/site2/help-mojo.html rename to processor/src/site/resources/site2/help-mojo.html diff --git a/src/site/resources/site2/images/close.gif b/processor/src/site/resources/site2/images/close.gif similarity index 100% rename from src/site/resources/site2/images/close.gif rename to processor/src/site/resources/site2/images/close.gif diff --git a/src/site/resources/site2/images/collapsed.gif b/processor/src/site/resources/site2/images/collapsed.gif similarity index 100% rename from src/site/resources/site2/images/collapsed.gif rename to processor/src/site/resources/site2/images/collapsed.gif diff --git a/src/site/resources/site2/images/expanded.gif b/processor/src/site/resources/site2/images/expanded.gif similarity index 100% rename from src/site/resources/site2/images/expanded.gif rename to processor/src/site/resources/site2/images/expanded.gif diff --git a/src/site/resources/site2/images/external.png b/processor/src/site/resources/site2/images/external.png similarity index 100% rename from src/site/resources/site2/images/external.png rename to processor/src/site/resources/site2/images/external.png diff --git a/src/site/resources/site2/images/icon_error_sml.gif b/processor/src/site/resources/site2/images/icon_error_sml.gif similarity index 100% rename from src/site/resources/site2/images/icon_error_sml.gif rename to processor/src/site/resources/site2/images/icon_error_sml.gif diff --git a/src/site/resources/site2/images/icon_info_sml.gif b/processor/src/site/resources/site2/images/icon_info_sml.gif similarity index 100% rename from src/site/resources/site2/images/icon_info_sml.gif rename to processor/src/site/resources/site2/images/icon_info_sml.gif diff --git a/src/site/resources/site2/images/icon_success_sml.gif b/processor/src/site/resources/site2/images/icon_success_sml.gif similarity index 100% rename from src/site/resources/site2/images/icon_success_sml.gif rename to processor/src/site/resources/site2/images/icon_success_sml.gif diff --git a/src/site/resources/site2/images/icon_warning_sml.gif b/processor/src/site/resources/site2/images/icon_warning_sml.gif similarity index 100% rename from src/site/resources/site2/images/icon_warning_sml.gif rename to processor/src/site/resources/site2/images/icon_warning_sml.gif diff --git a/src/site/resources/site2/images/logos/build-by-maven-black.png b/processor/src/site/resources/site2/images/logos/build-by-maven-black.png similarity index 100% rename from src/site/resources/site2/images/logos/build-by-maven-black.png rename to processor/src/site/resources/site2/images/logos/build-by-maven-black.png diff --git a/src/site/resources/site2/images/logos/build-by-maven-white.png b/processor/src/site/resources/site2/images/logos/build-by-maven-white.png similarity index 100% rename from src/site/resources/site2/images/logos/build-by-maven-white.png rename to processor/src/site/resources/site2/images/logos/build-by-maven-white.png diff --git a/src/site/resources/site2/images/logos/maven-feather.png b/processor/src/site/resources/site2/images/logos/maven-feather.png similarity index 100% rename from src/site/resources/site2/images/logos/maven-feather.png rename to processor/src/site/resources/site2/images/logos/maven-feather.png diff --git a/src/site/resources/site2/images/newwindow.png b/processor/src/site/resources/site2/images/newwindow.png similarity index 100% rename from src/site/resources/site2/images/newwindow.png rename to processor/src/site/resources/site2/images/newwindow.png diff --git a/src/site/resources/site2/index.html b/processor/src/site/resources/site2/index.html similarity index 100% rename from src/site/resources/site2/index.html rename to processor/src/site/resources/site2/index.html diff --git a/src/site/resources/site2/integration.html b/processor/src/site/resources/site2/integration.html similarity index 100% rename from src/site/resources/site2/integration.html rename to processor/src/site/resources/site2/integration.html diff --git a/src/site/resources/site2/issue-tracking.html b/processor/src/site/resources/site2/issue-tracking.html similarity index 100% rename from src/site/resources/site2/issue-tracking.html rename to processor/src/site/resources/site2/issue-tracking.html diff --git a/src/site/resources/site2/license.html b/processor/src/site/resources/site2/license.html similarity index 100% rename from src/site/resources/site2/license.html rename to processor/src/site/resources/site2/license.html diff --git a/src/site/resources/site2/mail-lists.html b/processor/src/site/resources/site2/mail-lists.html similarity index 100% rename from src/site/resources/site2/mail-lists.html rename to processor/src/site/resources/site2/mail-lists.html diff --git a/src/site/resources/site2/plugin-info.html b/processor/src/site/resources/site2/plugin-info.html similarity index 100% rename from src/site/resources/site2/plugin-info.html rename to processor/src/site/resources/site2/plugin-info.html diff --git a/src/site/resources/site2/plugin-management.html b/processor/src/site/resources/site2/plugin-management.html similarity index 100% rename from src/site/resources/site2/plugin-management.html rename to processor/src/site/resources/site2/plugin-management.html diff --git a/src/site/resources/site2/plugins.html b/processor/src/site/resources/site2/plugins.html similarity index 100% rename from src/site/resources/site2/plugins.html rename to processor/src/site/resources/site2/plugins.html diff --git a/src/site/resources/site2/process-mojo.html b/processor/src/site/resources/site2/process-mojo.html similarity index 100% rename from src/site/resources/site2/process-mojo.html rename to processor/src/site/resources/site2/process-mojo.html diff --git a/src/site/resources/site2/process-test-mojo.html b/processor/src/site/resources/site2/process-test-mojo.html similarity index 100% rename from src/site/resources/site2/process-test-mojo.html rename to processor/src/site/resources/site2/process-test-mojo.html diff --git a/src/site/resources/site2/project-info.html b/processor/src/site/resources/site2/project-info.html similarity index 100% rename from src/site/resources/site2/project-info.html rename to processor/src/site/resources/site2/project-info.html diff --git a/src/site/resources/site2/project-reports.html b/processor/src/site/resources/site2/project-reports.html similarity index 100% rename from src/site/resources/site2/project-reports.html rename to processor/src/site/resources/site2/project-reports.html diff --git a/src/site/resources/site2/project-summary.html b/processor/src/site/resources/site2/project-summary.html similarity index 100% rename from src/site/resources/site2/project-summary.html rename to processor/src/site/resources/site2/project-summary.html diff --git a/src/site/resources/site2/source-repository.html b/processor/src/site/resources/site2/source-repository.html similarity index 100% rename from src/site/resources/site2/source-repository.html rename to processor/src/site/resources/site2/source-repository.html diff --git a/src/site/resources/site2/team-list.html b/processor/src/site/resources/site2/team-list.html similarity index 100% rename from src/site/resources/site2/team-list.html rename to processor/src/site/resources/site2/team-list.html diff --git a/src/site/resources/site2/usage.html b/processor/src/site/resources/site2/usage.html similarity index 100% rename from src/site/resources/site2/usage.html rename to processor/src/site/resources/site2/usage.html diff --git a/src/site/site.xml b/processor/src/site/site.xml similarity index 100% rename from src/site/site.xml rename to processor/src/site/site.xml diff --git a/src/test/java/org/bsc/maven/plugin/processor/ProcessorTest.java b/processor/src/test/java/org/bsc/maven/plugin/processor/ProcessorTest.java similarity index 100% rename from src/test/java/org/bsc/maven/plugin/processor/ProcessorTest.java rename to processor/src/test/java/org/bsc/maven/plugin/processor/ProcessorTest.java diff --git a/test/pom.xml b/test/pom.xml index 4f7da7a..d3242f4 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -2,35 +2,30 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - org.bsc.maven maven-processor-plugin-test - 3.3.2-SNAPSHOT jar - MAVEN PROCESSOR PLUGIN TEST- ${project.version} + MAVEN PROCESSOR PLUGIN TEST - - 1.7 - 1.7 - + + org.bsc.maven + maven-processor-plugin-parent + 4.0-SNAPSHOT + + + - - junit - junit - 4.10 - test - + + org.bsc.util + processor-utils + ${project.version} + - 2012 - - @@ -61,12 +56,13 @@ PROCESSOR PLUGIN maven-processor-plugin ${project.version} + @@ -88,7 +84,6 @@ PROCESSOR PLUGIN false org.bsc.maven.plugin.processor.test.TESTWikiProcessor - diff --git a/test/src/main/java/org/bsc/maven/plugin/processor/test/TESTWikiProcessor.java b/test/src/main/java/org/bsc/maven/plugin/processor/test/TESTWikiProcessor.java index 8d6bb26..feb4fe0 100644 --- a/test/src/main/java/org/bsc/maven/plugin/processor/test/TESTWikiProcessor.java +++ b/test/src/main/java/org/bsc/maven/plugin/processor/test/TESTWikiProcessor.java @@ -5,6 +5,8 @@ package org.bsc.maven.plugin.processor.test; +import org.bsc.processor.BaseAbstractProcessor; + import java.io.IOException; import java.util.Set; @@ -23,37 +25,11 @@ * * */ -@SupportedSourceVersion(SourceVersion.RELEASE_7) +@SupportedSourceVersion(SourceVersion.RELEASE_9) @SupportedAnnotationTypes( "*" ) //@SupportedOptions( {"subfolder", "filepath", "templateUri"}) //@SupportedAnnotationTypes( {"javax.ws.rs.GET", "javax.ws.rs.PUT", "javax.ws.rs.POST", "javax.ws.rs.DELETE"}) -public class TESTWikiProcessor extends AbstractProcessor { - - protected void info( String msg ) { - processingEnv.getMessager().printMessage(Kind.NOTE, msg ); - } - - protected void warn( String msg ) { - //logger.warning(msg); - processingEnv.getMessager().printMessage(Kind.WARNING, msg ); - } - - protected void warn( String msg, Throwable t ) { - //logger.log(Level.WARNING, msg, t ); - processingEnv.getMessager().printMessage(Kind.WARNING, msg ); - t.printStackTrace(System.err); - } - - protected void error( String msg ) { - //logger.severe(msg); - processingEnv.getMessager().printMessage(Kind.ERROR, msg ); - } - - protected void error( String msg, Throwable t ) { - //logger.log(Level.SEVERE, msg, t ); - processingEnv.getMessager().printMessage(Kind.ERROR, msg ); - t.printStackTrace(System.err); - } +public class TESTWikiProcessor extends BaseAbstractProcessor { /** * @@ -74,45 +50,7 @@ protected FileObject getResourceFormClassPath(Filer filer, final String resource return f; } - - - /** - * - * @param subfolder subfolder (e.g. confluence) - * @param filePath relative path (e.g. children/file.wiki) - * @return - * @throws IOException - */ - protected FileObject getOutputFile( Filer filer, String subfolder, String filePath ) throws IOException { - - Element e = null; - FileObject res = - filer.createResource(StandardLocation.SOURCE_OUTPUT, - subfolder, - filePath, - e); - - return res; - } - - /** - * - * @param e - * @return - * @throws ClassNotFoundException - */ - protected Class getClassFromElement( Element e ) throws ClassNotFoundException { - if( null==e ) throw new IllegalArgumentException("e is null!"); - if( ElementKind.CLASS!=e.getKind() ) throw new IllegalArgumentException( String.format("element [%s] is not a class!", e)); - - TypeElement te = (TypeElement) e; - - info( String.format("loading class [%s]", te.getQualifiedName().toString())); - - return Class.forName(te.getQualifiedName().toString()); - - } - + @Override public boolean process(Set annotations, RoundEnvironment roundEnv) { if (roundEnv.processingOver()) return false; diff --git a/utils/pom.xml b/utils/pom.xml index a3e18b4..55f84df 100644 --- a/utils/pom.xml +++ b/utils/pom.xml @@ -3,133 +3,57 @@ org.bsc.util processor-utils - 2.0.0-SNAPSHOT jar - - JAVA PROCESSOR UTILS - ${project.version} - - + JAVA PROCESSOR UTILS + Utilities for java annotation processor implementation JSR-269 + https://github.com/bsorrentino/maven-annotation-plugin/tree/master/utils + + 2013 + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + + + + + + bartolomeo.sorrentino@gmail.com + Bartolomeo Sorrentino + GMT+1 + + Owner + + + + + + org.bsc.maven + maven-processor-plugin-parent + 4.0-SNAPSHOT + + + UTF-8 - - scm:git:https://github.com/bsorrentino/maven-annotation-plugin.git - scm:git:https://github.com/bsorrentino/maven-annotation-plugin.git - https://github.com/bsorrentino/maven-annotation-plugin/tree/master/utils - - -2013 -Utilities for java annotation processor implementation JSR-269 -https://github.com/bsorrentino/maven-annotation-plugin/tree/master/utils - - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - - - - - - bartolomeo.sorrentino@gmail.com - Bartolomeo Sorrentino - GMT+1 - - Owner - - - - - - - junit - junit - 4.12 - test - + - - - + - + org.apache.maven.plugins maven-compiler-plugin - 3.0 - - 1.8 - 1.8 - - - - - - - - - ${release.repo.id} - ${release.repo.url} - - - ${snapshot.repo.id} - ${snapshot.repo.url} - false - - - + - - sonatype - - - - - maven-gpg-plugin - 1.6 - - - sign-artifacts - verify - - sign - - - - - - --pinentry-mode - loopback - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.5.1 - true - - sonatype-server - https://oss.sonatype.org/ - - - - - - - - + diff --git a/utils/src/main/java/org/bsc/processor/BaseAbstractProcessor.java b/utils/src/main/java/org/bsc/processor/BaseAbstractProcessor.java index aadd8a6..dc07fa4 100644 --- a/utils/src/main/java/org/bsc/processor/BaseAbstractProcessor.java +++ b/utils/src/main/java/org/bsc/processor/BaseAbstractProcessor.java @@ -5,6 +5,13 @@ package org.bsc.processor; +import javax.annotation.processing.AbstractProcessor; +import javax.annotation.processing.Filer; +import javax.annotation.processing.RoundEnvironment; +import javax.lang.model.element.*; +import javax.tools.Diagnostic.Kind; +import javax.tools.FileObject; +import javax.tools.StandardLocation; import java.io.IOException; import java.nio.file.Path; import java.util.Collections; @@ -13,18 +20,6 @@ import java.util.stream.Collector; import java.util.stream.Stream; -import javax.annotation.processing.AbstractProcessor; -import javax.annotation.processing.Filer; -import javax.annotation.processing.RoundEnvironment; -import javax.lang.model.element.AnnotationMirror; -import javax.lang.model.element.AnnotationValue; -import javax.lang.model.element.Element; -import javax.lang.model.element.ElementKind; -import javax.lang.model.element.TypeElement; -import javax.tools.Diagnostic.Kind; -import javax.tools.FileObject; -import javax.tools.StandardLocation; - /** * * @author bsorrentino