How to compile xtend in command line, or ant, or maven

1,611 views
Skip to first unread message

Freewind

unread,
Jun 29, 2012, 10:37:51 AM6/29/12
to xtend...@googlegroups.com
I did some search but only found a xtend-maven-plugin. I also want to know how to compile xtend in:

1. command line
2. ant
3. maven(again)

Is there any detailed information about this?

Sven Efftinge

unread,
Jun 30, 2012, 12:50:52 PM6/30/12
to xtend...@googlegroups.com
Only very detailed (in form of code).
You'll need the lib org.eclipse.xtend.standalone:2.3.0 and 
the main entry point is in org.eclipse.xtend.core.compiler.batch.Main.main(String[])

Usage: Main <options> <source directories>
where possible options include:
-d <directory>             Specify where to place generated xtend files
-tp <path>                 Temp directory to hold generated stubs and classes
-cp <path>                 Specify where to find user class files
-encoding <encoding>       Specify character encoding used by source files

Bernd K.

unread,
Apr 29, 2014, 12:08:10 PM4/29/14
to xtend...@googlegroups.com
Am Samstag, 30. Juni 2012 18:50:52 UTC+2 schrieb Sven Efftinge:

Only very detailed (in form of code).
You'll need the lib org.eclipse.xtend.standalone:2.3.0 and 
the main entry point is in org.eclipse.xtend.core.compiler.batch.Main.main(String[])

Usage: Main <options> <source directories>
where possible options include:
-d <directory>             Specify where to place generated xtend files
-tp <path>                 Temp directory to hold generated stubs and classes
-cp <path>                 Specify where to find user class files
-encoding <encoding>       Specify character encoding used by source files

It seems things have been moved elsewhere since 2.3.0 and the above standalone does not exist anymore. I'm trying (for hours now without success) to implant some Xtend compiling into an existing gradle build script but since I am neither an expert in gradle nor in Xtrend I cannot figure out how to invoke the compiler. I think I have found how to define a gradle task that runs immediately before the Java compiler is invoked but I have not the slightest idea where to find and how to invoke the Xtend compiler.

-Bernd

Stefan Oehme

unread,
Apr 30, 2014, 2:47:56 AM4/30/14
to xtend...@googlegroups.com
Don't write it yourself, just use the Xtend Gradle plugin

The main class has moved to org.eclipse.xtend.core. That package also contains an Ant task.

Bernd K.

unread,
Apr 30, 2014, 7:56:53 AM4/30/14
to xtend...@googlegroups.com
Am Mittwoch, 30. April 2014 08:47:56 UTC+2 schrieb Stefan Oehme:
Don't write it yourself, just use the Xtend Gradle plugin

Intemittendly I had tried to use it but then after compiling I got a strange error about not being able to inject some debugging information, my lack of deep gradle knowledge prevented me from tracking down what exactly happened, and what exactly it was trying to do or what was missing.

I'm going to reconstruct it later and post the exact error message.

 
The main class has moved to org.eclipse.xtend.core. That package also contains an Ant task.

I have almost succeeded with my manual invocation of the compiler. My project consists of multiple projects, a "core" subproject that is the only one that actually contains any Xtend code and a "desktop" subproject with a thin Java wrapper to execute the "core" code and also an "android" subproject, also with a thin wrapper that executes the code from "core". The project structure was autogenerated by the libgdx new empty project wizard, it contains a root gradle.build with all dependencies and some general stuff and separate build.gradle inside each sub project.

the build.gradle from my subproject "core" now looks like this:

apply plugin: "java"

sourceCompatibility = 1.6

sourceSets.main.java.srcDirs = [ "src/", "xtend-gen/" ]

eclipse.project {
    name = appName + "-core"
    natures 'org.eclipse.xtext.ui.shared.xtextNature'
    buildCommand 'org.eclipse.xtext.ui.shared.xtextBuilder'
}

configurations {
    xtendcompiler
}

dependencies {
    compile "org.eclipse.xtend:org.eclipse.xtend.lib:$xtendVersion"
    xtendcompiler "org.eclipse.xtend:org.eclipse.xtend.core:$xtendVersion"
}

task compileXtend(type: JavaExec) {
    dependsOn JavaPlugin.PROCESS_RESOURCES_TASK_NAME
    main = "org.eclipse.xtend.core.compiler.batch.Main"
    classpath = configurations.xtendcompiler + configurations.compile
    args "-d", "xtend-gen", "-cp", classpath.asPath, "src"
}

compileJava {
    dependsOn compileXtend
}

clean << {
    delete "xtend-gen"
}

This seems to work, only drawback is it cannot detect that the java files have already been generated, it will start the xtend compiler every time, even if not needed at all. One strange thing I observed with the above code is that it produces some warnings I could not find any information about when googling for the warning messages:


--($)-- ./gradlew core:build
:core:processResources UP-TO-DATE
:core:compileXtend
0    [main] WARN  pes.access.impl.DeclaredTypeFactory  - --- xtext.common.types ---------------------------------------------------
0 [main] WARN org.eclipse.xtext.common.types.access.impl.DeclaredTypeFactory  - --- xtext.common.types ---------------------------------------------------
1    [main] WARN  pes.access.impl.DeclaredTypeFactory  - ASM library is too old. Falling back to java.lang.reflect API.
1 [main] WARN org.eclipse.xtext.common.types.access.impl.DeclaredTypeFactory  - ASM library is too old. Falling back to java.lang.reflect API.
1    [main] WARN  pes.access.impl.DeclaredTypeFactory  - Please note that no information about compile time constants is available.
1 [main] WARN org.eclipse.xtext.common.types.access.impl.DeclaredTypeFactory  - Please note that no information about compile time constants is available.
1    [main] WARN  pes.access.impl.DeclaredTypeFactory  - It's recommended to use org.objectweb.asm 5.0.1 or better.
1 [main] WARN org.eclipse.xtext.common.types.access.impl.DeclaredTypeFactory  - It's recommended to use org.objectweb.asm 5.0.1 or better.
1    [main] WARN  pes.access.impl.DeclaredTypeFactory  - --------------------------------------------------------------------------
1 [main] WARN org.eclipse.xtext.common.types.access.impl.DeclaredTypeFactory  - --------------------------------------------------------------------------
4872 [main] INFO  e.compiler.batch.XtendBatchCompiler  - Compiling 6 source files to xtend-gen
4872 [main] INFO org.eclipse.xtend.core.compiler.batch.XtendBatchCompiler  - Compiling 6 source files to xtend-gen
:core:compileJava UP-TO-DATE
:core:classes UP-TO-DATE
:core:jar UP-TO-DATE
:core:assemble UP-TO-DATE
:core:compileTestJava UP-TO-DATE
:core:processTestResources UP-TO-DATE
:core:testClasses UP-TO-DATE
:core:test UP-TO-DATE
:core:check UP-TO-DATE
:core:build UP-TO-DATE

