Getting started with Javascript compilation outside of IntelliJ?

I'm using IntelliJ for Javascript compilation but occasionally I have to develop remotely over SSH (for security reasons, can't keep sources on laptop), so I'm interested in being able to build Kotlin sources outside of IntelliJ (since tunneling IntelliJ over X is too slow), whether it be via command-line jar or Maven.  I couldn't find instructions on how to do this, however - only the standard Maven/Ant setup on the Build Tools wiki page.  Any hints?

Here's a couple of example projects which builds JS code using the maven plugin

Hm, with this pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
        xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <modelVersion>4.0.0</modelVersion>

    <groupId>wab</groupId>
    <artifactId>wab</artifactId>
    <version>0.1-SNAPSHOT</version>

<properties>
<kotlin.version>0.1.2580</kotlin.version>
</properties>

    <dependencies>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src/main/kotlin</sourceDirectory>
        <testSourceDirectory>src/test/kotlin</testSourceDirectory>

        <plugins>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>org.jetbrains.kotlin</groupId>
                        <artifactId>kotlin-js-library</artifactId>
                        <version>${kotlin.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>js</id>
                        <goals>
                            <goal>js</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>jetbrains-all</id>
            <url>http://repository.jetbrains.com/all</url&gt;
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>jetbrains-all</id>
            <url>http://repository.jetbrains.com/all</url&gt;
        </pluginRepository>
    </pluginRepositories>

</project>

I’m seeing this error about a missing com.google.common.io.InputSupplier:

$ mvn compile [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Unnamed - wab:wab:jar:0.1-SNAPSHOT [INFO]   task-segment: [compile] [INFO] ------------------------------------------------------------------------ [INFO] [resources:resources {execution: default-resources}] [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /home/yang/wab/kotlin/src/main/resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Nothing to compile - all classes are up to date ----------------------------------------------------- this realm = app0.child-container[org.jetbrains.kotlin:kotlin-maven-plugin:0.1.2580] urls[0] = file:/home/yang/.m2/repository/org/jetbrains/kotlin/kotlin-maven-plugin/0.1.2580/kotlin-maven-plugin-0.1.2580.jar urls[1] = file:/home/yang/.m2/repository/org/jetbrains/kotlin/kotlin-js-library/0.1.2580/kotlin-js-library-0.1.2580.jar urls[2] = file:/home/yang/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar urls[3] = file:/home/yang/.m2/repository/org/jetbrains/kotlin/kotlin-compiler/0.1.2580/kotlin-compiler-0.1.2580.jar Number of imports: 10 import: org.codehaus.classworlds.Entry@a6c57a42 import: org.codehaus.classworlds.Entry@12f43f3b import: org.codehaus.classworlds.Entry@20025374 import: org.codehaus.classworlds.Entry@f8e44ca4 import: org.codehaus.classworlds.Entry@92758522 import: org.codehaus.classworlds.Entry@ebf2705b import: org.codehaus.classworlds.Entry@bb25e54 import: org.codehaus.classworlds.Entry@bece5185 import: org.codehaus.classworlds.Entry@3fee8e37 import: org.codehaus.classworlds.Entry@3fee19d8 this realm = plexus.core urls[0] = file:/usr/share/maven2/lib/maven-debian-uber.jar Number of imports: 10 import: org.codehaus.classworlds.Entry@a6c57a42 import: org.codehaus.classworlds.Entry@12f43f3b import: org.codehaus.classworlds.Entry@20025374 import: org.codehaus.classworlds.Entry@f8e44ca4 import: org.codehaus.classworlds.Entry@92758522 import: org.codehaus.classworlds.Entry@ebf2705b import: org.codehaus.classworlds.Entry@bb25e54 import: org.codehaus.classworlds.Entry@bece5185 import: org.codehaus.classworlds.Entry@3fee8e37 import: org.codehaus.classworlds.Entry@3fee19d8 ----------------------------------------------------- [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Internal error in the plugin manager executing goal 'org.jetbrains.kotlin:kotlin-maven-plugin:0.1.2580:js': Unable to load the mojo 'org.jetbrains.kotlin:kotlin-maven-plugin:0.1.2580:js' in the plugin 'org.jetbrains.kotlin:kotlin-maven-plugin'. A required class is missing: com/google/common/io/InputSupplier com.google.common.io.InputSupplier [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 second [INFO] Finished at: Mon Jul 16 23:52:31 PDT 2012 [INFO] Final Memory: 9M/195M [INFO] ------------------------------------------------------------------------

I've tended to live life on the edge with kotlin and used version 0.1-SNAPSHOT - does that work any better for you?

I guess 0.1.2580 is maybe M2 (as there only seems 2 releaess ever so far in the maven repo) http://repository.jetbrains.com/releases/org/jetbrains/kotlin/kotlin-maven-plugin/

the JS stuff has been worked on quite a bit since then, so probably 0.1-SNAPSHOT is a requirement for JS stuff for now.

BTW more details on how the JS stuff is hanging together & how to use maven & JUnit tests for JS here: https://github.com/JetBrains/kotlin/blob/master/js/ReadMe.md

I think I'm still doing something wrong.  I continue to see this error after switching to 0.1-SNAPSHOT.

[INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Internal error in the plugin manager executing goal 'org.jetbrains.kotlin:kotlin-maven-plugin:0.1-SNAPSHOT:js': Unable to load the mojo 'org.jetbrains.kotlin:kotlin-maven-plugin:0.1-SNAPSHOT:js' in the plugin 'org.jetbrains.kotlin:kotlin-maven-plugin'. A required class is missing: com/google/common/io/InputSupplier com.google.common.io.InputSupplier

Hmm, which version of maven are you using? Am using 3.0.4 here and been developing against 0.1-SNAPSHOT for some time and never seen that error yet. Just trashed my ~/.m2/repository/org/jetbrains directories just in case & did another build and its still wroking for me.

Does cloning and building kool.io work for you?

git clone git@github.com:koolio/kool.git cd koolio mvn install

Nope, building kool fails for me, with a different but similar error:

...[lots more output before this]... 710b downloaded  (plexus-compiler-javac-1.8.1.pom) Downloading: http://repository.jetbrains.com/repo/org/codehaus/plexus/plexus-compilers/1.8.1/plexus-compilers-1.8.1.pom 1K downloaded  (plexus-compilers-1.8.1.pom) Downloading: http://repository.jetbrains.com/repo/org/codehaus/plexus/plexus-compiler-api/1.8.1/plexus-compiler-api-1.8.1.jar 19K downloaded  (plexus-compiler-api-1.8.1.jar)   Downloading: http://repository.jetbrains.com/repo/org/codehaus/plexus/plexus-compiler-manager/1.8.1/plexus-compiler-manager-1.8.1.jar 5K downloaded  (plexus-compiler-manager-1.8.1.jar)                   Downloading: http://repository.jetbrains.com/repo/org/codehaus/plexus/plexus-compiler-javac/1.8.1/plexus-compiler-javac-1.8.1.jar 12K downloaded  (plexus-compiler-javac-1.8.1.jar) [INFO] [compiler:compile {execution: default-compile}] [INFO] Nothing to compile - all classes are up to date [INFO] snapshot org.jetbrains.kotlin:kotlin-compiler:0.1-SNAPSHOT: checking for updates from jetbrains-repo-snapshots [INFO] snapshot org.jetbrains.kotlin:kotlin-compiler:0.1-SNAPSHOT: checking for updates from jetbrains-snapshots [INFO] [kotlin:compile {execution: compile}] [INFO] Compiling Kotlin sources from [/tmp/kool/kool-stream/src/main/kotlin] [FATAL ERROR] org.jetbrains.kotlin.maven.KotlinCompileMojo#execute() caused a linkage error (java.lang.NoClassDefFoundError) and may be out-of-date. Check the realms: [FATAL ERROR] Plugin realm = app0.child-container[org.jetbrains.kotlin:kotlin-maven-plugin:0.1-SNAPSHOT] urls[0] = file:/home/yang/.m2/repository/org/jetbrains/kotlin/kotlin-maven-plugin/0.1-SNAPSHOT/kotlin-maven-plugin-0.1-SNAPSHOT.jar urls[1] = file:/home/yang/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar urls[2] = file:/home/yang/.m2/repository/org/jetbrains/kotlin/kotlin-compiler/0.1-SNAPSHOT/kotlin-compiler-0.1-SNAPSHOT.jar [FATAL ERROR] Container realm = plexus.core urls[0] = file:/usr/share/maven2/lib/maven-debian-uber.jar [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] com/google/common/base/Joiner com.google.common.base.Joiner [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.NoClassDefFoundError: com/google/common/base/Joiner   at org.jetbrains.kotlin.maven.KotlinCompileMojoBase.configureBaseCompilerArguments(KotlinCompileMojoBase.java:200)   at org.jetbrains.kotlin.maven.KotlinCompileMojo.configureCompilerArguments(KotlinCompileMojo.java:35)   at org.jetbrains.kotlin.maven.KotlinCompileMojoBase.execute(KotlinCompileMojoBase.java:112)

  at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)   at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)   at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)   at java.lang.reflect.Method.invoke(Method.java:597)   at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)   at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)   at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)   at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: java.lang.ClassNotFoundException: com.google.common.base.Joiner   at java.net.URLClassLoader$1.run(URLClassLoader.java:202)   at java.security.AccessController.doPrivileged(Native Method)   at java.net.URLClassLoader.findClass(URLClassLoader.java:190)   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)   at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)   at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)   at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)   at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)   ... 22 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3 minutes 44 seconds [INFO] Finished at: Tue Jul 17 17:29:14 PDT 2012 [INFO] Final Memory: 35M/552M [INFO] ------------------------------------------------------------------------
