1

I want to include a Java annotation with source retention in a Play! 1.4.x project, but can't find a way of passing additional arguments to the Play! internal Java compiler in order to make it preprocess the custom annotation.

The annotation is the Adrian Walker's @Multiline preprocessor annotation and following the steps found here: https://github.com/benelog/multiline/wiki/Non-Maven-Java-project-with-Eclipse, I can easily use it in a simple Java console application. However, I can't succeed doing the same in a Play! application.

I guess that I'll have to be able to define the settings used by the internal Java compiler, but I just can't figure how to do it!

Zé Byte
  • 199
  • 1
  • 12

1 Answers1

0

The only way I could suggest is use Play 1 plugin enhancer, but I'm sceptic, since @Multiline try to put comment text into java field or variable... such a tricky!

You can try to check directly on the play1 sources, to learn and try to make a plugin/enhancer. I suggest here:
https://github.com/playframework/play1/blob/master/framework/src/play/db/jpa/JPAEnhancer.java https://github.com/playframework/play1/blob/master/framework/src/play/db/jpa/JPAPlugin.java

And remember to create a play.plugins file into conf folder of your app.
Good luck.

g.annunziata
  • 3,118
  • 1
  • 24
  • 25