BUILD SUCCESSFUL

Total time: 23.401 secs



I could not find "org.objectweb.asm" version 5.0.1 or better on the mavencentral repository, only some 3.3 versions from many years ago but it seems the Xtend compiler has pulled in these dependencies already anyways, at least I can find them in my gradle cache and they are on the classpath for the xtend compiler.

 I'm going to try the plugin you mentioned one more time later and try to reproduce the error I got with it and post it here.

Stefan Oehme

unread,
Apr 30, 2014, 8:12:42 AM4/30/14
to xtend...@googlegroups.com
The debug information is not some Gradle specific thing. It's part of Xtend so you can acutally debug your Xtend code. Please attach the stack trace, we really need feedback to improve the plugin.

The plugin also correctly handles dirty checking, so the Xtend compiler will not be triggered every time. That's why I said "don't do it yourself". Its harder than it looks ;)

The ASM warnings are there because we migrated to ASM 5 and Gradle has ASM 4 on the classpath by default. The new ASM version are on Central under the groupId "org.ow2.asm"


--
You received this message because you are subscribed to a topic in the Google Groups "Xtend Programming Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xtend-lang/Hgjm3ov-R54/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xtend-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bernd K.

unread,
Apr 30, 2014, 8:52:48 AM4/30/14
to xtend...@googlegroups.com
Now I'm just trying to use the plugin again and here is the error message again:


./gradlew core:build

:core:compileXtend
0    [main] WARN  pes.access.impl.DeclaredTypeFactory  - --- xtext.common.types ---------------------------------------------------
0 [main] WARN org.eclipse.xtext.common.types.access.impl.DeclaredTypeFactory  - --- xtext.common.types ---------------------------------------------------
1    [main] WARN  pes.access.impl.DeclaredTypeFactory  - ASM library is too old. Falling back to java.lang.reflect API.
1 [main] WARN org.eclipse.xtext.common.types.access.impl.DeclaredTypeFactory  - ASM library is too old. Falling back to java.lang.reflect API.
1    [main] WARN  pes.access.impl.DeclaredTypeFactory  - Please note that no information about compile time constants is available.
1 [main] WARN org.eclipse.xtext.common.types.access.impl.DeclaredTypeFactory  - Please note that no information about compile time constants is available.
1    [main] WARN  pes.access.impl.DeclaredTypeFactory  - It's recommended to use org.objectweb.asm 5.0.1 or better.
1 [main] WARN org.eclipse.xtext.common.types.access.impl.DeclaredTypeFactory  - It's recommended to use org.objectweb.asm 5.0.1 or better.
1    [main] WARN  pes.access.impl.DeclaredTypeFactory  - --------------------------------------------------------------------------
1 [main] WARN org.eclipse.xtext.common.types.access.impl.DeclaredTypeFactory  - --------------------------------------------------------------------------
4796 [main] INFO  e.compiler.batch.XtendBatchCompiler  - Compiling 6 source files to /home/bernd/proj/gdx_kompass/core/src/main/xtend-gen
4796 [main] INFO org.eclipse.xtend.core.compiler.batch.XtendBatchCompiler  - Compiling 6 source files to /home/bernd/proj/gdx_kompass/core/src/main/xtend-gen
:core:compileJava UP-TO-DATE
:core:installMainXtendDebugInfo
Exception in thread "main" java.lang.NoClassDefFoundError: org/objectweb/asm/commons/EmptyVisitor
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at org.xtend.enhance.batch.ClassFileDebugSourceExtractor.getDebugSourceFileName(ClassFileDebugSourceExtractor.java:24)
        at org.xtend.enhance.batch.XtendDebugInfoInstaller.createTraceToClassFileMap(XtendDebugInfoInstaller.java:143)
        at org.xtend.enhance.batch.XtendDebugInfoInstaller.installDebugInfo(XtendDebugInfoInstaller.java:91)
        at org.xtend.enhance.batch.Main.main(Main.java:35)
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.commons.EmptyVisitor
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        ... 16 more
:core:installMainXtendDebugInfo FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':core:installMainXtendDebugInfo'.
> Installing debug information failed

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 27.845 secs


Additionally there is also some strange inconsistency in the folder structure: My source folder structure is meant to be as follows (and this also seems to be the eclipse default and the default for the eclipse xtend-plugin):

project/
 +- src/
 +- xtend-gen


Now when using the plugin its seems to detect my sources in src/ just fine but it produces a strange placement for the xtend-gen folder. Now it looks like this:

project/
 +- src/
     +- main/
         +- xtend-gen/

I have no idea where the "main" folder comes from, is it hardcoded? I didn't specify such a folder path anywhere in my build scripts. This will probably mess up my eclipse configuration where the exclipse xtend plugin will try to place the xtend-gen next to the src folder and not as a subfolder within it. How do I configure these paths?

