However, I had to manually copy the intellij-core and kotlin-runtime jars to the exploded war archive’s WEB-INF/lib directory. The standard maven war packaging for some reason does not produce the correct .war file.
So the WEB-INF/lib directory for the case where the jar set is correct looks like:
GET
fun getHello( QueryParam(“name”) qs : String) : String {
return "hello, " + qs
}
}
and encountered this in the IDE when trying to use an annotated method / function parameter, with attached screenshot:
[INFO] --- kotlin-maven-plugin:0.2.3.8-beta-10:compile (compile-kotlin-sources) @ jersey-kotlin ---
:: loading settings :: url = jar:file:/Users/petrovic/.m2/repository/com/goldin/plugins/kotlin-maven-plugin/0.2.3.8-beta-10/kotlin-maven-plugin-0.2.3.8-beta-10.jar!/ivyconf.xml
[INFO] Compiling [/Users/petrovic/Projects/jersey-kotlin/src/main/kotlin] => [/Users/petrovic/Projects/jersey-kotlin/target/classes]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.254s
[INFO] Finished at: Sat Mar 17 19:38:24 PDT 2012
[INFO] Final Memory: 37M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.goldin.plugins:kotlin-maven-plugin:0.2.3.8-beta-10:compile (compile-kotlin-sources) on project jersey-kotlin: Execution compile-kotlin-sources of goal com.goldin.plugins:kotlin-maven-plugin:0.2.3.8-beta-10:compile failed: [/Users/petrovic/Projects/jersey-kotlin/src/main/kotlin] compilation failed: Internal error: (12,28) java.lang.NullPointerException
[ERROR] @IntrinsicMethods.java:248
[ERROR] -> [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/PluginExecutionException
This produces what appears to be the same failure:
``
[INFO] — kotlin-maven-plugin:0.2.3.8-beta-10:compile (compile-kotlin-sources) @ jersey-kotlin —
:: loading settings :: url = jar:file:/Users/petrovic/.m2/repository/com/goldin/plugins/kotlin-maven-plugin/0.2.3.8-beta-10/kotlin-maven-plugin-0.2.3.8-beta-10.jar!/ivyconf.xml
[INFO] Compiling [/Users/petrovic/Projects/jersey-kotlin/src/main/kotlin] => [/Users/petrovic/Projects/jersey-kotlin/target/classes]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.618s
[INFO] Finished at: Sun Mar 18 05:53:34 PDT 2012
[INFO] Final Memory: 37M/87M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.goldin.plugins:kotlin-maven-plugin:0.2.3.8-beta-10:compile (compile-kotlin-sources) on project jersey-kotlin: Execution compile-kotlin-sources of goal com.goldin.plugins:kotlin-maven-plugin:0.2.3.8-beta-10:compile failed: [/Users/petrovic/Projects/jersey-kotlin/src/main/kotlin] compilation failed: Internal error: (13,28) java.lang.NullPointerException
[ERROR] @IntrinsicMethods.java:248
[ERROR] -> [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/PluginExecutionException