I'm using 2.2.1.

$ mvn -version
Apache Maven 2.2.1 (rdebian-1)
Java version: 1.6.0_26
Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
Default locale: en_US, platform encoding: UTF-8
OS name: “linux” version: “2.6.32-41-generic” arch: “amd64” Family: “unix”

Could you try 3.0.4 of maven please?

BTW I've updated the kotlin and kool.io builds so that they require at least maven 3.0.3, so they should give a more meaningful error if you try an earlier version of maven

I can build kool with Maven 3 but with my simple pom.xml I see these build errors, which aren't making sense to me since I'm importing all the right packages to see JQuery/etc. and since they work fine in IDEA:

$ mvn compile
[INFO] Scanning for projects…
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building wab 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repository.jetbrains.com/all/org/jetbrains/kotlin/kotlin-maven-plugin/0.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://repository.jetbrains.com/all/org/jetbrains/kotlin/kotlin-maven-plugin/0.1-SNAPSHOT/maven-metadata.xml (328 B at 0.1 KB/sec)
Downloading: http://repository.jetbrains.com/all/org/jetbrains/kotlin/kotlin-project/0.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://repository.jetbrains.com/all/org/jetbrains/kotlin/kotlin-project/0.1-SNAPSHOT/maven-metadata.xml (323 B at 0.6 KB/sec)
Downloading: http://repository.jetbrains.com/all/org/jetbrains/kotlin/kotlin-stdlib/0.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://repository.jetbrains.com/all/org/jetbrains/kotlin/kotlin-stdlib/0.1-SNAPSHOT/maven-metadata.xml (322 B at 0.7 KB/sec)
Downloading: http://repository.jetbrains.com/all/org/jetbrains/kotlin/kotlin-runtime/0.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://repository.jetbrains.com/all/org/jetbrains/kotlin/kotlin-runtime/0.1-SNAPSHOT/maven-metadata.xml (323 B at 0.7 KB/sec)
[INFO]
[INFO] — maven-resources-plugin:2.5:resources (default-resources) @ wab —
Downloading: http://repository.jetbrains.com/all/org/apache/maven/reporting/maven-reporting-api/2.0.6/maven-reporting-api-2.0.6.jar
Downloading: http://repository.jetbrains.com/all/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
Downloading: http://repository.jetbrains.com/all/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7.jar
Downloading: http://repository.jetbrains.com/all/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
Downloading: http://repository.jetbrains.com/all/junit/junit/3.8.1/junit-3.8.1.jar
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-api/2.0.6/maven-reporting-api-2.0.6.jar
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7.jar
Downloading: http://repo.maven.apache.org/maven2/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
Downloading: http://repo.maven.apache.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-api/2.0.6/maven-reporting-api-2.0.6.jar (0 B at 0.0 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/commons-cli/commons-cli/1.0/commons-cli-1.0.jar (0 B at 0.0 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar (0 B at 0.0 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar (0 B at 0.0 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7.jar (0 B at 0.0 KB/sec)
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/yang/wab/kotlin/src/main/resources
[INFO]
[INFO] — maven-compiler-plugin:2.3.2:compile (default-compile) @ wab —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — kotlin-maven-plugin:0.1-SNAPSHOT:js (js) @ wab —
Downloading: http://repository.jetbrains.com/all/org/jetbrains/kotlin/kotlin-js-library/0.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://repository.jetbrains.com/all/org/jetbrains/kotlin/kotlin-js-library/0.1-SNAPSHOT/maven-metadata.xml (326 B at 0.7 KB/sec)
Downloading: http://repository.jetbrains.com/all/org/jetbrains/kotlin/kotlin-compiler/0.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://repository.jetbrains.com/all/org/jetbrains/kotlin/kotlin-compiler/0.1-SNAPSHOT/maven-metadata.xml (324 B at 0.7 KB/sec)
Downloading: http://repository.jetbrains.com/all/org/codehaus/plexus/plexus-utils/2.0.6/plexus-utils-2.0.6.jar
Downloading: http://repository.jetbrains.com/all/org/sonatype/sisu/sisu-inject-bean/2.3.0/sisu-inject-bean-2.3.0.jar
Downloading: http://repository.jetbrains.com/all/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-no_aop.jar
Downloading: http://repository.jetbrains.com/all/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
Downloading: http://repository.jetbrains.com/all/org/sonatype/sisu/sisu-guava/0.9.9/sisu-guava-0.9.9.jar
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/2.0.6/plexus-utils-2.0.6.jar
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
Downloading: http://repo.maven.apache.org/maven2/org/sonatype/sisu/sisu-inject-bean/2.3.0/sisu-inject-bean-2.3.0.jar
Downloading: http://repo.maven.apache.org/maven2/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-no_aop.jar
Downloading: http://repo.maven.apache.org/maven2/org/sonatype/sisu/sisu-guava/0.9.9/sisu-guava-0.9.9.jar
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/2.0.6/plexus-utils-2.0.6.jar (0 B at 0.0 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar (0 B at 0.0 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-no_aop.jar (0 B at 0.0 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/sonatype/sisu/sisu-guava/0.9.9/sisu-guava-0.9.9.jar (0 B at 0.0 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/sonatype/sisu/sisu-inject-bean/2.3.0/sisu-inject-bean-2.3.0.jar (0 B at 0.0 KB/sec)
[INFO] Compiling Kotlin src from [/home/yang/wab/kotlin/src/main/kotlin] to JavaScript at: /home/yang/wab/kotlin/target/js/wab.js
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (14, 21) Unresolved reference: Console
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (28, 12) Unresolved reference: Selection
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (29, 12) Unresolved reference: Selection
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (30, 12) Unresolved reference: Selection
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (31, 12) Unresolved reference: Selection
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (32, 37) Unresolved reference: Selection
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (39, 12) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (40, 12) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (40, 28) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (52, 12) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (52, 67) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (53, 12) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (53, 65) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (54, 12) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (54, 68) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (64, 12) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (65, 12) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (65, 38) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (66, 12) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (66, 34) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (67, 12) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (67, 35) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (73, 12) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (74, 12) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (75, 12) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (75, 28) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (76, 12) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (77, 12) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (77, 30) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (105, 12) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (107, 18) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (112, 27) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (112, 36) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (117, 26) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (2, 11) Unresolved reference: jquery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (4, 15) Unresolved reference: html
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (89, 29) ‘compareTo()’ must return jet.Int, but returns [ERROR : <ERROR FUNCTION RETURN TYPE>]
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (109, 35) Unresolved reference: jq
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (177, 18) Unresolved reference: jq
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (178, 16) Unresolved reference: jq
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (180, 19) Unresolved reference: JQuery
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (186, 62) ‘compareTo()’ must return jet.Int, but returns [ERROR : <ERROR FUNCTION RETURN TYPE>]
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (190, 19) Unresolved reference: MouseClickEvent
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (192, 20) Cannot infer a type for this parameter. To specify it explicitly use the {(p : Type) => …} notation
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (199, 24) Unresolved reference: jq
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (208, 15) Cannot infer a type for this parameter. To specify it explicitly use the {(p : Type) => …} notation
ERROR: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (208, 44) Cannot infer a type for this parameter. To specify it explicitly use the {(p : Type) => …} notation
WARNING: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (28, 33) Parameter ‘i’ is never used
WARNING: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (30, 31) Parameter ‘r’ is never used
WARNING: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (39, 25) Parameter ‘x’ is never used
WARNING: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (40, 25) Parameter ‘x’ is never used
WARNING: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (52, 27) Parameter ‘f’ is never used
WARNING: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (53, 25) Parameter ‘f’ is never used
WARNING: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (54, 28) Parameter ‘f’ is never used
WARNING: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (65, 26) Parameter ‘o’ is never used
WARNING: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (66, 25) Parameter ‘i’ is never used
WARNING: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (67, 26) Parameter ‘i’ is never used
WARNING: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (74, 23) Parameter ‘i’ is never used
WARNING: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (75, 25) Parameter ‘x’ is never used
WARNING: /home/yang/wab/kotlin/src/main/kotlin/Main.kt: (76, 25) Parameter ‘x’ is never used
WARNING: /kotlin/Dom.kt.jet: (62, 9) Elvis operator (?:slight_smile: always returns the left operand of non-nullable type jet.String
WARNING: /kotlin/Dom.kt.jet: (69, 9) Elvis operator (?:slight_smile: always returns the left operand of non-nullable type jet.String
WARNING: /kotlin/Dom.kt.jet: (75, 9) Elvis operator (?:slight_smile: always returns the left operand of non-nullable type jet.String
WARNING: /kotlin/Dom.kt.jet: (14, 81) Unnecessary non-null assertion (!!) on a non-null receiver of type java.util.List<org.w3c.dom.Element>
WARNING: /kotlin/Dom.kt.jet: (15, 72) Unnecessary non-null assertion (!!) on a non-null receiver of type java.util.List<org.w3c.dom.Node>
WARNING: /kotlin/Dom.kt.jet: (83, 16) Condition ‘c != null’ is always ‘true’
WARNING: /kotlin/Dom.kt.jet: (175, 41) Unnecessary safe call on a non-null receiver of type org.w3c.dom.Document
WARNING: /kotlin/Dom.kt.jet: (176, 20) Condition ‘element != null’ is always ‘true’
WARNING: /kotlin/Dom.kt.jet: (291, 12) Elvis operator (?:slight_smile: always returns the left operand of non-nullable type jet.String
WARNING: /kotlin/Dom.kt.jet: (369, 22) Condition ‘this != null’ is always ‘true’
WARNING: /kotlin/Dom.kt.jet: (223, 13) Condition ‘node == null’ is always ‘false’
WARNING: /kotlin/Dom.kt.jet: (236, 13) Condition ‘node == null’ is always ‘false’
WARNING: /kotlin/Dom.kt.jet: (258, 13) Condition ‘nextValue != null’ is always ‘true’
WARNING: /kotlin/Dom.kt.jet: (274, 13) Condition ‘nextValue != null’ is always ‘true’
WARNING: /kotlin/JUtil.kt.jet: (24, 17) This cast can never succeed
WARNING: /kotlin/JUtil.kt.jet: (32, 62) No cast needed, use ‘:’ instead
WARNING: /kotlin/JUtil.kt.jet: (45, 62) No cast needed
WARNING: /kotlin/BooleanArraysFromJLangIterables.kt.jet: (48, 28) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/BooleanArraysFromJLangIterables.kt.jet: (104, 35) Condition ‘element != null’ is always ‘true’
WARNING: /kotlin/BooleanArraysFromJLangIterables.kt.jet: (117, 13) Condition ‘list != null’ is always ‘true’
WARNING: /kotlin/CharArraysFromJLangIterables.kt.jet: (48, 28) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/CharArraysFromJLangIterables.kt.jet: (104, 35) Condition ‘element != null’ is always ‘true’
WARNING: /kotlin/CharArraysFromJLangIterables.kt.jet: (117, 13) Condition ‘list != null’ is always ‘true’
WARNING: /kotlin/ByteArraysFromJLangIterablesLazy.kt.jet: (82, 13) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/ShortArraysFromJLangIterablesLazy.kt.jet: (82, 13) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/ArraysFromJLangIterables.kt.jet: (48, 28) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/ArraysFromJLangIterables.kt.jet: (117, 13) Condition ‘list != null’ is always ‘true’
WARNING: /kotlin/CharArraysFromJLangIterablesLazy.kt.jet: (82, 13) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/LongArraysFromJLangIterables.kt.jet: (48, 28) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/LongArraysFromJLangIterables.kt.jet: (104, 35) Condition ‘element != null’ is always ‘true’
WARNING: /kotlin/LongArraysFromJLangIterables.kt.jet: (117, 13) Condition ‘list != null’ is always ‘true’
WARNING: /kotlin/FloatArraysFromJLangIterables.kt.jet: (48, 28) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/FloatArraysFromJLangIterables.kt.jet: (104, 35) Condition ‘element != null’ is always ‘true’
WARNING: /kotlin/FloatArraysFromJLangIterables.kt.jet: (117, 13) Condition ‘list != null’ is always ‘true’
WARNING: /kotlin/StandardFromJLangIterables.kt.jet: (48, 28) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/StandardFromJLangIterables.kt.jet: (117, 13) Condition ‘list != null’ is always ‘true’
WARNING: /kotlin/DoubleArraysFromJLangIterablesLazy.kt.jet: (82, 13) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/BooleanArraysFromJLangIterablesLazy.kt.jet: (82, 13) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/JUtilIteratorsFromJLangIterables.kt.jet: (47, 28) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/JUtilIteratorsFromJLangIterables.kt.jet: (116, 13) Condition ‘list != null’ is always ‘true’
WARNING: /core/stringsCode.kt.jet: (11, 12) Condition ‘result != null’ is always ‘true’
WARNING: /kotlin/JLangIterables.kt.jet: (39, 28) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/JLangIterables.kt.jet: (108, 13) Condition ‘list != null’ is always ‘true’
WARNING: /kotlin/ByteArraysFromJLangIterables.kt.jet: (48, 28) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/ByteArraysFromJLangIterables.kt.jet: (104, 35) Condition ‘element != null’ is always ‘true’
WARNING: /kotlin/ByteArraysFromJLangIterables.kt.jet: (117, 13) Condition ‘list != null’ is always ‘true’
WARNING: /kotlin/DoubleArraysFromJLangIterables.kt.jet: (48, 28) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/DoubleArraysFromJLangIterables.kt.jet: (104, 35) Condition ‘element != null’ is always ‘true’
WARNING: /kotlin/DoubleArraysFromJLangIterables.kt.jet: (117, 13) Condition ‘list != null’ is always ‘true’
WARNING: /kotlin/IntArraysFromJLangIterablesLazy.kt.jet: (82, 13) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/ShortArraysFromJLangIterables.kt.jet: (48, 28) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/ShortArraysFromJLangIterables.kt.jet: (104, 35) Condition ‘element != null’ is always ‘true’
WARNING: /kotlin/ShortArraysFromJLangIterables.kt.jet: (117, 13) Condition ‘list != null’ is always ‘true’
WARNING: /kotlin/IntArraysFromJLangIterables.kt.jet: (48, 28) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/IntArraysFromJLangIterables.kt.jet: (104, 35) Condition ‘element != null’ is always ‘true’
WARNING: /kotlin/IntArraysFromJLangIterables.kt.jet: (117, 13) Condition ‘list != null’ is always ‘true’
WARNING: /kotlin/JUtilMaps.kt.jet: (25, 59) No cast needed
WARNING: /kotlin/JUtilMaps.kt.jet: (73, 35) Unnecessary non-null assertion (!!) on a non-null receiver of type java.util.Set<java.util.Map.Entry<K, V>>
WARNING: /kotlin/JUtilMaps.kt.jet: (74, 31) Unnecessary non-null assertion (!!) on a non-null receiver of type java.util.Iterator<java.util.Map.Entry<K, V>>
WARNING: /kotlin/JLangIterablesSpecial.kt.jet: (104, 67) Unnecessary non-null assertion (!!) on a non-null receiver of type java.util.Iterator<T>
WARNING: /kotlin/LongArraysFromJLangIterablesLazy.kt.jet: (82, 13) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/FloatArraysFromJLangIterablesLazy.kt.jet: (82, 13) Condition ‘element == null’ is always ‘false’
WARNING: /kotlin/AbstractIterator.kt.jet: (115, 40) Unnecessary non-null assertion (!!) on a non-null receiver of type T
WARNING: /core/javautilCode.kt.jet: (19, 53) This cast can never succeed
WARNING: /core/javautilCode.kt.jet: (20, 54) This cast can never succeed
WARNING: /core/javautilCode.kt.jet: (7, 44) Parameter ‘comp’ is never used
WARNING: /core/javautilCode.kt.jet: (7, 23) Parameter ‘col’ is never used
WARNING: /core/javautilCode.kt.jet: (22, 28) Parameter ‘list’ is never used
WARNING: /core/javautilCode.kt.jet: (26, 43) Parameter ‘comparator’ is never used
WARNING: /core/javautilCode.kt.jet: (26, 28) Parameter ‘list’ is never used
WARNING: /stdlib/domCode.kt.jet: (17, 29) Parameter ‘xmlDeclaration’ is never used
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.785s
[INFO] Finished at: Wed Jul 18 03:48:45 PDT 2012
[INFO] Final Memory: 24M/559M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:0.1-SNAPSHOT:js (js) on project wab: Compilation error. See log for more details -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException         &nbsp;

Due to KT-2316 we excluded the jQuery kotlin code from the kotlin-js-library jar; however it seems that it now compiles again so I've just re-included it again.

So whenever the 0.1-SNAPSHOT updates (or if you do a local maven build) it should compile again now. Just make sure you add the kotlin-js-library jar to your maven pom.xml - thats the jar that includes the standard kotlin library and associated JS APIs (like jQuery / HTML5 etc).

Here’s an example of it in use: https://github.com/JetBrains/kotlin/blob/master/libraries/examples/browser-example/pom.xml#L31

Due to KT-2316 we excluded the jQuery kotlin code from the kotlin-js-library jar; however it seems that it now compiles again so I've just re-included it again.

So whenever the 0.1-SNAPSHOT updates (or if you do a local maven build) it should compile again now. Just make sure you add the kotlin-js-library jar to your maven pom.xml - thats the jar that includes the standard kotlin library and associated JS APIs (like jQuery / HTML5 etc).

Here’s an example of it in use: https://github.com/JetBrains/kotlin/blob/master/libraries/examples/browser-example/pom.xml#L31