-Bernd

Stefan Oehme

unread,
Apr 30, 2014, 10:05:31 AM4/30/14
to xtend...@googlegroups.com

Thanks for the report. The ASM issue has been fixed in master and I'll look into the folder issue as soon as I can. I'll get back to you when I've released a new version.

--

Stefan Oehme

unread,
May 1, 2014, 3:17:57 PM5/1/14
to xtend...@googlegroups.com
I have just published version 0.0.5. It should be on Central in a few hours. It fixes your problems, but will only work with Xtend 2.5.4 and above due to the breaking changes in ASM 5.
To unsubscribe from this group and all its topics, send an email to xtend-lang+unsubscribe@googlegroups.com.

Bernd K.

unread,
May 2, 2014, 7:24:04 AM5/2/14
to xtend...@googlegroups.com


Am Donnerstag, 1. Mai 2014 21:17:57 UTC+2 schrieb Stefan Oehme:
I have just published version 0.0.5. It should be on Central in a few hours. It fixes your problems, but will only work with Xtend 2.5.4 and above due to the breaking changes in ASM 5.

I just tried it and it still does not work:

./gradlew core:build
:core:compileXtend UP-TO-DATE

:core:compileJava UP-TO-DATE
:core:installMainXtendDebugInfo
Exception in thread "main" java.lang.IncompatibleClassChangeError: class org.xtend.enhance.batch.ClassFileDebugSourceExtractor$Visitor has interface org.objectweb.asm.ClassVisitor as super class

        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at org.xtend.enhance.batch.ClassFileDebugSourceExtractor.getDebugSourceFileName(ClassFileDebugSourceExtractor.java:29)

        at org.xtend.enhance.batch.XtendDebugInfoInstaller.createTraceToClassFileMap(XtendDebugInfoInstaller.java:143)
        at org.xtend.enhance.batch.XtendDebugInfoInstaller.installDebugInfo(XtendDebugInfoInstaller.java:91)
        at org.xtend.enhance.batch.Main.main(Main.java:35)
:core:installMainXtendDebugInfo FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':core:installMainXtendDebugInfo'.
> Installing debug information failed

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 13.65 secs

Bernd K.

unread,
May 2, 2014, 8:04:50 AM5/2/14
to xtend...@googlegroups.com
If this is of any help I have removed my entire ~/.gradle folder and started a clean build to see what jars its pulling in, unfortunately I don't know how to determine which plugin is responsible for which dependency.

rm -rf ~/.gradle/

