diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6cd93c8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+target/
+
+# Eclipse generated files
+bin/
+.settings/
+.classpath
+.project
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index d430e25..beb6ae1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,169 +1,345 @@
-
-
-
-
-
- 4.0.0
-
-
- mojo-parent
- org.codehaus.mojo
- 50
-
-
- javacc-maven-plugin
- 2.7-SNAPSHOT
- maven-plugin
-
- JavaCC Maven Plugin
- Maven 2 Plugin for processing JavaCC grammar files.
- http://mojo.codehaus.org/javacc-maven-plugin/
- 2005
-
-
- The Apache Software License, Version 2.0
- http://www.apache.org/licenses/LICENSE-2.0.txt
- repo
-
-
-
-
- 2.0.6
-
-
-
- scm:git:https://github.com/mojohaus/javacc-maven-plugin.git
- scm:git:ssh://git@github.com/mojohaus/javacc-maven-plugin.git
- https://github.com/mojohaus/javacc-maven-plugin
-
-
- JIRA
- http://jira.codehaus.org/browse/MJAVACC
-
-
-
-
- org.apache.maven
- maven-plugin-api
- 2.0.4
-
-
- org.apache.maven
- maven-project
- 2.0.4
-
-
- org.apache.maven
- maven-model
- 2.0.4
-
-
- net.java.dev.javacc
- javacc
- 5.0
-
-
- org.codehaus.plexus
- plexus-utils
- 1.5.6
-
-
- edu.ucla.cs.compilers
- jtb
- 1.3.2
-
- runtime
-
-
- org.apache.maven.reporting
- maven-reporting-api
- 2.0.4
-
-
- org.apache.maven.reporting
- maven-reporting-impl
- 2.0.4
-
-
- org.apache.maven.doxia
- doxia-sink-api
- 1.0-alpha-9
-
-
- org.apache.maven.doxia
- doxia-site-renderer
- 1.0-alpha-7
-
-
- plexus
- plexus-utils
-
-
-
-
- junit
- junit
- 3.8.2
- test
-
-
-
-
-
- run-its
-
-
- maven.test.skip
- !true
-
-
-
- 3.3
-
-
-
-
- org.apache.maven.plugins
- maven-invoker-plugin
-
- ${project.build.directory}/it
- verify.bsh
- src/it/settings.xml
- ${project.build.directory}/local-repo
- true
-
-
-
- integration-test
-
- install
- run
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ 4.0.0
+
+
+ mojo-parent
+ org.codehaus.mojo
+ 50
+
+
+ org.javacc.plugin
+ javacc-maven-plugin
+ 3.0.0
+ maven-plugin
+
+ JavaCC Maven Plugin
+ Maven 2 Plugin for processing JavaCC grammar files.
+ https://github.com/javacc/javacc-maven-plugin/
+ 2005
+
+
+ The Apache Software License, Version 2.0
+ http://www.apache.org/licenses/LICENSE-2.0.txt
+ repo
+
+
+
+
+ 2.0.6
+
+
+
+ scm:git:https://github.com/javacc/javacc-maven-plugin.git
+
+ scm:git:ssh://git@github.com/javacc/javacc-maven-plugin.git
+ https://github.com/javacc/javacc-maven-plugin
+ javacc-maven-plugin-3.0.0
+
+
+
+ GitHub
+ http://jira.codehaus.org/browse/MJAVACC
+
+
+
+ ossrh
+ https://oss.sonatype.org/service/local/staging/deploy/maven2/
+ https://oss.sonatype.org/content/repositories/snapshots/
+ 7.0.5
+
+
+
+
+ ossrh
+ https://oss.sonatype.org/service/local/staging/deploy/maven2/
+
+
+ ossrh
+ Sonatype snapshot repository
+ https://oss.sonatype.org/content/repositories/snapshots
+
+
+ github
+ scm:git:ssh://git@github.com/javacc/javacc-maven-plugin.git
+
+
+
+
+
+ org.apache.maven
+ maven-plugin-api
+
+
+ org.apache.maven
+ maven-project
+ 2.2.1
+
+
+ org.apache.maven
+ maven-model
+ 3.3.9
+
+
+ net.java.dev.javacc
+ javacc
+ ${javacc}
+ provided
+
+
+ edu.ucla.cs.compilers
+ jtb
+ 1.3.2
+
+ provided
+
+
+ org.codehaus.plexus
+ plexus-utils
+ 1.5.6
+
+
+ org.apache.maven.reporting
+ maven-reporting-api
+ 3.0
+
+
+ org.apache.maven.reporting
+ maven-reporting-impl
+ 3.0.0
+
+
+ org.apache.maven.doxia
+ doxia-core
+
+
+
+
+ org.apache.maven.doxia
+ doxia-sink-api
+ 1.9
+
+
+ org.apache.maven.doxia
+ doxia-site-renderer
+ 1.9.1
+
+
+ plexus
+ plexus-utils
+
+
+ org.apache.maven.doxia
+ doxia-core
+
+
+
+
+ junit
+ junit
+ test
+
+
+ net.sourceforge.cobertura
+ cobertura
+ 2.1.1
+
+
+ com.sun
+ tools
+
+
+
+
+ org.apache.maven.doxia
+ doxia-core
+ 1.9
+
+
+
+
+
+ run-its
+
+
+ maven.test.skip
+ !true
+
+
+
+ 3.3
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-invoker-plugin
+ 3.2.1
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-invoker-plugin
+
+
+ net.sourceforge.cobertura
+ cobertura
+ 2.1.1
+
+
+
+ true
+ false
+ ${project.build.directory}/it
+ verify.bsh
+ src/it/settings.xml
+ ${project.build.directory}/local-repo
+ true
+
+
+
+ integration-test
+
+ install
+ run
+
+
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.1.1
+
+
+ org.apache.maven.plugins
+ maven-release-plugin
+ 2.5.3
+
+
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ 1.6.7
+ true
+
+ ossrh
+ https://oss.sonatype.org/
+ true
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+
+
+ attach-javadocs
+
+ jar
+
+
+ none
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-enforcer-plugin
+
+
+ mojo-enforcer-rules
+ validate
+
+ enforce
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/release.properties b/release.properties
new file mode 100644
index 0000000..b991fb2
--- /dev/null
+++ b/release.properties
@@ -0,0 +1,19 @@
+#release configuration
+#Thu Mar 05 19:06:19 CET 2020
+scm.tagNameFormat=@{project.artifactId}-@{project.version}
+scm.tag=javacc-maven-plugin-3.0.0
+pushChanges=true
+scm.url=scm\:git\:ssh\://git@github.com/javacc/javacc-maven-plugin.git
+preparationGoals=clean verify
+project.rel.org.javacc.plugin\:javacc-maven-plugin=3.0.0
+project.scm.org.javacc.plugin\:javacc-maven-plugin.developerConnection=scm\:git\:ssh\://git@github.com/javacc/javacc-maven-plugin.git
+remoteTagging=true
+projectVersionPolicyId=default
+scm.commentPrefix=[maven-release-plugin]
+project.scm.org.javacc.plugin\:javacc-maven-plugin.tag=HEAD
+project.scm.org.javacc.plugin\:javacc-maven-plugin.url=https\://github.com/javacc/javacc-maven-plugin
+project.scm.org.javacc.plugin\:javacc-maven-plugin.connection=scm\:git\:https\://github.com/javacc/javacc-maven-plugin.git
+project.dev.org.javacc.plugin\:javacc-maven-plugin=3.0.1-SNAPSHOT
+exec.snapshotReleasePluginAllowed=false
+exec.additionalArguments=-Pmojo-release -P metrixware
+completedPhase=run-preparation-goals
diff --git a/src/it/explicit-parameter-values/pom.xml b/src/it/explicit-parameter-values/pom.xml
index 86acdf5..c5d933b 100644
--- a/src/it/explicit-parameter-values/pom.xml
+++ b/src/it/explicit-parameter-values/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
@@ -94,8 +99,8 @@
- maven-site-plugin
- 2.0-beta-7
+ maven-site-plugin
+ @sitePluginVersion@
@@ -103,7 +108,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/javacc-absent-source-directory/pom.xml b/src/it/javacc-absent-source-directory/pom.xml
index b85d8ad..c5e7311 100644
--- a/src/it/javacc-absent-source-directory/pom.xml
+++ b/src/it/javacc-absent-source-directory/pom.xml
@@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +16,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/javacc-basic/pom.xml b/src/it/javacc-basic/pom.xml
index 8776276..dfead58 100644
--- a/src/it/javacc-basic/pom.xml
+++ b/src/it/javacc-basic/pom.xml
@@ -1,35 +1,41 @@
-
- 4.0.0
+
+ 4.0.0
- org.codehaus.mojo.javacc
- it-test
- 1.0-SNAPSHOT
- Integration Test
- http://maven.apache.org
-
+ org.javacc.plugin.javacc
+ it-test
+ 1.0-SNAPSHOT
+ Integration Test
+ http://maven.apache.org
+
Check default execution.
-
-
-
- org.codehaus.mojo
- javacc-maven-plugin
- @pom.version@
-
- 1.4
-
-
-
-
- javacc
-
-
-
-
-
-
+
+
+
+ org.javacc.plugin
+ javacc-maven-plugin
+ @pom.version@
+
+
+ net.java.dev.javacc
+ javacc
+ 5.0
+
+
+
+ 1.4
+
+
+
+
+ javacc
+
+
+
+
+
+
diff --git a/src/it/javacc-custom-parser-files/pom.xml b/src/it/javacc-custom-parser-files/pom.xml
index b58b87a..a37e5f7 100644
--- a/src/it/javacc-custom-parser-files/pom.xml
+++ b/src/it/javacc-custom-parser-files/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/javacc-custom-source-files/pom.xml b/src/it/javacc-custom-source-files/pom.xml
index c6a263e..a4d3ae6 100644
--- a/src/it/javacc-custom-source-files/pom.xml
+++ b/src/it/javacc-custom-source-files/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/javacc-equal-input-output-directory/pom.xml b/src/it/javacc-equal-input-output-directory/pom.xml
index e06dad9..7b61a71 100644
--- a/src/it/javacc-equal-input-output-directory/pom.xml
+++ b/src/it/javacc-equal-input-output-directory/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -38,7 +43,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/javacc-grammar-in-source-root/pom.xml b/src/it/javacc-grammar-in-source-root/pom.xml
index d75c167..1089ed5 100644
--- a/src/it/javacc-grammar-in-source-root/pom.xml
+++ b/src/it/javacc-grammar-in-source-root/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/javacc-path-with-spaces/pom.xml b/src/it/javacc-path-with-spaces/pom.xml
index bea75f2..4ae6fd6 100644
--- a/src/it/javacc-path-with-spaces/pom.xml
+++ b/src/it/javacc-path-with-spaces/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/javacc-reactor-build/module/pom.xml b/src/it/javacc-reactor-build/module/pom.xml
index edb58b1..23ecc09 100644
--- a/src/it/javacc-reactor-build/module/pom.xml
+++ b/src/it/javacc-reactor-build/module/pom.xml
@@ -7,7 +7,7 @@
http://maven.apache.org
- org.codehaus.mojo.javacc
+ org.javacc.plugin.javacc
reactor-build
1.0-SNAPSHOT
@@ -15,7 +15,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
diff --git a/src/it/javacc-reactor-build/pom.xml b/src/it/javacc-reactor-build/pom.xml
index b6b269a..bb21b25 100644
--- a/src/it/javacc-reactor-build/pom.xml
+++ b/src/it/javacc-reactor-build/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
reactor-build
pom
1.0-SNAPSHOT
@@ -22,7 +27,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/javacc-stale-detection/pom.xml b/src/it/javacc-stale-detection/pom.xml
index 753fe79..106d505 100644
--- a/src/it/javacc-stale-detection/pom.xml
+++ b/src/it/javacc-stale-detection/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -38,7 +43,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jjdoc-absent-source-directory/pom.xml b/src/it/jjdoc-absent-source-directory/pom.xml
index e4848fc..2d55b3e 100644
--- a/src/it/jjdoc-absent-source-directory/pom.xml
+++ b/src/it/jjdoc-absent-source-directory/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,13 +21,13 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
maven-site-plugin
- 2.0-beta-7
+ @sitePluginVersion@
@@ -31,7 +36,7 @@
javacc-maven-plugin
- org.codehaus.mojo
+ org.javacc.plugin
@pom.version@
diff --git a/src/it/jjdoc-basic-site/pom.xml b/src/it/jjdoc-basic-site/pom.xml
index d4611da..d11f086 100644
--- a/src/it/jjdoc-basic-site/pom.xml
+++ b/src/it/jjdoc-basic-site/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
@@ -30,7 +35,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jjdoc-basic-standalone/pom.xml b/src/it/jjdoc-basic-standalone/pom.xml
index b62feca..0f659e1 100644
--- a/src/it/jjdoc-basic-standalone/pom.xml
+++ b/src/it/jjdoc-basic-standalone/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
@@ -34,7 +39,7 @@
javacc-maven-plugin
- org.codehaus.mojo
+ org.javacc.plugin
@pom.version@
target/it-site
diff --git a/src/it/jjdoc-default-source-roots/pom.xml b/src/it/jjdoc-default-source-roots/pom.xml
index a06310d..35ef363 100644
--- a/src/it/jjdoc-default-source-roots/pom.xml
+++ b/src/it/jjdoc-default-source-roots/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -41,7 +46,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
@@ -55,7 +60,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jjdoc-path-with-spaces/pom.xml b/src/it/jjdoc-path-with-spaces/pom.xml
index 3365bbc..1646f04 100644
--- a/src/it/jjdoc-path-with-spaces/pom.xml
+++ b/src/it/jjdoc-path-with-spaces/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
@@ -33,7 +38,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jjdoc-reactor-build/module/pom.xml b/src/it/jjdoc-reactor-build/module/pom.xml
index c3a67bb..48f48fb 100644
--- a/src/it/jjdoc-reactor-build/module/pom.xml
+++ b/src/it/jjdoc-reactor-build/module/pom.xml
@@ -7,7 +7,7 @@
http://maven.apache.org
- org.codehaus.mojo.javacc
+ org.javacc.plugin.javacc
reactor-build
1.0-SNAPSHOT
@@ -15,7 +15,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@@ -24,7 +24,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
diff --git a/src/it/jjdoc-reactor-build/pom.xml b/src/it/jjdoc-reactor-build/pom.xml
index bf15e26..62236f6 100644
--- a/src/it/jjdoc-reactor-build/pom.xml
+++ b/src/it/jjdoc-reactor-build/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
reactor-build
pom
1.0-SNAPSHOT
@@ -22,7 +27,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
@@ -37,7 +42,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jjtree-absent-source-directory/pom.xml b/src/it/jjtree-absent-source-directory/pom.xml
index b85d8ad..becd00b 100644
--- a/src/it/jjtree-absent-source-directory/pom.xml
+++ b/src/it/jjtree-absent-source-directory/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jjtree-basic/pom.xml b/src/it/jjtree-basic/pom.xml
index 19b886e..8c1b538 100644
--- a/src/it/jjtree-basic/pom.xml
+++ b/src/it/jjtree-basic/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jjtree-dynamic-node-package/pom.xml b/src/it/jjtree-dynamic-node-package/pom.xml
index ee0daf1..4388656 100644
--- a/src/it/jjtree-dynamic-node-package/pom.xml
+++ b/src/it/jjtree-dynamic-node-package/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jjtree-javacc-basic/pom.xml b/src/it/jjtree-javacc-basic/pom.xml
index bbd5739..cbb5267 100644
--- a/src/it/jjtree-javacc-basic/pom.xml
+++ b/src/it/jjtree-javacc-basic/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jjtree-javacc-custom-source-files/pom.xml b/src/it/jjtree-javacc-custom-source-files/pom.xml
index ac13644..c78b5f6 100644
--- a/src/it/jjtree-javacc-custom-source-files/pom.xml
+++ b/src/it/jjtree-javacc-custom-source-files/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jjtree-javacc-pipeline/pom.xml b/src/it/jjtree-javacc-pipeline/pom.xml
index b4e26c7..acb0916 100644
--- a/src/it/jjtree-javacc-pipeline/pom.xml
+++ b/src/it/jjtree-javacc-pipeline/pom.xml
@@ -1,7 +1,12 @@
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
jjtree-javacc-pipeline
jar
1.0-SNAPSHOT
@@ -11,7 +16,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jjtree-path-with-spaces/pom.xml b/src/it/jjtree-path-with-spaces/pom.xml
index a5189d7..249fc47 100644
--- a/src/it/jjtree-path-with-spaces/pom.xml
+++ b/src/it/jjtree-path-with-spaces/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jjtree-reactor-build/module/pom.xml b/src/it/jjtree-reactor-build/module/pom.xml
index 683a92e..e1ac2ea 100644
--- a/src/it/jjtree-reactor-build/module/pom.xml
+++ b/src/it/jjtree-reactor-build/module/pom.xml
@@ -7,7 +7,7 @@
http://maven.apache.org
- org.codehaus.mojo.javacc
+ org.javacc.plugin.javacc
reactor-build
1.0-SNAPSHOT
@@ -15,7 +15,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
diff --git a/src/it/jjtree-reactor-build/pom.xml b/src/it/jjtree-reactor-build/pom.xml
index 4b35590..b99e75f 100644
--- a/src/it/jjtree-reactor-build/pom.xml
+++ b/src/it/jjtree-reactor-build/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
reactor-build
pom
1.0-SNAPSHOT
@@ -22,7 +27,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jjtree-static-node-package/pom.xml b/src/it/jjtree-static-node-package/pom.xml
index f0eb887..f6cea51 100644
--- a/src/it/jjtree-static-node-package/pom.xml
+++ b/src/it/jjtree-static-node-package/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jtb-absent-source-directory/pom.xml b/src/it/jtb-absent-source-directory/pom.xml
index b85d8ad..becd00b 100644
--- a/src/it/jtb-absent-source-directory/pom.xml
+++ b/src/it/jtb-absent-source-directory/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jtb-basic/pom.xml b/src/it/jtb-basic/pom.xml
index d1f7541..78bb3f0 100644
--- a/src/it/jtb-basic/pom.xml
+++ b/src/it/jtb-basic/pom.xml
@@ -1,7 +1,12 @@
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
jtb-basic
jar
1.0-SNAPSHOT
@@ -11,7 +16,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jtb-dynamic-packages/pom.xml b/src/it/jtb-dynamic-packages/pom.xml
index 149f6c5..177445f 100644
--- a/src/it/jtb-dynamic-packages/pom.xml
+++ b/src/it/jtb-dynamic-packages/pom.xml
@@ -1,7 +1,12 @@
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
jtb-basic
jar
1.0-SNAPSHOT
@@ -11,7 +16,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jtb-javacc-basic/pom.xml b/src/it/jtb-javacc-basic/pom.xml
index 2a2d92c..323260f 100644
--- a/src/it/jtb-javacc-basic/pom.xml
+++ b/src/it/jtb-javacc-basic/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jtb-javacc-custom-source-files/pom.xml b/src/it/jtb-javacc-custom-source-files/pom.xml
index f938937..9cb001d 100644
--- a/src/it/jtb-javacc-custom-source-files/pom.xml
+++ b/src/it/jtb-javacc-custom-source-files/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jtb-path-with-spaces/pom.xml b/src/it/jtb-path-with-spaces/pom.xml
index a79949c..fddb52c 100644
--- a/src/it/jtb-path-with-spaces/pom.xml
+++ b/src/it/jtb-path-with-spaces/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
it-test
1.0-SNAPSHOT
Integration Test
@@ -16,7 +21,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/jtb-reactor-build/module/pom.xml b/src/it/jtb-reactor-build/module/pom.xml
index 558892c..9cbf2e8 100644
--- a/src/it/jtb-reactor-build/module/pom.xml
+++ b/src/it/jtb-reactor-build/module/pom.xml
@@ -7,7 +7,7 @@
http://maven.apache.org
- org.codehaus.mojo.javacc
+ org.javacc.plugin.javacc
reactor-build
1.0-SNAPSHOT
@@ -15,7 +15,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
diff --git a/src/it/jtb-reactor-build/pom.xml b/src/it/jtb-reactor-build/pom.xml
index 91896ae..927e78b 100644
--- a/src/it/jtb-reactor-build/pom.xml
+++ b/src/it/jtb-reactor-build/pom.xml
@@ -4,7 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
- org.codehaus.mojo.javacc
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+
+ org.javacc.plugin.javacc
reactor-build
pom
1.0-SNAPSHOT
@@ -22,7 +27,7 @@
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
@pom.version@
diff --git a/src/it/pom.xml b/src/it/pom.xml
new file mode 100644
index 0000000..8808d58
--- /dev/null
+++ b/src/it/pom.xml
@@ -0,0 +1,37 @@
+
+
+ 4.0.0
+
+ org.javacc.plugin.javacc
+ it-test-parent
+ 1.0-SNAPSHOT
+ pom
+ Integration Test
+ http://maven.apache.org
+
+
+ 7.0.5
+
+
+
+
+ org.javacc.plugin
+ javacc-maven-plugin
+ @pom.version@
+
+
+ net.java.dev.javacc
+ javacc
+ ${javacc}
+
+
+ edu.ucla.cs.compilers
+ jtb
+ 1.3.2
+
+
+
+
+
+
diff --git a/src/main/java/org/codehaus/mojo/javacc/AbstractJavaCCMojo.java b/src/main/java/org/codehaus/mojo/javacc/AbstractJavaCCMojo.java
index 2594c6f..d5615fc 100644
--- a/src/main/java/org/codehaus/mojo/javacc/AbstractJavaCCMojo.java
+++ b/src/main/java/org/codehaus/mojo/javacc/AbstractJavaCCMojo.java
@@ -281,6 +281,26 @@ public abstract class AbstractJavaCCMojo
*/
private String grammarEncoding;
+ /**
+ * The target code generator for compiling this grammar.
+ *
+ * @parameter property="codeGenerator"
+ * @since 2.7
+ */
+
+ private String codeGenerator;
+
+ /**
+ * Gets the backend code generator.
+ *
+ * @return The name of the code generator (Java, C++, C#)
+ * @since 2.7
+ */
+ protected String getCodeGenerator()
+ {
+ return this.codeGenerator;
+ }
+
/**
* Gets the file encoding of the grammar files.
*
@@ -500,10 +520,9 @@ protected void deleteTempDirectory( File tempDirectory )
* only copied to the compile source root if it doesn't already exist in another compile source root. This prevents
* duplicate class errors during compilation in case the user provided customized files in
* src/main/java
or similar.
- *
- * @param packageName The name of the destination package for the output files, must not be null
.
* @param sourceRoot The (absolute) path to the compile source root into which the output files should eventually be
* copied, must not be null
.
+ * @param packageName The name of the destination package for the output files, must not be null
.
* @param tempDirectory The (absolute) path to the directory to scan for generated output files, must not be
* null
.
* @param updatePattern A glob pattern that matches the (simple) names of those files which should always be updated
@@ -516,7 +535,21 @@ protected void copyGrammarOutput( File sourceRoot, String packageName, File temp
{
try
{
- Collection tempFiles = FileUtils.getFiles( tempDirectory, "*.java", null );
+ Collection tempFiles = null;
+ if (StringUtils.isBlank(codeGenerator) || codeGenerator.equalsIgnoreCase("Java"))
+ {
+ tempFiles = FileUtils.getFiles( tempDirectory, "*." + Suffix.Java.string(), null );
+ } else
+ if (codeGenerator.equalsIgnoreCase("C++"))
+ {
+ tempFiles = FileUtils.getFiles( tempDirectory, "*." + Suffix.Cpp.string(), null );
+ tempFiles.addAll(FileUtils.getFiles( tempDirectory, "*.h", null ));
+ } else
+ if (codeGenerator.equalsIgnoreCase("C#"))
+ {
+ tempFiles = FileUtils.getFiles( tempDirectory, "*." + Suffix.CSharp.string(), null );
+ }
+
for ( Iterator it = tempFiles.iterator(); it.hasNext(); )
{
File tempFile = (File) it.next();
@@ -695,6 +728,7 @@ protected JavaCC newJavaCC()
javacc.setUserCharStream( this.userCharStream );
javacc.setUserTokenManager( this.userTokenManager );
javacc.setSupportClassVisibilityPublic( this.supportClassVisibilityPublic );
+ javacc.setCodeGenerator(this.codeGenerator);
return javacc;
}
diff --git a/src/main/java/org/codehaus/mojo/javacc/GrammarDirectoryScanner.java b/src/main/java/org/codehaus/mojo/javacc/GrammarDirectoryScanner.java
index 675f694..1987515 100644
--- a/src/main/java/org/codehaus/mojo/javacc/GrammarDirectoryScanner.java
+++ b/src/main/java/org/codehaus/mojo/javacc/GrammarDirectoryScanner.java
@@ -163,7 +163,7 @@ public void scan()
for ( int i = 0; i < includedFiles.length; i++ )
{
String includedFile = includedFiles[i];
- GrammarInfo grammarInfo = new GrammarInfo( this.scanner.getBasedir(), includedFile, this.parserPackage );
+ GrammarInfo grammarInfo = new GrammarInfo( Suffix.Java, this.scanner.getBasedir(), includedFile, this.parserPackage );
if ( this.outputDirectory != null )
{
File sourceFile = grammarInfo.getGrammarFile();
diff --git a/src/main/java/org/codehaus/mojo/javacc/GrammarInfo.java b/src/main/java/org/codehaus/mojo/javacc/GrammarInfo.java
index a9a9077..93e739c 100644
--- a/src/main/java/org/codehaus/mojo/javacc/GrammarInfo.java
+++ b/src/main/java/org/codehaus/mojo/javacc/GrammarInfo.java
@@ -77,20 +77,21 @@ class GrammarInfo
public GrammarInfo( File sourceDir, String inputFile )
throws IOException
{
- this( sourceDir, inputFile, null );
+ this( Suffix.Java, sourceDir, inputFile, null );
}
/**
* Creates a new info from the specified grammar file.
- *
+ * @param suffix TODO
* @param sourceDir The absolute path to the base directory in which the grammar file resides, must not be
* null
.
* @param inputFile The path to the grammar file (relative to the source directory), must not be null
.
* @param packageName The package name for the generated parser, may be null
to use the package
* declaration from the grammar file.
+ *
* @throws IOException If reading the grammar file failed.
*/
- public GrammarInfo( File sourceDir, String inputFile, String packageName )
+ public GrammarInfo( Suffix suffix, File sourceDir, String inputFile, String packageName )
throws IOException
{
if ( !sourceDir.isAbsolute() )
@@ -140,11 +141,11 @@ else if ( inFile.getPath().startsWith( sourceDir.getPath() ) )
if ( this.parserDirectory.length() > 0 )
{
- this.parserFile = new File( this.parserDirectory, this.parserName + ".java" ).getPath();
+ this.parserFile = new File( this.parserDirectory, this.parserName + "." + suffix.string()).getPath();
}
else
{
- this.parserFile = this.parserName + ".java";
+ this.parserFile = this.parserName + "." + suffix.string();
}
}
diff --git a/src/main/java/org/codehaus/mojo/javacc/JJTree.java b/src/main/java/org/codehaus/mojo/javacc/JJTree.java
index 1fe1583..afecd0c 100644
--- a/src/main/java/org/codehaus/mojo/javacc/JJTree.java
+++ b/src/main/java/org/codehaus/mojo/javacc/JJTree.java
@@ -73,6 +73,11 @@ class JJTree
*/
private Boolean multi;
+ /**
+ * The option NODE_DIRECTOY.
+ */
+ private File nodeDirectory;
+
/**
* The option NODE_DEFAULT_VOID.
*/
@@ -133,6 +138,11 @@ class JJTree
*/
private String visitorException;
+ /**
+ * The option CODE_GENERATOR.
+ */
+ private String codeGenerator;
+
/**
* Sets the absolute path to the grammar file to pass into JJTree for preprocessing.
*
@@ -220,6 +230,16 @@ public void setBuildNodeFiles( Boolean value )
this.buildNodeFiles = value;
}
+ /**
+ * Sets the option value NODE_DIRECTORY.
+ *
+ * @param value The option value, may be null
to use the value provided in the grammar or the default.
+ */
+ public void setNodeDirectory( File value )
+ {
+ this.nodeDirectory = value;
+ }
+
/**
* Sets the option value MULTI.
*
@@ -350,6 +370,16 @@ public void setVisitorException( String value )
this.visitorException = value;
}
+ /**
+ * Sets the option CODE_GENERATOR.
+ *
+ * @param value The option value, may be null
to use the value provided in the grammar or the default.
+ */
+ public void setCodeGenerator( String value )
+ {
+ this.codeGenerator = value;
+ }
+
/**
* {@inheritDoc}
*/
@@ -393,6 +423,11 @@ private String[] generateArguments()
argsList.add( "-BUILD_NODE_FILES=" + this.buildNodeFiles );
}
+ if ( this.nodeDirectory != null )
+ {
+ argsList.add( "-NODE_DIRECTORY=" + this.nodeDirectory.getPath());
+ }
+
if ( this.multi != null )
{
argsList.add( "-MULTI=" + this.multi );
@@ -463,6 +498,11 @@ private String[] generateArguments()
argsList.add( "-VISITOR_EXCEPTION=" + this.visitorException );
}
+ if ( StringUtils.isNotEmpty( this.codeGenerator ) )
+ {
+ argsList.add( "-CODE_GENERATOR=" + this.codeGenerator );
+ }
+
if ( this.outputDirectory != null )
{
argsList.add( "-OUTPUT_DIRECTORY=" + this.outputDirectory.getAbsolutePath() );
@@ -486,4 +526,5 @@ public String toString()
return Arrays.asList( generateArguments() ).toString();
}
+
}
diff --git a/src/main/java/org/codehaus/mojo/javacc/JJTreeJavaCCMojo.java b/src/main/java/org/codehaus/mojo/javacc/JJTreeJavaCCMojo.java
index ee2d9ac..3d5f781 100644
--- a/src/main/java/org/codehaus/mojo/javacc/JJTreeJavaCCMojo.java
+++ b/src/main/java/org/codehaus/mojo/javacc/JJTreeJavaCCMojo.java
@@ -187,6 +187,13 @@ public class JJTreeJavaCCMojo
*/
private File outputDirectory;
+ /**
+ * The directory where the user's defined AST Nodes are located.
+ *
+ * @parameter property="nodeDirectory"
+ */
+ private File nodeDirectory;
+
/**
* A set of Ant-like inclusion patterns used to select files from the source directory for processing. By default,
* the patterns **/*.jj
, **/*.JJ
, **/*.jjt
and
@@ -251,6 +258,14 @@ protected File getOutputDirectory()
return this.outputDirectory;
}
+ /**
+ * {@inheritDoc}
+ */
+ protected File getNodeDirectory()
+ {
+ return this.nodeDirectory;
+ }
+
/**
* {@inheritDoc}
*/
@@ -355,6 +370,8 @@ protected JJTree newJJTree()
jjtree.setVisitorDataType( this.visitorDataType );
jjtree.setVisitorReturnType( this.visitorReturnType );
jjtree.setVisitorException( this.visitorException );
+ jjtree.setCodeGenerator(this.getCodeGenerator());
+ jjtree.setNodeDirectory(this.getNodeDirectory());
return jjtree;
}
diff --git a/src/main/java/org/codehaus/mojo/javacc/JavaCC.java b/src/main/java/org/codehaus/mojo/javacc/JavaCC.java
index 88468b3..1801d8e 100644
--- a/src/main/java/org/codehaus/mojo/javacc/JavaCC.java
+++ b/src/main/java/org/codehaus/mojo/javacc/JavaCC.java
@@ -177,6 +177,12 @@ class JavaCC
*/
private Boolean supportClassVisibilityPublic;
+ /**
+ * The option CODE_GENERATOR.
+ */
+ private String codeGenerator;
+
+ /**
/**
* Sets the absolute path to the grammar file to pass into JavaCC for compilation.
*
@@ -467,6 +473,16 @@ public void setSupportClassVisibilityPublic( Boolean value )
this.supportClassVisibilityPublic = value;
}
+ /**
+ * Sets the option CODE_GENERATOR.
+ *
+ * @param value The option value, may be null
to use the value provided in the grammar or the default.
+ */
+ public void setCodeGenerator( String value )
+ {
+ this.codeGenerator = value;
+ }
+
/**
* {@inheritDoc}
*/
@@ -479,6 +495,10 @@ protected int execute()
{
this.outputDirectory.mkdirs();
}
+ if ( getLog().isDebugEnabled() )
+ {
+ getLog().debug( toString() );
+ }
return org.javacc.parser.Main.mainProgram( args );
}
@@ -624,6 +644,11 @@ private String[] generateArguments()
argsList.add( "-SUPPORT_CLASS_VISIBILITY_PUBLIC=" + this.supportClassVisibilityPublic );
}
+ if ( StringUtils.isNotEmpty( this.codeGenerator ) )
+ {
+ argsList.add( "-CODE_GENERATOR=" + this.codeGenerator );
+ }
+
if ( this.outputDirectory != null )
{
argsList.add( "-OUTPUT_DIRECTORY=" + this.outputDirectory.getAbsolutePath() );
diff --git a/src/main/java/org/codehaus/mojo/javacc/JavaCCMojo.java b/src/main/java/org/codehaus/mojo/javacc/JavaCCMojo.java
index 1a60da6..5e65073 100644
--- a/src/main/java/org/codehaus/mojo/javacc/JavaCCMojo.java
+++ b/src/main/java/org/codehaus/mojo/javacc/JavaCCMojo.java
@@ -26,7 +26,7 @@
/**
* Parses a JavaCC grammar file (*.jj
) and transforms it to Java source files. Detailed information
- * about the JavaCC options can be found on the JavaCC website.
+ * about the JavaCC options can be found on the JavaCC website.
*
* @goal javacc
* @phase generate-sources
diff --git a/src/main/java/org/codehaus/mojo/javacc/Suffix.java b/src/main/java/org/codehaus/mojo/javacc/Suffix.java
new file mode 100644
index 0000000..a906958
--- /dev/null
+++ b/src/main/java/org/codehaus/mojo/javacc/Suffix.java
@@ -0,0 +1,18 @@
+package org.codehaus.mojo.javacc;
+
+public enum Suffix {
+ Java("java"),
+ Cpp("cc"),
+ CSharp("cs");
+
+ private String suffix;
+
+ Suffix(String suffix)
+ {
+ this.suffix = suffix;
+ }
+
+ public String string() {
+ return suffix;
+ }
+}
diff --git a/src/site/apt/examples/example-javacc.apt.vm b/src/site/apt/examples/example-javacc.apt.vm
index d1f9d7b..06b278d 100644
--- a/src/site/apt/examples/example-javacc.apt.vm
+++ b/src/site/apt/examples/example-javacc.apt.vm
@@ -21,7 +21,7 @@ JavaCC Examples
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
${project.version}
@@ -57,7 +57,7 @@ JavaCC Examples
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
${project.version}
diff --git a/src/site/apt/examples/example-jjdoc.apt.vm b/src/site/apt/examples/example-jjdoc.apt.vm
index 31c28d6..5297cc3 100644
--- a/src/site/apt/examples/example-jjdoc.apt.vm
+++ b/src/site/apt/examples/example-jjdoc.apt.vm
@@ -18,7 +18,7 @@ JJDoc Examples
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
${project.version}
diff --git a/src/site/apt/examples/example-jjtree.apt.vm b/src/site/apt/examples/example-jjtree.apt.vm
index a2b81dd..2a353be 100644
--- a/src/site/apt/examples/example-jjtree.apt.vm
+++ b/src/site/apt/examples/example-jjtree.apt.vm
@@ -18,7 +18,7 @@ JJTree Examples
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
${project.version}
diff --git a/src/site/apt/examples/example-jtb.apt.vm b/src/site/apt/examples/example-jtb.apt.vm
index 8fb243c..275a1be 100644
--- a/src/site/apt/examples/example-jtb.apt.vm
+++ b/src/site/apt/examples/example-jtb.apt.vm
@@ -18,7 +18,7 @@ JTB Examples
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
${project.version}
diff --git a/src/site/apt/usage.apt.vm b/src/site/apt/usage.apt.vm
index a264ce7..87f653b 100644
--- a/src/site/apt/usage.apt.vm
+++ b/src/site/apt/usage.apt.vm
@@ -30,7 +30,7 @@ Usage
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
${project.version}
@@ -73,7 +73,7 @@ mvn generate-sources
- org.codehaus.mojo
+ org.javacc.plugin
javacc-maven-plugin
${project.version}
diff --git a/src/site/site.xml b/src/site/site.xml
index 529e57d..e84eb85 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -26,7 +26,6 @@
-