You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2018/07/25 06:01:28 UTC
[1/2] groovy git commit: fix up a few other doc references to
groovy-all jar plus change groovy ant groovy task to not look for embeddable
directory
Repository: groovy
Updated Branches:
refs/heads/GROOVY_2_5_X f660a5bd6 -> 4429b3c4a
fix up a few other doc references to groovy-all jar plus change groovy ant groovy task to not look for embeddable directory
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/a5396650
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/a5396650
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/a5396650
Branch: refs/heads/GROOVY_2_5_X
Commit: a5396650cdd849a2391ce667600d882153dca166
Parents: f660a5b
Author: Paul King <pa...@asert.com.au>
Authored: Wed Jul 25 15:49:03 2018 +1000
Committer: Paul King <pa...@asert.com.au>
Committed: Wed Jul 25 15:56:46 2018 +1000
----------------------------------------------------------------------
src/examples/astbuilder/build.xml | 3 +--
src/examples/osgi/build.xml | 2 +-
src/examples/osgi/readme.txt | 16 ++++++++--------
src/examples/transforms/global/build.xml | 2 +-
src/examples/transforms/local/build.xml | 2 +-
.../main/java/org/codehaus/groovy/ant/Groovy.java | 4 ++--
.../main/java/org/codehaus/groovy/ant/Groovyc.java | 8 ++++----
.../groovy-ant/src/spec/doc/groovy-ant-task.adoc | 2 +-
.../groovy-groovydoc/src/spec/doc/groovydoc.adoc | 6 +++---
9 files changed, 22 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/a5396650/src/examples/astbuilder/build.xml
----------------------------------------------------------------------
diff --git a/src/examples/astbuilder/build.xml b/src/examples/astbuilder/build.xml
index a8cd1ec..3f31815 100644
--- a/src/examples/astbuilder/build.xml
+++ b/src/examples/astbuilder/build.xml
@@ -21,10 +21,9 @@
-->
<project name="groovy-astbuilder-usage-example" default="compile-transform">
- <!-- groovy-all .jar is assumed to be on your classpath. -->
+ <!-- necessary groovy jars are assumed to be on your classpath. -->
<taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" />
-
<target name="init" description="cleanup old class files">
<delete dir="examples"/>
</target>
http://git-wip-us.apache.org/repos/asf/groovy/blob/a5396650/src/examples/osgi/build.xml
----------------------------------------------------------------------
diff --git a/src/examples/osgi/build.xml b/src/examples/osgi/build.xml
index 4ae9f14..9d31efb 100644
--- a/src/examples/osgi/build.xml
+++ b/src/examples/osgi/build.xml
@@ -23,7 +23,7 @@
<property name="build.dir" value="build"/>
<property file="build.properties"/>
- <property name="groovy.jar" value="groovy-all-${groovy.version}.jar" />
+ <property name="groovy.jar" value="groovy-${groovy.version}.jar" />
<property name="hello.bundle" value="hello-bundle-imports-groovy.jar" />
<property name="hello.bundle.contains" value="hello-bundle-contains-groovy.jar" />
<property name="harness.bundle" value="hello-groovy-test-harness.jar" />
http://git-wip-us.apache.org/repos/asf/groovy/blob/a5396650/src/examples/osgi/readme.txt
----------------------------------------------------------------------
diff --git a/src/examples/osgi/readme.txt b/src/examples/osgi/readme.txt
index cfe209c..7ee164c 100644
--- a/src/examples/osgi/readme.txt
+++ b/src/examples/osgi/readme.txt
@@ -36,8 +36,8 @@ Building this Example
IMPORTANT: You must edit build.properties before building the example. There are
three properties that must be set in build.properties:
groovy.bin.dir - The example requires you specify the location of your
- groovy-all jar. This is hwo the build finds groovyc.
- groovy.version - The example requires you specify the version of your groovy-all
+ groovy jar. This is how the build finds groovyc.
+ groovy.version - The example requires you specify the version of your groovy
jar. This is so that the jar files can be built correctly.
osgi.jar - The example requires you specify the location of the OSGi jar.
This is required to compile the code.
@@ -53,9 +53,9 @@ Once these properties are set, simply run ant to build:
The build creates three jar files:
hello-bundle-imports-groovy.jar - OSGi bundle written in Groovy that resolves the
- groovy-all Jar file from the container.
+ groovy Jar file from the container.
hello-bundle-contains-groovy.jar - OSGi bundle written in Groovy that resolves the
- groovy-all Jar file from within itself. The container never sees Groovy.
+ groovy Jar file from within itself. The container never sees Groovy.
hello-groovy-test-harness.jar - OSGi bundle that loads and tests one of the previous
two services.
@@ -66,7 +66,7 @@ container. The final output of the Ant script may look like this:
[echo] To run the OSGi console, run the following command:
[echo] java -jar ../../../../equinox-3.4/eclipse/plugins/org.eclipse.osgi_3.4.0.v20080605-1900.jar -console
[echo] To install these applications in the container, run the following commands in the OSGi container:
- [echo] install file:/home/user/dev/groovy-core/target/dist/groovy-all-1.7-beta-1-SNAPSHOT.jar
+ [echo] install file:/home/user/dev/groovy-core/target/dist/groovy-all-1.7.0.jar
[echo] install file:/home/user/dev/groovy-core/src/examples/osgi/build/hello-bundle-imports-groovy.jar
[echo] install file:/home/user/dev/groovy-core/src/examples/osgi/build/hello-bundle-contains-groovy.jar
[echo] install file:/home/user/dev/groovy-core/src/examples/osgi/build/hello-groovy-test-harness.jar
@@ -99,9 +99,9 @@ Type the command "ss" to get a system status:
Install the three bundles using the "install" command and the file URLs of the
jars built by Ant. Remember, the Ant script printed the file URLs to the console
-as part of the build.
+as part of the build (replace groovy-all with groovy for 2.5+).
-osgi> install file:/home/user/dev/groovy-core/target/dist/groovy-all-1.7-beta-1-SNAPSHOT.jar
+osgi> install file:/home/user/dev/groovy-core/target/dist/groovy-all-1.7.0.jar
Bundle id is 1
osgi> install file:/home/user/dev/groovy-core/src/examples/osgi/build/hello-bundle-imports-groovy.jar
@@ -119,7 +119,7 @@ Framework is launched.
id State Bundle
0 ACTIVE org.eclipse.osgi_3.4.0.v20080605-1900
-1 INSTALLED groovy-all_1.7.0.beta-1-SNAPSHOT
+1 INSTALLED groovy-all_1.7.0
2 INSTALLED org.codehaus.groovy.osgi.hello-groovy-bundle_1.0.0
3 INSTALLED org.codehaus.groovy.osgi.harness.hello-groovy-test-harness_1.0.0
http://git-wip-us.apache.org/repos/asf/groovy/blob/a5396650/src/examples/transforms/global/build.xml
----------------------------------------------------------------------
diff --git a/src/examples/transforms/global/build.xml b/src/examples/transforms/global/build.xml
index 5bc8409..66d16c3 100644
--- a/src/examples/transforms/global/build.xml
+++ b/src/examples/transforms/global/build.xml
@@ -21,7 +21,7 @@
-->
<project name="groovy-global-ast-transformation-example" default="jar-transform">
- <!-- groovy-all .jar is assumed to be on your classpath. -->
+ <!-- necessary groovy jars are assumed to be on your classpath. -->
<taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" />
<target name="init" description="cleanup old class files">
http://git-wip-us.apache.org/repos/asf/groovy/blob/a5396650/src/examples/transforms/local/build.xml
----------------------------------------------------------------------
diff --git a/src/examples/transforms/local/build.xml b/src/examples/transforms/local/build.xml
index b66a3ad..eef390a 100644
--- a/src/examples/transforms/local/build.xml
+++ b/src/examples/transforms/local/build.xml
@@ -21,7 +21,7 @@
-->
<project name="groovy-local-ast-transformation-example" default="compile-transform">
- <!-- groovy-all .jar is assumed to be on your classpath. -->
+ <!-- necessary groovy jars are assumed to be on your classpath. -->
<taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" />
http://git-wip-us.apache.org/repos/asf/groovy/blob/a5396650/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java
index d54e575..7abe713 100644
--- a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java
+++ b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java
@@ -583,9 +583,9 @@ public class Groovy extends Java {
if (groovyHome == null) {
throw new IllegalStateException("Neither ${groovy.home} nor GROOVY_HOME defined.");
}
- File jarDir = new File(groovyHome, "embeddable");
+ File jarDir = new File(groovyHome, "lib");
if (!jarDir.exists()) {
- throw new IllegalStateException("GROOVY_HOME incorrectly defined. No embeddable directory found in: " + groovyHome);
+ throw new IllegalStateException("GROOVY_HOME incorrectly defined. No lib directory found in: " + groovyHome);
}
final File[] files = jarDir.listFiles();
for (File file : files) {
http://git-wip-us.apache.org/repos/asf/groovy/blob/a5396650/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java
index 8c57bcc..3613b5e 100644
--- a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java
+++ b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java
@@ -71,8 +71,8 @@ import java.util.StringTokenizer;
* <property name="groovy.home" value="/Path/To/Groovy"/>
* <property name="groovy.version" value="X.Y.Z"/>
* <path id="groovy.classpath">
- * <fileset dir="${groovy.home}/embeddable">
- * <include name="groovy-all-${groovy.version}.jar" />
+ * <fileset dir="${groovy.home}/lib">
+ * <include name="groovy-*${groovy.version}.jar" />
* </fileset>
* </path>
* <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="groovy.classpath"/>
@@ -135,8 +135,8 @@ import java.util.StringTokenizer;
* <property name="groovy.version" value="X.Y.Z"/>
*
* <path id="groovy.classpath">
- * <fileset dir="${groovy.home}/embeddable">
- * <include name="groovy-all-${groovy.version}.jar" />
+ * <fileset dir="${groovy.home}/lib">
+ * <include name="groovy-*${groovy.version}.jar" />
* </fileset>
* </path>
*
http://git-wip-us.apache.org/repos/asf/groovy/blob/a5396650/subprojects/groovy-ant/src/spec/doc/groovy-ant-task.adoc
----------------------------------------------------------------------
diff --git a/subprojects/groovy-ant/src/spec/doc/groovy-ant-task.adoc b/subprojects/groovy-ant/src/spec/doc/groovy-ant-task.adoc
index d3261ad..9dfcd16 100644
--- a/subprojects/groovy-ant/src/spec/doc/groovy-ant-task.adoc
+++ b/subprojects/groovy-ant/src/spec/doc/groovy-ant-task.adoc
@@ -216,7 +216,7 @@ Calling out to a web service from your Ant script:
<target name="main">
<taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy">
<classpath>
- <fileset dir="${env.GROOVY_HOME}" includes="embeddable/groovy-all-*.jar,lib/ivy*.jar"/>
+ <fileset dir="${env.GROOVY_HOME}" includes="lib/groovy-*.jar,lib/ivy*.jar"/>
</classpath>
</taskdef>
<groovy>
http://git-wip-us.apache.org/repos/asf/groovy/blob/a5396650/subprojects/groovy-groovydoc/src/spec/doc/groovydoc.adoc
----------------------------------------------------------------------
diff --git a/subprojects/groovy-groovydoc/src/spec/doc/groovydoc.adoc b/subprojects/groovy-groovydoc/src/spec/doc/groovydoc.adoc
index 16c05de..04b481b 100644
--- a/subprojects/groovy-groovydoc/src/spec/doc/groovydoc.adoc
+++ b/subprojects/groovy-groovydoc/src/spec/doc/groovydoc.adoc
@@ -80,9 +80,9 @@ The `groovydoc` Ant task allows generating groovydocs from an Ant build.
[[ThegroovydocAnttask-Requiredtaskdef]]
=== Required taskdef
-Assuming `groovy-all-{groovyversion}.jar` is in _my.classpath_ you will need to
-declare this task at some point in the build.xml prior to the groovydoc
-task being invoked.
+Assuming all the groovy jars you need are in _my.classpath_ (this will be `groovy-VERSION.jar`,
+`groovy-ant-VERSION.jar`, `groovy-groovydoc-VERSION.jar` plus any modules and transitive dependencies you might be using)
+you will need to declare this task at some point in the build.xml prior to the groovydoc task being invoked.
[source,xml]
-----------------------------------------------------------
[2/2] groovy git commit: GROOVY-8696: TypeWrapper leaks out of
DecompiledClassNode (closes #773)
Posted by pa...@apache.org.
GROOVY-8696: TypeWrapper leaks out of DecompiledClassNode (closes #773)
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/4429b3c4
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/4429b3c4
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/4429b3c4
Branch: refs/heads/GROOVY_2_5_X
Commit: 4429b3c4a59e91d8b7413a0a401416ff68ac5766
Parents: a539665
Author: Paul King <pa...@asert.com.au>
Authored: Wed Jul 11 20:44:29 2018 +1000
Committer: Paul King <pa...@asert.com.au>
Committed: Wed Jul 25 16:01:15 2018 +1000
----------------------------------------------------------------------
.../groovy/ast/decompiled/MemberSignatureParser.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/4429b3c4/src/main/java/org/codehaus/groovy/ast/decompiled/MemberSignatureParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/ast/decompiled/MemberSignatureParser.java b/src/main/java/org/codehaus/groovy/ast/decompiled/MemberSignatureParser.java
index 6627c85..54f972f 100644
--- a/src/main/java/org/codehaus/groovy/ast/decompiled/MemberSignatureParser.java
+++ b/src/main/java/org/codehaus/groovy/ast/decompiled/MemberSignatureParser.java
@@ -117,8 +117,12 @@ class MemberSignatureParser {
result = new ConstructorNode(method.accessModifiers, parameters, exceptions, null);
} else {
result = new MethodNode(method.methodName, method.accessModifiers, returnType[0], parameters, exceptions, null);
- if (method.annotationDefault != null) {
- result.setCode(new ReturnStatement(new ConstantExpression(method.annotationDefault)));
+ Object annDefault = method.annotationDefault;
+ if (annDefault != null) {
+ if (annDefault instanceof TypeWrapper) {
+ annDefault = resolver.resolveType(Type.getType(((TypeWrapper) annDefault).desc));
+ }
+ result.setCode(new ReturnStatement(new ConstantExpression(annDefault)));
result.setAnnotationDefault(true);
} else {
// Seems wrong but otherwise some tests fail (e.g. TestingASTTransformsTest)