./gradlew clean core:build
Downloading http://services.gradle.org/distributions/gradle-1.11-all.zip
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping /home/bernd/.gradle/wrapper/dists/gradle-1.11-all/7qd8qq8te5j4f5q9aaei3gh3lj/gradle-1.11-all.zip to /home/bernd/.gradle/wrapper/dists/gradle-1.11-all/7qd8qq8te5j4f5q9aaei3gh3lj
Set executable permissions for: /home/bernd/.gradle/wrapper/dists/gradle-1.11-all/7qd8qq8te5j4f5q9aaei3gh3lj/gradle-1.11/bin/gradle
Download http://repo1.maven.org/maven2/com/android/tools/build/gradle/0.9.2/gradle-0.9.2.pom
Download http://repo1.maven.org/maven2/org/xtend/xtend-gradle-plugin/0.0.5/xtend-gradle-plugin-0.0.5.pom
Download http://repo1.maven.org/maven2/com/android/tools/build/builder/0.9.2/builder-0.9.2.pom
Download http://repo1.maven.org/maven2/com/android/tools/lint/lint/22.7.2/lint-22.7.2.pom
Download http://repo1.maven.org/maven2/net/sf/proguard/proguard-gradle/4.10/proguard-gradle-4.10.pom
Download http://repo1.maven.org/maven2/net/sf/proguard/proguard-parent/4.10/proguard-parent-4.10.pom
Download http://repo1.maven.org/maven2/com/android/tools/build/gradle/0.8.3/gradle-0.8.3.pom
Download http://repo1.maven.org/maven2/com/martiansoftware/nailgun-server/0.9.1/nailgun-server-0.9.1.pom
Download http://repo1.maven.org/maven2/com/martiansoftware/nailgun-all/0.9.1/nailgun-all-0.9.1.pom
Download http://repo1.maven.org/maven2/com/android/tools/build/builder-model/0.9.2/builder-model-0.9.2.pom
Download http://repo1.maven.org/maven2/com/android/tools/sdk-common/22.7.2/sdk-common-22.7.2.pom
Download http://repo1.maven.org/maven2/com/android/tools/build/manifest-merger/22.7.2/manifest-merger-22.7.2.pom
Download http://repo1.maven.org/maven2/com/android/tools/ddms/ddmlib/22.7.2/ddmlib-22.7.2.pom
Download http://repo1.maven.org/maven2/com/android/tools/sdklib/22.7.2/sdklib-22.7.2.pom
Download http://repo1.maven.org/maven2/com/squareup/javawriter/2.2.1/javawriter-2.2.1.pom
Download http://repo1.maven.org/maven2/com/android/tools/build/builder-test-api/0.9.2/builder-test-api-0.9.2.pom
Download http://repo1.maven.org/maven2/com/android/tools/common/22.7.2/common-22.7.2.pom
Download http://repo1.maven.org/maven2/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.pom
Download http://repo1.maven.org/maven2/com/android/tools/lint/lint-checks/22.7.2/lint-checks-22.7.2.pom
Download http://repo1.maven.org/maven2/org/eclipse/jdt/core/compiler/ecj/4.2.2/ecj-4.2.2.pom
Download http://repo1.maven.org/maven2/net/sf/proguard/proguard-base/4.10/proguard-base-4.10.pom
Download http://repo1.maven.org/maven2/kxml2/kxml2/2.3.0/kxml2-2.3.0.pom
Download http://repo1.maven.org/maven2/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.pom
Download http://repo1.maven.org/maven2/com/android/tools/layoutlib/layoutlib-api/22.7.2/layoutlib-api-22.7.2.pom
Download http://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.pom
Download http://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.1.1/httpcomponents-client-4.1.1.pom
Download http://repo1.maven.org/maven2/org/apache/httpcomponents/project/4.1.1/project-4.1.1.pom
Download http://repo1.maven.org/maven2/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.pom
Download http://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.1/httpcomponents-client-4.1.pom
Download http://repo1.maven.org/maven2/com/android/tools/dvlib/22.7.2/dvlib-22.7.2.pom
Download http://repo1.maven.org/maven2/org/apache/commons/commons-compress/1.0/commons-compress-1.0.pom
Download http://repo1.maven.org/maven2/org/apache/commons/commons-parent/11/commons-parent-11.pom
Download http://repo1.maven.org/maven2/com/google/guava/guava/15.0/guava-15.0.pom
Download http://repo1.maven.org/maven2/com/google/guava/guava-parent/15.0/guava-parent-15.0.pom
Download http://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.pom
Download http://repo1.maven.org/maven2/com/android/tools/lint/lint-api/22.7.2/lint-api-22.7.2.pom
Download http://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/4.0/asm-analysis-4.0.pom
Download http://repo1.maven.org/maven2/org/ow2/asm/asm-parent/4.0/asm-parent-4.0.pom
Download http://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom
Download http://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1.pom
Download http://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-core/4.1/httpcomponents-core-4.1.pom
Download http://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom
Download http://repo1.maven.org/maven2/org/apache/commons/commons-parent/5/commons-parent-5.pom
Download http://repo1.maven.org/maven2/commons-codec/commons-codec/1.4/commons-codec-1.4.pom
Download http://repo1.maven.org/maven2/org/ow2/asm/asm/4.0/asm-4.0.pom
Download http://repo1.maven.org/maven2/com/android/tools/external/lombok/lombok-ast/0.2.2/lombok-ast-0.2.2.pom
Download http://repo1.maven.org/maven2/org/ow2/asm/asm-tree/4.0/asm-tree-4.0.pom
Download http://repo1.maven.org/maven2/com/android/tools/build/gradle/0.9.2/gradle-0.9.2.jar
Download http://repo1.maven.org/maven2/org/xtend/xtend-gradle-plugin/0.0.5/xtend-gradle-plugin-0.0.5.jar
Download http://repo1.maven.org/maven2/com/android/tools/build/builder/0.9.2/builder-0.9.2.jar
Download http://repo1.maven.org/maven2/com/android/tools/lint/lint/22.7.2/lint-22.7.2.jar
Download http://repo1.maven.org/maven2/net/sf/proguard/proguard-gradle/4.10/proguard-gradle-4.10.jar
Download http://repo1.maven.org/maven2/com/martiansoftware/nailgun-server/0.9.1/nailgun-server-0.9.1.jar
Download http://repo1.maven.org/maven2/com/android/tools/build/builder-model/0.9.2/builder-model-0.9.2.jar
Download http://repo1.maven.org/maven2/com/android/tools/sdk-common/22.7.2/sdk-common-22.7.2.jar
Download http://repo1.maven.org/maven2/com/android/tools/build/manifest-merger/22.7.2/manifest-merger-22.7.2.jar
Download http://repo1.maven.org/maven2/com/android/tools/ddms/ddmlib/22.7.2/ddmlib-22.7.2.jar
Download http://repo1.maven.org/maven2/com/android/tools/sdklib/22.7.2/sdklib-22.7.2.jar
Download http://repo1.maven.org/maven2/com/squareup/javawriter/2.2.1/javawriter-2.2.1.jar
Download http://repo1.maven.org/maven2/com/android/tools/build/builder-test-api/0.9.2/builder-test-api-0.9.2.jar
Download http://repo1.maven.org/maven2/com/android/tools/common/22.7.2/common-22.7.2.jar
Download http://repo1.maven.org/maven2/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.jar
Download http://repo1.maven.org/maven2/com/android/tools/lint/lint-checks/22.7.2/lint-checks-22.7.2.jar
Download http://repo1.maven.org/maven2/org/eclipse/jdt/core/compiler/ecj/4.2.2/ecj-4.2.2.jar
Download http://repo1.maven.org/maven2/net/sf/proguard/proguard-base/4.10/proguard-base-4.10.jar
Download http://repo1.maven.org/maven2/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar
Download http://repo1.maven.org/maven2/com/android/tools/layoutlib/layoutlib-api/22.7.2/layoutlib-api-22.7.2.jar
Download http://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.jar
Download http://repo1.maven.org/maven2/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.jar
Download http://repo1.maven.org/maven2/com/android/tools/dvlib/22.7.2/dvlib-22.7.2.jar
Download http://repo1.maven.org/maven2/org/apache/commons/commons-compress/1.0/commons-compress-1.0.jar
Download http://repo1.maven.org/maven2/com/google/guava/guava/15.0/guava-15.0.jar
Download http://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.jar
Download http://repo1.maven.org/maven2/com/android/tools/lint/lint-api/22.7.2/lint-api-22.7.2.jar
Download http://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/4.0/asm-analysis-4.0.jar
Download http://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1.jar
Download http://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
Download http://repo1.maven.org/maven2/commons-codec/commons-codec/1.4/commons-codec-1.4.jar
Download http://repo1.maven.org/maven2/org/ow2/asm/asm/4.0/asm-4.0.jar
Download http://repo1.maven.org/maven2/com/android/tools/external/lombok/lombok-ast/0.2.2/lombok-ast-0.2.2.jar
Download http://repo1.maven.org/maven2/org/ow2/asm/asm-tree/4.0/asm-tree-4.0.jar
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-platform/1.0.0/gdx-platform-1.0.0.pom
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-parent/1.0.0/gdx-parent-1.0.0.pom
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-box2d-platform/1.0.0/gdx-box2d-platform-1.0.0.pom
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-freetype-platform/1.0.0/gdx-freetype-platform-1.0.0.pom
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-platform/1.0.0/gdx-platform-1.0.0-natives-x86.jar
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-platform/1.0.0/gdx-platform-1.0.0-natives-armeabi.jar
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-platform/1.0.0/gdx-platform-1.0.0-natives-armeabi-v7a.jar
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-box2d-platform/1.0.0/gdx-box2d-platform-1.0.0-natives-armeabi.jar
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-box2d-platform/1.0.0/gdx-box2d-platform-1.0.0-natives-armeabi-v7a.jar
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-box2d-platform/1.0.0/gdx-box2d-platform-1.0.0-natives-x86.jar
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-freetype-platform/1.0.0/gdx-freetype-platform-1.0.0-natives-armeabi.jar
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-freetype-platform/1.0.0/gdx-freetype-platform-1.0.0-natives-armeabi-v7a.jar
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-freetype-platform/1.0.0/gdx-freetype-platform-1.0.0-natives-x86.jar
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-backend-android/1.0.0/gdx-backend-android-1.0.0.pom
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-box2d/1.0.0/gdx-box2d-1.0.0.pom
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-box2d-parent/1.0.0/gdx-box2d-parent-1.0.0.pom
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-freetype/1.0.0/gdx-freetype-1.0.0.pom
Download http://repo1.maven.org/maven2/org/eclipse/xtend/org.eclipse.xtend.lib/2.5.4/org.eclipse.xtend.lib-2.5.4.pom
Download http://repo1.maven.org/maven2/org/eclipse/xtext/org.eclipse.xtext.parent/2.5.4/org.eclipse.xtext.parent-2.5.4.pom
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx/1.0.0/gdx-1.0.0.pom
Download http://repo1.maven.org/maven2/org/eclipse/xtext/org.eclipse.xtext.xbase.lib/2.5.4/org.eclipse.xtext.xbase.lib-2.5.4.pom
Download http://repo1.maven.org/maven2/com/google/guava/guava/14.0/guava-14.0.pom
Download http://repo1.maven.org/maven2/com/google/guava/guava-parent/14.0/guava-parent-14.0.pom
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx/1.0.0/gdx-1.0.0.jar
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-box2d/1.0.0/gdx-box2d-1.0.0.jar
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-freetype/1.0.0/gdx-freetype-1.0.0.jar
Download http://repo1.maven.org/maven2/com/google/guava/guava/14.0/guava-14.0.jar
Download http://repo1.maven.org/maven2/org/eclipse/xtext/org.eclipse.xtext.xbase.lib/2.5.4/org.eclipse.xtext.xbase.lib-2.5.4.jar
Download http://repo1.maven.org/maven2/org/eclipse/xtend/org.eclipse.xtend.lib/2.5.4/org.eclipse.xtend.lib-2.5.4.jar
Download http://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx-backend-android/1.0.0/gdx-backend-android-1.0.0.jar
:android:clean UP-TO-DATE
:core:cleanCompileTestXtend UP-TO-DATE
:core:cleanCompileXtend
:core:clean
:desktop:clean UP-TO-DATE
:core:compileXtend
Download http://repo1.maven.org/maven2/org/eclipse/xtend/org.eclipse.xtend.core/2.5.4/org.eclipse.xtend.core-2.5.4.pom
Download http://repo1.maven.org/maven2/org/eclipse/xtext/org.eclipse.xtext.standalone.parent/2.5.4/org.eclipse.xtext.standalone.parent-2.5.4.pom
Download http://repo1.maven.org/maven2/org/xtend/xtend-gradle-lib/0.0.5/xtend-gradle-lib-0.0.5.pom
Download http://repo1.maven.org/maven2/org/eclipse/xtext/org.eclipse.xtext.xbase/2.5.4/org.eclipse.xtext.xbase-2.5.4.pom
Download http://repo1.maven.org/maven2/org/ow2/asm/asm-commons/5.0.2/asm-commons-5.0.2.pom
Download http://repo1.maven.org/maven2/org/ow2/asm/asm-parent/5.0.2/asm-parent-5.0.2.pom
Download http://repo1.maven.org/maven2/org/eclipse/xtext/org.eclipse.xtext/2.5.4/org.eclipse.xtext-2.5.4.pom
Download http://repo1.maven.org/maven2/org/eclipse/xtext/org.eclipse.xtext.common.types/2.5.4/org.eclipse.xtext.common.types-2.5.4.pom
Download http://repo1.maven.org/maven2/com/google/inject/guice/3.0/guice-3.0.pom
Download http://repo1.maven.org/maven2/com/google/inject/guice-parent/3.0/guice-parent-3.0.pom
Download http://repo1.maven.org/maven2/com/google/google/5/google-5.pom
Download http://repo1.maven.org/maven2/org/eclipse/emf/org.eclipse.emf.ecore/2.9.2-v20131212-0545/org.eclipse.emf.ecore-2.9.2-v20131212-0545.pom
Download http://repo1.maven.org/maven2/org/eclipse/emf/org.eclipse.emf.common/2.9.2-v20131212-0545/org.eclipse.emf.common-2.9.2-v20131212-0545.pom
Download http://repo1.maven.org/maven2/org/eclipse/emf/org.eclipse.emf.codegen/2.9.0-v20140203-1126/org.eclipse.emf.codegen-2.9.0-v20140203-1126.pom
Download http://repo1.maven.org/maven2/org/ow2/asm/asm-tree/5.0.2/asm-tree-5.0.2.pom
Download http://repo1.maven.org/maven2/org/eclipse/xtext/org.eclipse.xtext.dependencies/2.5.4/org.eclipse.xtext.dependencies-2.5.4.pom
Download http://repo1.maven.org/maven2/org/eclipse/emf/org.eclipse.emf.ecore.xmi/2.9.1-v20131212-0545/org.eclipse.emf.ecore.xmi-2.9.1-v20131212-0545.pom
Download http://repo1.maven.org/maven2/log4j/log4j/1.2.16/log4j-1.2.16.pom
Download http://repo1.maven.org/maven2/com/ibm/icu/icu4j/52.1/icu4j-52.1.pom
Download http://repo1.maven.org/maven2/org/antlr/antlr-runtime/3.2/antlr-runtime-3.2.pom
Download http://repo1.maven.org/maven2/org/antlr/antlr-master/3.2/antlr-master-3.2.pom
Download http://repo1.maven.org/maven2/javax/inject/javax.inject/1/javax.inject-1.pom
Download http://repo1.maven.org/maven2/aopalliance/aopalliance/1.0/aopalliance-1.0.pom
Download http://repo1.maven.org/maven2/org/sonatype/sisu/inject/cglib/2.2.1-v20090111/cglib-2.2.1-v20090111.pom
Download http://repo1.maven.org/maven2/org/sonatype/forge/forge-parent/6/forge-parent-6.pom
Download http://repo1.maven.org/maven2/asm/asm/3.1/asm-3.1.pom
Download http://repo1.maven.org/maven2/asm/asm-parent/3.1/asm-parent-3.1.pom
Download http://repo1.maven.org/maven2/org/ow2/asm/asm/5.0.2/asm-5.0.2.pom
Download http://repo1.maven.org/maven2/org/eclipse/xtend/org.eclipse.xtend.core/2.5.4/org.eclipse.xtend.core-2.5.4.jar
Download http://repo1.maven.org/maven2/org/xtend/xtend-gradle-lib/0.0.5/xtend-gradle-lib-0.0.5.jar
Download http://repo1.maven.org/maven2/org/eclipse/xtext/org.eclipse.xtext.xbase/2.5.4/org.eclipse.xtext.xbase-2.5.4.jar
Download http://repo1.maven.org/maven2/org/ow2/asm/asm-commons/5.0.2/asm-commons-5.0.2.jar
Download http://repo1.maven.org/maven2/org/eclipse/xtext/org.eclipse.xtext/2.5.4/org.eclipse.xtext-2.5.4.jar
Download http://repo1.maven.org/maven2/org/eclipse/xtext/org.eclipse.xtext.common.types/2.5.4/org.eclipse.xtext.common.types-2.5.4.jar
Download http://repo1.maven.org/maven2/com/google/inject/guice/3.0/guice-3.0.jar
Download http://repo1.maven.org/maven2/org/eclipse/emf/org.eclipse.emf.ecore/2.9.2-v20131212-0545/org.eclipse.emf.ecore-2.9.2-v20131212-0545.jar
Download http://repo1.maven.org/maven2/org/eclipse/emf/org.eclipse.emf.common/2.9.2-v20131212-0545/org.eclipse.emf.common-2.9.2-v20131212-0545.jar
Download http://repo1.maven.org/maven2/org/eclipse/emf/org.eclipse.emf.codegen/2.9.0-v20140203-1126/org.eclipse.emf.codegen-2.9.0-v20140203-1126.jar
Download http://repo1.maven.org/maven2/org/ow2/asm/asm-tree/5.0.2/asm-tree-5.0.2.jar
Download http://repo1.maven.org/maven2/org/eclipse/xtext/org.eclipse.xtext.dependencies/2.5.4/org.eclipse.xtext.dependencies-2.5.4.jar
Download http://repo1.maven.org/maven2/org/eclipse/emf/org.eclipse.emf.ecore.xmi/2.9.1-v20131212-0545/org.eclipse.emf.ecore.xmi-2.9.1-v20131212-0545.jar
Download http://repo1.maven.org/maven2/log4j/log4j/1.2.16/log4j-1.2.16.jar
Download http://repo1.maven.org/maven2/com/ibm/icu/icu4j/52.1/icu4j-52.1.jar
Download http://repo1.maven.org/maven2/org/antlr/antlr-runtime/3.2/antlr-runtime-3.2.jar
Download http://repo1.maven.org/maven2/javax/inject/javax.inject/1/javax.inject-1.jar
Download http://repo1.maven.org/maven2/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
Download http://repo1.maven.org/maven2/org/sonatype/sisu/inject/cglib/2.2.1-v20090111/cglib-2.2.1-v20090111.jar
Download http://repo1.maven.org/maven2/asm/asm/3.1/asm-3.1.jar
Download http://repo1.maven.org/maven2/org/ow2/asm/asm/5.0.2/asm-5.0.2.jar

