Skip to content

Instantly share code, notes, and snippets.

@nahi
Created April 9, 2012 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nahi/2342386 to your computer and use it in GitHub Desktop.
Save nahi/2342386 to your computer and use it in GitHub Desktop.
% ant clean install -DskipTests=true -DuseIndy=true
Buildfile: /home/nahi/git/groovy-git/build.xml
Trying to override old definition of task javac
clean:
[delete] Deleting directory /home/nahi/git/groovy-git/target
-excludeLegacyAntVersion:
-checkAntVersion:
-banner:
[echo] Java Runtime Environment version: 1.7.0_03
[echo] Java Runtime Environment vendor: Oracle Corporation
[echo] Ant version: Apache Ant(TM) version 1.8.2 compiled on August 19 2011
[echo] Operating system name: Linux
[echo] Operating system architecture: amd64
[echo] Operating system version: 3.0.0-17-generic
[echo] Base directory: /home/nahi/git/groovy-git
[echo] Java Home: /home/nahi/java/jdk1.7.0_03/jre
[echo] Compilation using invokedynamic: true
-initializeReports:
[mkdir] Created dir: /home/nahi/git/groovy-git/target/reports
-mavenTaskdef:
-mavenPomDefinitions:
[xslt] Processing /home/nahi/git/groovy-git/pom.xml to /home/nahi/git/groovy-git/target/groovy-all.pom
[xslt] Loading stylesheet /home/nahi/git/groovy-git/config/maven/groovy-all.xsl
-mavenInit:
-mavenFetchAllModules:
-copyLibraries:
[mkdir] Created dir: /home/nahi/git/groovy-git/target/lib/compile
[copy] Copying 19 files to /home/nahi/git/groovy-git/target/lib/compile
[mkdir] Created dir: /home/nahi/git/groovy-git/target/lib/runtime
[copy] Copying 25 files to /home/nahi/git/groovy-git/target/lib/runtime
[mkdir] Created dir: /home/nahi/git/groovy-git/target/lib/test
[copy] Copying 38 files to /home/nahi/git/groovy-git/target/lib/test
[mkdir] Created dir: /home/nahi/git/groovy-git/target/lib/tools
[copy] Copying 16 files to /home/nahi/git/groovy-git/target/lib/tools
[mkdir] Created dir: /home/nahi/git/groovy-git/target/lib/examples
[copy] Copying 4 files to /home/nahi/git/groovy-git/target/lib/examples
-definePathsWithoutCopyingLibraries:
-fetchDependencies:
-init:
ensureGrammars:
[antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
[antlr] ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
[antlr] /home/nahi/git/groovy-git/src/main/org/codehaus/groovy/antlr/java/java.g:999: warning:Syntactic predicate superfluous for single alternative
[antlr] /home/nahi/git/groovy-git/src/main/org/codehaus/groovy/antlr/java/java.g:1455: warning:empty alternative makes no sense in (...)* or (...)+
-jvm14BuildWarning:
-buildVersionCheck:
stagedcompile:
[mkdir] Created dir: /home/nahi/git/groovy-git/target/classes
[mkdir] Created dir: /home/nahi/git/groovy-git/target/tools-classes
[mkdir] Created dir: /home/nahi/git/groovy-git/target/classes/META-INF
[javac] Compiling 875 source files to /home/nahi/git/groovy-git/target/classes
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 warning
[java] Saved 1090 dgm records to: target/classes/META-INF/dgminfo
-stagedcompile-indy:
[javac] Compiling 3 source files to /home/nahi/git/groovy-git/target/classes
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5
[javac] 1 warning
-initGroovyc:
-stagedcompile-groovy:
[groovyc] Compiling 183 source files to /home/nahi/git/groovy-git/target/classes
[groovyc] warning: [options] bootstrap class path not set in conjunction with -source 1.5
[groovyc] Note: Some input files use unchecked or unsafe operations.
[groovyc] Note: Recompile with -Xlint:unchecked for details.
[groovyc] 1 warning
-includeGroovyDocTemplates:
[copy] Copying 16 files to /home/nahi/git/groovy-git/target/classes
-includeResources:
[copy] Copying 47 files to /home/nahi/git/groovy-git/target/classes
-includeReleaseInfo:
[copy] Copying 1 file to /home/nahi/git/groovy-git/target/classes/META-INF
compileMain:
compileTestOnly:
compileTest:
-initCoverage:
-coberturaInit:
-coverageInstrument:
-initHeadless:
-testInit:
-initGroovyc:
-testOne:
-collect15tests:
-collect16tests:
-collectOptionalTests:
-testAll:
-coverageReport:
-reportTestFailed:
test:
-makeManifest:
[copy] Copying 1 file to /home/nahi/git/groovy-git/target/classes/META-INF
-initializeJars:
[mkdir] Created dir: /home/nahi/git/groovy-git/target/dist
-createBaseJar:
[jar] Building jar: /home/nahi/git/groovy-git/target/dist/groovy.jar
[jar] Building jar: /home/nahi/git/groovy-git/target/dist/groovy-2.0.0-beta-3-SNAPSHOT-sources.jar
-jarjarInit:
-actuallyCreateEmbeddableJar:
[mkdir] Created dir: /home/nahi/git/groovy-git/target/staging
[unzip] Expanding: /home/nahi/git/groovy-git/target/lib/runtime/antlr-2.7.7.jar into /home/nahi/git/groovy-git/target/staging
[unzip] Expanding: /home/nahi/git/groovy-git/target/lib/runtime/asm-4.0.jar into /home/nahi/git/groovy-git/target/staging
[unzip] Expanding: /home/nahi/git/groovy-git/target/lib/runtime/asm-commons-4.0.jar into /home/nahi/git/groovy-git/target/staging
[unzip] Expanding: /home/nahi/git/groovy-git/target/lib/runtime/asm-tree-4.0.jar into /home/nahi/git/groovy-git/target/staging
[unzip] Expanding: /home/nahi/git/groovy-git/target/lib/runtime/asm-util-4.0.jar into /home/nahi/git/groovy-git/target/staging
[unzip] Expanding: /home/nahi/git/groovy-git/target/dist/groovy.jar into /home/nahi/git/groovy-git/target/staging
[copy] Copying 3 files to /home/nahi/git/groovy-git/target/staging/META-INF
[unzip] Expanding: /home/nahi/git/groovy-git/target/lib/runtime/commons-cli-1.2.jar into /home/nahi/git/groovy-git/target/staging
[jarjar] Building jar: /home/nahi/git/groovy-git/target/dist/groovy-all.jar
BUILD FAILED
/home/nahi/git/groovy-git/build.xml:630: java.lang.ArrayIndexOutOfBoundsException: 2560
at com.tonicsystems.jarjar.asm.ClassReader.readClass(Unknown Source)
at com.tonicsystems.jarjar.asm.ClassReader.accept(Unknown Source)
at com.tonicsystems.jarjar.asm.ClassReader.accept(Unknown Source)
at com.tonicsystems.jarjar.ext_util.JarTransformer.process(JarTransformer.java:35)
at com.tonicsystems.jarjar.ext_util.JarProcessorChain.process(JarProcessorChain.java:31)
at com.tonicsystems.jarjar.MainProcessor.process(MainProcessor.java:80)
at com.tonicsystems.jarjar.ext_util.AntJarProcessor.zipFile(AntJarProcessor.java:70)
at org.apache.tools.ant.taskdefs.Zip.zipFile(Zip.java:1886)
at org.apache.tools.ant.taskdefs.Zip.addResources(Zip.java:944)
at org.apache.tools.ant.taskdefs.Zip.addResources(Zip.java:1064)
at org.apache.tools.ant.taskdefs.Zip.executeMain(Zip.java:664)
at org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:568)
at com.tonicsystems.jarjar.ext_util.AntJarProcessor.execute(AntJarProcessor.java:51)
at com.tonicsystems.jarjar.JarJarTask.execute(JarJarTask.java:49)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Total time: 1 minute 10 seconds
zsh: exit 1 ant clean install -DskipTests=true -DuseIndy=true
%
@glaforge
Copy link

