You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by ke...@apache.org on 2015/08/19 16:41:20 UTC
[1/2] incubator-groovy git commit: moved Groovy-Eclipse documentation
to wiki
Repository: incubator-groovy
Updated Branches:
refs/heads/master f6ade7132 -> 1f50866cc
moved Groovy-Eclipse documentation to wiki
Project: http://git-wip-us.apache.org/repos/asf/incubator-groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-groovy/commit/c0b66258
Tree: http://git-wip-us.apache.org/repos/asf/incubator-groovy/tree/c0b66258
Diff: http://git-wip-us.apache.org/repos/asf/incubator-groovy/diff/c0b66258
Branch: refs/heads/master
Commit: c0b6625841a529659d887d0cdd29d021e78664bd
Parents: f6ade71
Author: Keegan Witt <ke...@gmail.com>
Authored: Wed Aug 19 10:37:19 2015 -0400
Committer: Keegan Witt <ke...@gmail.com>
Committed: Wed Aug 19 10:37:19 2015 -0400
----------------------------------------------------------------------
src/spec/doc/groovy-contributions.adoc | 1 -
src/spec/doc/tools-groovyc.adoc | 13 +-
src/spec/doc/tools-groovyeclipse.adoc | 301 ----------------------------
3 files changed, 9 insertions(+), 306 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/c0b66258/src/spec/doc/groovy-contributions.adoc
----------------------------------------------------------------------
diff --git a/src/spec/doc/groovy-contributions.adoc b/src/spec/doc/groovy-contributions.adoc
index 929516f..b528ad2 100644
--- a/src/spec/doc/groovy-contributions.adoc
+++ b/src/spec/doc/groovy-contributions.adoc
@@ -405,7 +405,6 @@ asciidoctor: WARNING: template-engines.adoc: line 145: section title out of sequ
Rendering /media/martin/LINKS/groovy-core/groovy-core/src/spec/doc/tools-groovyc.adoc
Rendering /media/martin/LINKS/groovy-core/groovy-core/src/spec/doc/tools-groovyconsole.adoc
Rendering /media/martin/LINKS/groovy-core/groovy-core/src/spec/doc/tools-groovydoc.adoc
-Rendering /media/martin/LINKS/groovy-core/groovy-core/src/spec/doc/tools-groovyeclipse.adoc
Rendering /media/martin/LINKS/groovy-core/groovy-core/src/spec/doc/tools-groovysh.adoc
Rendering /media/martin/LINKS/groovy-core/groovy-core/src/spec/doc/tools-ide.adoc
Rendering /media/martin/LINKS/groovy-core/groovy-core/src/spec/doc/version-scheme.adoc
http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/c0b66258/src/spec/doc/tools-groovyc.adoc
----------------------------------------------------------------------
diff --git a/src/spec/doc/tools-groovyc.adoc b/src/spec/doc/tools-groovyc.adoc
index 3a4f09f..6d09674 100644
--- a/src/spec/doc/tools-groovyc.adoc
+++ b/src/spec/doc/tools-groovyc.adoc
@@ -246,7 +246,7 @@ have difficulties with joint Java-Groovy projects (for the same reason
<<section-gmaven,GMaven>> and <<Gradle>> can have issues).
The <<section-groovyeclipse,Groovy-Eclipse compiler plugin for Maven>>
sidesteps the joint compilation issues. Read
-<<Groovy-EclipsecompilerpluginforMaven-WhyanotherGroovycompilerforMavenWhataboutGMaven, this>>
+https://github.com/groovy/groovy-eclipse/wiki/Groovy-Eclipse-Maven-plugin#why-another-groovy-compiler-for-maven-what-about-gmaven[this]
for a deeper discussion of the benefits and disadvantages of the two
approaches.
@@ -371,9 +371,9 @@ https://github.com/groovy/GMavenPlus[GMavenPlus] is a rewrite of
features of GMaven (a couple notable exceptions being
http://maven.apache.org/plugin-tools/maven-plugin-tools-java/index.html[mojo Javadoc tags]
and support for older Groovy versions). Its joint compilation uses stubs (which
-means it has the same potential issues as GMaven and <<Gradle>>). The main
+means it has the same potential issues as <<GMaven>> and <<Gradle>>). The main
advantages over its predecessor are that it supports recent Groovy versions,
-InvokeDynamic, Groovy on Android, and GroovyDoc.
+InvokeDynamic, Groovy on Android, GroovyDoc, and configuration scripts.
[[section-gmaven2]]
==== GMaven 2
@@ -384,7 +384,12 @@ non-scripting features of the GMaven plugin. It has not yet had any release and
appears to be inactive currently.
[[section-groovyeclipse]]
-include::{projectdir}/{specfolder}/tools-groovyeclipse.adoc[leveloffset=+2]
+=== The Groovy Eclipse Maven plugin
+https://github.com/groovy/groovy-eclipse/wiki/Groovy-Eclipse-Maven-plugin[Groovy-Eclipse]
+provides a compiler plugin for Maven. Using the compiler
+plugin, it is possible to compile your maven projects using the
+Groovy-Eclipse compiler. One feature unavailable elsewhere is
+stubless joint compilation.
[[section-jointcompilation]]
=== Joint compilation
http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/c0b66258/src/spec/doc/tools-groovyeclipse.adoc
----------------------------------------------------------------------
diff --git a/src/spec/doc/tools-groovyeclipse.adoc b/src/spec/doc/tools-groovyeclipse.adoc
deleted file mode 100644
index ac12258..0000000
--- a/src/spec/doc/tools-groovyeclipse.adoc
+++ /dev/null
@@ -1,301 +0,0 @@
-//////////////////////////////////////////
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
-//////////////////////////////////////////
-
-= The Groovy Eclipse Maven plugin
-
-Groovy-Eclipse provides a compiler plugin for Maven. Using the compiler
-plugin, it is possible to compile your maven projects using the
-Groovy-Eclipse compiler.
-
-The most recent version of the Groovy-Eclipse-Compiler plugin for maven
-is 2.9.1-01. The most recent version of the groovy-eclipse-batch artifact is 2.3.7-01.
-They are both available from maven central.
-
-[[Groovy-EclipsecompilerpluginforMaven-Howtousethecompilerplugin---SettingupthePOM]]
-== How to use the compiler plugin—Setting up the POM
-
-In the plugin section, change the compiler used by the
-http://maven.apache.org/plugins/maven-compiler-plugin/[maven-compiler-plugin].
-Like the http://ant.apache.org/manual/Tasks/javac.html[javac ant task],
-the maven-compiler-plugin does not actually compile, but rather
-delegates the compilation to a different artifact (in our case, the
-`groovy-eclipse-batch` artifact):
-
-[source,xml]
---------------------------------------------------------------------------------------------------
-<build>
- ...
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <!-- 2.8.0-01 and later require maven-compiler-plugin 3.1 or higher -->
- <version>3.1</version>
- <configuration>
- <compilerId>groovy-eclipse-compiler</compilerId>
- </configuration>
- <dependencies>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-eclipse-compiler</artifactId>
- <version>2.9.1-01</version>
- </dependency>
- <!-- for 2.8.0-01 and later you must have an explicit dependency on groovy-eclipse-batch -->
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-eclipse-batch</artifactId>
- <version>2.3.7-01</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- ...
-</build>
---------------------------------------------------------------------------------------------------
-
-This will allow Groovy files to be compiled. The groovy-eclipse-compiler
-recognizes all settings supported by the
-http://maven.apache.org/plugins/maven-compiler-plugin/[maven-compiler-plugin].
-
-Remember that you still need to specify a groovy artifact as a build
-dependency in addition to the `maven-compiler-plugin` dependency. The
-groovy dependency version should match the compiler version. Something
-like this:
-
-[source,xml]
-------------------------------------------
-<dependencies>
- ...
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-all</artifactId>
- <version>2.3.7</version>
- </dependency>
- ...
-</dependencies>
-------------------------------------------
-
-Note that the groovy-eclipse-compiler and groovy-eclipse-batch artifacts
-are available in Maven-central, so there is no need to explicitly
-declare any extra repositories.
-
-[[Groovy-EclipsecompilerpluginforMaven-Settingupthesourcefolders]]
-== Setting up the source folders
-
-
-There are several ways to set up your maven project to recognize Groovy
-source files
-
-[[Groovy-EclipsecompilerpluginforMaven-Donothing]]
-=== Do nothing
-
-The simplest way to set up your source folders is to do nothing at all:
-add all of your Groovy files to `src/main/java` and `src/test/java`.
-This requires absolutely no extra configuration and is easy to
-implement. However, this is not a standard maven approach to setting up
-your project. If you require a more standard maven approach, then it is
-possible to put your Groovy files in `src/main/groovy` and
-`src/test/groovy` and you Java files in `src/main/java` and
-`src/test/java`. There are several ways of doing this.
-
-[[Groovy-EclipsecompilerpluginforMaven-Doalmostnothing]]
-=== Do almost nothing
-
-If there is _at least one_ file (Java or not) in `src/main/java`, then
-all files in `src/main/groovy` will be found. If, however,
-`src/main/java` is empty, then `src/main/groovy` will be ignored. You
-can get around this by placing an empty file in `src/main/java` just so
-that `src/main/groovy` will be recognized. The same is true for
-`src/test/java` and `src/test/groovy`.
-
-[[Groovy-EclipsecompilerpluginforMaven-Usethegroovy-eclipse-compilermojoforconfiguringsourcefolders]]
-=== Use the `groovy-eclipse-compiler` mojo for configuring source folders
-
-(You only need this approach if your project has an empty
-`src/main/java` or `src/test/java`.)
-
-If your project has no Java files and you don’t want to add an empty
-file in `src/main/java`, then you can configure source files by
-referencing the groovy-eclipse-compiler mojo. Just add this to the
-`plugins` section of your pom:
-
-[source,xml]
-----------------------------------------------------
-<build>
- ...
- <plugin>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-eclipse-compiler</artifactId>
- <version>2.9.1-01</version>
- <extensions>true</extensions>
- </plugin>
- ...
-</build>
-----------------------------------------------------
-
-The `<extensions>true</extensions>` section is important because this
-redefines the default lifecycle of your project so that an extra phase
-is added. This phase has an extra goal attached to it that adds the two
-Groovy source folders.
-
-[[Groovy-EclipsecompilerpluginforMaven-Usethebuild-helper-maven-plugin]]
-=== Use the `build-helper-maven-plugin`
-
-(You only need this approach if your project has an empty
-`src/main/java` or `src/test/java`.)
-
-The `build-helper-maven-plugin` allows you to do things like adding
-extra source folders to your project without needing to redefine the
-default lifecycle. You need to add this configuration to your build
-plugin section:
-
-[source,xml]
-------------------------------------------------------
-<build>
- ...
- <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>src/main/groovy</source>
- </sources>
- </configuration>
- </execution>
- <execution>
- <id>add-test-source</id>
- <phase>generate-test-sources</phase>
- <goals>
- <goal>add-test-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>src/test/groovy</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- ...
-</build>
-------------------------------------------------------
-
-The benefit of using this approach is that you do not need to make any
-changes to the default lifecycle. The downside is, of course, that you
-need 31 lines of configuration to do this!
-
-[[Groovy-EclipsecompilerpluginforMaven-Sourcecode]]
-== Source code
-The source code for the plugin itself is available from the
-https://github.com/groovy/groovy-eclipse/[github repository].
-
-[[Groovy-EclipsecompilerpluginforMaven-WhyanotherGroovycompilerforMavenWhataboutGMaven]]
-== Why another Groovy compiler for Maven? What about GMaven?
-
-GMaven 2.0 and later no longer supports compilation. You can read more
-about this on the http://groovy.github.io/gmaven/[GMaven 2 project
-page]. <<section-gmaven,GMaven 1.x>> is now deprecated.
-
-GMaven 1.x had limitations over the groovy-eclipse-compiler and for the
-following reasons GMaven 2.0 compilation is no longer supported:
-
-1. The compiler plugin does not require the creation of Java stubs so
-that your Groovy files can compile against Java files. This will prevent
-some arcane compile errors from appearing.
-2. The Groovy-Eclipse compiler is the same inside Eclipse and inside
-Maven, and so configuration across the two platforms can be simplified.
-3. The compiler plugin is a
-http://maven.apache.org/plugins/maven-compiler-plugin/non-javac-compilers.html[standard
-compiler plugin] for Maven. It therefore follows all allows all the same
-standard configuration that the Javac compiler plugin uses. This makes
-it simpler to introduce Groovy into an existing Maven project. All you
-need to do is change the compiler plugin that the pom references.
-
-There are still some reasons to use GMaven:
-
-1. GroovyDoc tool is not supported because the compiler plugin does not
-produce stubs.
-2. Groovy Mojos are not supported.
-3. Groovy scripts cannot be executed in your poms.
-
-Whether or not the Groovy-Eclipse compiler plugin for Maven is
-appropriate for your project will depend on your requirements.
-
-[[Groovy-EclipsecompilerpluginforMaven-ProjectLombok]]
-== Project Lombok
-
-http://projectlombok.org/[Project Lombok] is compatible with the
-groovy-eclipse-compiler. There is some extra configuration that you
-need to do. The lombok jar needs to be added to _both the build and
-compile dependencies sections_:
-
-[source,xml]
---------------------------------------
-<dependency>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok</artifactId>
- <version>1.14.8</version>
-</dependency>
---------------------------------------
-
-Also, the following configuration needs to be added to the
-maven-compiler-plugin configuration:
-
-[source,xml]
-------------------------------------------------------
-<configuration>
- <compilerId>groovy-eclipse-compiler</compilerId>
- <verbose>true</verbose>
- <compilerArguments>
- <javaAgentClass>lombok.core.Agent</javaAgentClass>
- </compilerArguments>
- <fork>true</fork>
-</configuration>
-------------------------------------------------------
-
-[[Groovy-EclipsecompilerpluginforMaven-Groovy-Eclipseconfiguratorform2Eclipse]]
-== Groovy-Eclipse configurator for m2Eclipse
-
-If you are going to be working with your maven project inside of
-Eclipse, it is strongly recommended that you use
-http://eclipse.org/m2e[m2eclipse]. And to use your Groovy projects with
-m2eclipse, you will need to install the Groovy-Eclipse configurator for
-m2eclipse. This feature is available any of the Groovy-Eclipse update
-sites (e.g., nightly, milestone, or release). Just go to your Eclipse
-update manager and add the Groovy-Eclipse update sites (if you haven’t
-done so already). Select the _Groovy-Eclipse M2E integration_.
-
-The Groovy-Eclipse configurator for m2eclipse is not compatible with
-AspectJ or Scala. So you cannot use a joint AspectJ/Scala/Groovy
-project in Eclipse. These languages must be separated into separate
-sub-projects.
-
-== Where to find more information and report issues
-
-More information is available in the https://github.com/groovy/groovy-eclipse/wiki[Groovy-Eclipse Wiki]. Any bugs or
-feature enhancements should be reported as https://github.com/groovy/groovy-eclipse/issues[Groovy-Eclipse Github Issues].
[2/2] incubator-groovy git commit: Joint Compilation section should
be sibling of Maven section, not child
Posted by ke...@apache.org.
Joint Compilation section should be sibling of Maven section, not child
Project: http://git-wip-us.apache.org/repos/asf/incubator-groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-groovy/commit/1f50866c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-groovy/tree/1f50866c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-groovy/diff/1f50866c
Branch: refs/heads/master
Commit: 1f50866cc817abc51e39ba97389044e66eb0501e
Parents: c0b6625
Author: Keegan Witt <ke...@gmail.com>
Authored: Wed Aug 19 10:40:41 2015 -0400
Committer: Keegan Witt <ke...@gmail.com>
Committed: Wed Aug 19 10:40:41 2015 -0400
----------------------------------------------------------------------
src/spec/doc/tools-groovyc.adoc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/1f50866c/src/spec/doc/tools-groovyc.adoc
----------------------------------------------------------------------
diff --git a/src/spec/doc/tools-groovyc.adoc b/src/spec/doc/tools-groovyc.adoc
index 6d09674..5b8f140 100644
--- a/src/spec/doc/tools-groovyc.adoc
+++ b/src/spec/doc/tools-groovyc.adoc
@@ -385,6 +385,7 @@ appears to be inactive currently.
[[section-groovyeclipse]]
=== The Groovy Eclipse Maven plugin
+
https://github.com/groovy/groovy-eclipse/wiki/Groovy-Eclipse-Maven-plugin[Groovy-Eclipse]
provides a compiler plugin for Maven. Using the compiler
plugin, it is possible to compile your maven projects using the
@@ -392,7 +393,7 @@ Groovy-Eclipse compiler. One feature unavailable elsewhere is
stubless joint compilation.
[[section-jointcompilation]]
-=== Joint compilation
+== Joint compilation
Joint compilation means that the Groovy compiler will parse the
Groovy source files, create stubs for all of them, invoke the Java