0    [main] WARN  pes.access.impl.DeclaredTypeFactory  - --- xtext.common.types ---------------------------------------------------
1    [main] WARN  pes.access.impl.DeclaredTypeFactory  - ASM library is too old. Falling back to java.lang.reflect API.
1    [main] WARN  pes.access.impl.DeclaredTypeFactory  - Please note that no information about compile time constants is available.
1    [main] WARN  pes.access.impl.DeclaredTypeFactory  - It's recommended to use org.objectweb.asm 5.0.1 or better.
1    [main] WARN  pes.access.impl.DeclaredTypeFactory  - --------------------------------------------------------------------------
4793 [main] INFO  e.compiler.batch.XtendBatchCompiler  - Compiling 7 source files to /home/bernd/proj/gdx_kompass/core/src/main/xtend-gen
:core:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.6
Note: /home/bernd/proj/gdx_kompass/core/src/main/xtend-gen/prof7bit/kompass/Assets.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 warning
Total time: 5 mins 33.879 secs

Bernd K.

unread,
May 2, 2014, 9:42:46 AM5/2/14
to xtend...@googlegroups.com
Now I have put this into my buildscript{} section:


    configurations.all {
        resolutionStrategy.eachDependency { DependencyResolveDetails details ->
            println "requested: " + details.requested.group + " " + details.requested.name + " " + details.requested.version
            if (details.requested.group == 'com.android.tools.build' && details.requested.name == 'gradle') {
                details.useVersion '0.9.2'
                println "*** fixed android version"
            }
            if (details.requested.group == 'org.ow2.asm') {
                details.useVersion '5.0.2'
                println "*** fixed ow2 version"
            }
        }
    }