It's related to our current problems with the jarjar tool, which allows us to bundle some key dependencies (ASM and Antlr) within the Groovy JAR to avoid classpath clashes issues.
The target directory should at least contain the groovy.jar, as the groovy-all.jar couldn't be created because of this problem.
Perhaps you could try to use that groovy.jar, add the asm 4 jar, as well as the antlr 2.7.x jar, and see if you can somehow run the benchmark with that?
Also, when compiling your groovy benchmark, compile the groovy script with the -indy flag, so that it's using the invoke dynamic bytecode.
And of course, this should be done on JDK 7.

@glaforge
Copy link

Actually, we have a -DskipEmbeddable=true flag you can use to build successfully, bypassing the "jarjar"-ing of the Groovy JAR.

@glaforge
Copy link

Given a successful build, pick up the various asm-*-4.0.jar and the antlr-2.7.7.jar on your classpath.

@nobeans
Copy link

nobeans commented Apr 11, 2012

Hi guillaume,

ok, the workaround for the issue of failing jarjar task was already found. I'm trying to run a benchmark with my hand-made groovy-all.jar.

https://gist.github.com/2337510#gistcomment-245494

It seemed just failing to make jar file, so I tried to do "cd target/staging; jar cvf groovy-all.jar." It succeeded and I could do benchmark with the jar file.

(to be continued on https://gist.github.com/2337510)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment