Support for Java annotations with arguments

I attempted to write a simple Jersey-based webapp, which requires an annotation on a class of the form


When I compile a Kotlin class annotated with this annotation

class Hello() {


I got a compile time error

[INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.goldin.plugins:kotlin-maven-plugin: (compile-kotlin-sources) on project jersey-kotlin: Execution compile-kotlin-sources of goal com.goldin.plugins:kotlin-maven-plugin: failed: java.lang.UnsupportedOperationException: Only annotations without values are supported by backend so far -> [Help 1] [ERROR]


Is there a YouTrack issue I can follow to learn when Java annotations with arguments are supported in Kotlin?  


You should write an annotation in square parentheses.

For example:

class Hello() {



I’m still getting the compile error even if using square brackets

import import

class HelloResource() {

  fun getHello() : String {
  return “hello”

Unfortunately, as I understand, currently there is only basic support for annotations.

I know there is a lot on the plate of the Kotlin language team.  But I'm reminded of the guidance the Scala folks give when asked how to get started at work with the language:  write some tests with it.

So today in Kotlin with JUnit4 annotations I can do


  fun testChimp() {
  // blah

But as I understand it, I cannot do


  Test(expected = RuntimeException.class)
  fun testChimpExectsError() {
  // blahblah

because annotations with arguments are not yet supported.

So I’m thinking the sooner annotations with arguments are supported, the sooner you can pull in the people who can justify to their managers that they can get started at work with Kotlin by coding some of their unit tests with it.

Is there a Kotlin issue around adding annotation argument support?  If yes, I’ll vote for it.

Thanks much.

here is it:

Please vote for it - I'm itching for this issue to be resolved too :)

Yeah, I'm really looking forward to getting a feel for what a Jersey webapp looks like coded in Kotlin.  And for that you need annotations that take arguments.