and this outputs the following:

requested: com.android.tools.build gradle 0.9.+
*** fixed android version
requested: org.xtend xtend-gradle-plugin 0.0.5
requested: com.android.tools.build builder 0.9.2
requested: com.android.tools.lint lint 22.7.2
requested: net.sf.proguard proguard-gradle 4.10
requested: com.android.tools.build gradle 0.8.+
*** fixed android version
requested: com.martiansoftware nailgun-server 0.9.1
requested: com.android.tools.build builder-model 0.9.2
requested: com.android.tools sdk-common 22.7.2
requested: com.android.tools.build manifest-merger 22.7.2
requested: com.android.tools.ddms ddmlib 22.7.2
requested: com.android.tools sdklib 22.7.2
requested: com.squareup javawriter 2.2.1
requested: com.android.tools.build builder-test-api 0.9.2
requested: com.android.tools common 22.7.2
requested: org.bouncycastle bcpkix-jdk15on 1.48
requested: com.android.tools.lint lint-checks 22.7.2
requested: org.eclipse.jdt.core.compiler ecj 4.2.2
requested: net.sf.proguard proguard-base 4.10
requested: kxml2 kxml2 2.3.0
requested: net.sf.kxml kxml2 2.3.0
requested: com.android.tools.layoutlib layoutlib-api 22.7.2
requested: org.apache.httpcomponents httpclient 4.1.1
requested: org.apache.httpcomponents httpmime 4.1
requested: com.android.tools dvlib 22.7.2
requested: org.apache.commons commons-compress 1.0
requested: com.google.guava guava 15.0
requested: org.bouncycastle bcprov-jdk15on 1.48
requested: com.android.tools.lint lint-api 22.7.2
requested: org.ow2.asm asm-analysis 4.0
*** fixed ow2 version
requested: org.apache.httpcomponents httpcore 4.1
requested: commons-logging commons-logging 1.1.1
requested: commons-codec commons-codec 1.4
requested: org.ow2.asm asm 4.0
*** fixed ow2 version
requested: com.android.tools.external.lombok lombok-ast 0.2.2
requested: org.ow2.asm asm-tree 4.0
*** fixed ow2 version
requested: org.ow2.asm asm-tree 5.0.2
*** fixed ow2 version
requested: org.ow2.asm asm 5.0.2
*** fixed ow2 version

:core:compileXtend UP-TO-DATE
:core:compileJava UP-TO-DATE
:core:installMainXtendDebugInfo
Exception in thread "main" java.lang.IncompatibleClassChangeError: class org.xtend.enhance.batch.ClassFileDebugSourceExtractor$Visitor has interface org.objectweb.asm.ClassVisitor as super class
[...]

still the same error, now I'm at my wit's end :-(

Stefan Oehme

unread,
May 2, 2014, 10:12:16 AM5/2/14
to xtend...@googlegroups.com

Any chances you could send me the project so I can debug it myself?

--
You received this message because you are subscribed to a topic in the Google Groups "Xtend Programming Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xtend-lang/Hgjm3ov-R54/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xtend-lang+...@googlegroups.com.
Message has been deleted

Bernd K.

unread,
May 2, 2014, 12:19:34 PM5/2/14
to xtend...@googlegroups.com
Am Freitag, 2. Mai 2014 16:12:16 UTC+2 schrieb Stefan Oehme:

Any chances you could send me the project so I can debug it myself?


Yes. Its just an experimental project to explore some possibilities, so its basically almost empty, I can openly post it:


-Bernd

Bernd K.

unread,
May 4, 2014, 8:18:42 AM5/4/14
to xtend...@googlegroups.com
Its even happening with the most minimal hello-world application I could come up with, no external dependencies at all, just one Main class implemented in xtend. See the attachment of this post.
xtend_hello.tar.xz

Stefan Oehme

unread,
May 5, 2014, 1:52:05 AM5/5/14
to xtend...@googlegroups.com
Okay, I've found the culprit:

Gradle does not support Maven's "optional" dependencies. Xtext transitively depends on Google Guice which has an optional depenendency on ASM 3. Depending on which one comes first on the classpath, the build passes or breaks. I have added an exclusion for the old ASM artifacts and will publish a new version right away.


2014-05-04 14:18 GMT+02:00 Bernd K. <prof...@gmail.com>:
Its even happening with the most minimal hello-world application I could come up with, no external dependencies at all, just one Main class implemented in xtend. See the attachment of this post.

--

Stefan Oehme

unread,
May 5, 2014, 2:08:02 AM5/5/14
to xtend...@googlegroups.com
Version 0.0.6 should be on Central within a few hours.

Bernd

unread,
May 5, 2014, 6:24:33 AM5/5/14
to xtend...@googlegroups.com
It still doesn't work :-(

check out this project:

git clone g...@github.com:prof7bit/wallet-key-tool.git

comment the last two lines in the build script which currently
completely disable the installMainXtendDebugInfo task and then try to
build it. It will fail (at least for me it does).

I have also tried with the minimal hello world example I posted
yesterday and its the same problem. Unzip it, change the version to
0.0.6 and then "./gradlew build", it won't work for me.

Is there anything I can do to influence the classpath for the xtend
plugin (or even just print it or display the dependency graph)? I know
I can iterate over the dependencies of "buildscript" and the project
but I have no idea how to do this with the dependencies of gradle
plugins. I'm not a gradle expert, I'm using gradle only since a week
or so, maybe I'm doing something fundamentally wrong?

Can you reproduce the error with my hello world application? If you
cannot reproduce this then is there anything I can do on my machine to
help find the problem?

I am using Ubuntu 12.04 amd64, OpenJDK 1.7.0_55 from official Ubuntu
repositories, I did not make any esoteric configuration changes, its
pretty much exactly a standard out-of-the-box Ubuntu configuration. I
also have OpenJDK 6 installed but 7 is my default (It won't work with
6 at all anyways):

--(bernd@Saturn)-(/home/bernd/proj/testws/wallet-key-tool)--
--($)-- update-alternatives --config java
Es gibt 2 Auswahlmöglichkeiten für die Alternative java (welche
/usr/bin/java bereitstellen).

Auswahl Pfad Priorität Status
------------------------------------------------------------
0 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061
Auto-Modus
1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061
manueller Modus
* 2 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1051
manueller Modus

Drücken Sie die Eingabetaste, um die aktuelle Wahl[*] beizubehalten,
oder geben Sie die Auswahlnummer ein:
--(bernd@Saturn)-(/home/bernd/proj/testws/wallet-key-tool)--
--($)-- update-alternatives --config javac
Es gibt 2 Auswahlmöglichkeiten für die Alternative javac (welche
/usr/bin/javac bereitstellen).

Auswahl Pfad Priorität Status
------------------------------------------------------------
0 /usr/lib/jvm/java-6-openjdk-amd64/bin/javac 1061
Auto-Modus
1 /usr/lib/jvm/java-6-openjdk-amd64/bin/javac 1061
manueller Modus
* 2 /usr/lib/jvm/java-7-openjdk-amd64/bin/javac 1051
manueller Modus

Drücken Sie die Eingabetaste, um die aktuelle Wahl[*] beizubehalten,
oder geben Sie die Auswahlnummer ein:
Message has been deleted

Stefan Oehme

unread,
May 5, 2014, 7:04:42 AM5/5/14
to xtend...@googlegroups.com
Sorry I missed another dependency problem:

xtend-gradle-lib was also pulling in ASM 3 transitively. This is actually really annoying, I had to add yet another exclusion to make it work. There is already a ticket to fix this in Gradle, but no one seems to be working on it yet.

As I said, I can reproduce the problematic dependency tree, but I don't get an exception because on my machine ASM 5 comes first on the classpath. With the latest fix, ASM 3 is finally completely gone from the xtendClasspath.

You can look at/manipulate the "xtendClasspath" property of the XtendCompile tasks.

Stefan Oehme

unread,
May 5, 2014, 7:13:46 AM5/5/14
to xtend...@googlegroups.com
Okay, 0.0.7 should be out in a few hours. I learned a lot about Gradle's handling of Maven dependencies today ;) I really hope it works for you now, sorry for the inconvenience.

Stefan Oehme

unread,
May 5, 2014, 7:42:36 AM5/5/14
to xtend...@googlegroups.com
I just tried this snippet with the new version 0.0.7 and it finally returns true =)

Add this to your build file

task areWeFreeOfASM3 << {
  println(project.compileXtend.xtendClasspath.grep{it.name.contains("asm-3")}.isEmpty())
}

and run

gradle areWeFreeOfASM3 

Bernd K.

unread,
May 5, 2014, 9:31:31 AM5/5/14
to xtend...@googlegroups.com
It works!

0.0.7 fixed it, no more asm-3 in the classpath, the warnings during compile are gone too and most importantly no more exceptions, the build succeeds!

Many thanks for fixing this so fast :-)

-Bernd

Stefan Oehme

unread,
May 5, 2014, 9:33:59 AM5/5/14
to xtend...@googlegroups.com
You're very welcome. Thanks for giving it a try and staying with me ;)


--

Andre Medeiros

unread,
May 6, 2014, 4:25:55 AM5/6/14
to xtend...@googlegroups.com
Hi, can you help me out?

I download the xtend_hello project, I included the areWeFreeOfASM3 task, and it returned false when the task.

   $ java -version
   java version "1.6.0_65"
   Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
   Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

If I just run `gradle build` I get

   :compileXtend
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/xtend/compiler/batch/Main : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
:compileXtend FAILED

Thanks

Andre Medeiros

unread,
May 6, 2014, 4:29:40 AM5/6/14
to xtend...@googlegroups.com
One additional information, I am running on OSX:

    $ printenv | grep $JAVA_HOME
    JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

Stefan Oehme

unread,
May 6, 2014, 5:10:14 AM5/6/14
to xtend...@googlegroups.com

The plugin is currently compiled for Java 7, you are using Java 6.

Andre Medeiros

unread,
May 6, 2014, 5:43:56 AM5/6/14
to xtend...@googlegroups.com
Actually I was using Java 7 before, and it gave the same error. Then I tried to change to Java 6, because I read on Stackoverflow that "Unsupported major.minor version 51.0" might be related to that. I changed back to Java 7 but I still have the problem.

    $java -version
    java version "1.7.0_51"
    Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

    $./gradlew build


    :compileXtend
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/xtend/compiler/batch/Main : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
:compileXtend FAILED



Zsombor

unread,
May 6, 2014, 6:21:09 AM5/6/14
to xtend...@googlegroups.com
Probably gradlew try to be to smart about figuring out where are the JVMs, and it starts a wrong one.

Regards
 Zs


You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+...@googlegroups.com.

Andre Medeiros

unread,
May 6, 2014, 7:34:07 AM5/6/14
to xtend...@googlegroups.com, gzso...@gmail.com
Yes, that was the problem. Thanks a lot!

Stefan Oehme

unread,
May 6, 2014, 7:34:50 AM5/6/14
to xtend...@googlegroups.com
I will see how low I can set the required Java version for the next release. Probably Java 5.
Reply all
Reply to author
Forward
0 new messages