kamon-io / sbt-aspectj-runner

sbt plugin for running aspectj weaver
Other
34 stars 16 forks source link

sbt-aspectj-runner for play production mode - Play 2.6 #33

Closed keshann93 closed 5 years ago

keshann93 commented 5 years ago

Hi, I am stuck in a place where the sbt-aspectj-runner plugin loads the aspectjweaver in development mode but unfortunately its not behaving the same way when i build the dist and run it. Can someone help on this, is it officially this plugin does not support production mode for play projects? is there any work-around that i could make it to work in production mode.

ivantopo commented 5 years ago

Hey @KeshShan!

Indeed, this plugin officially does not support running on production mode. It was made only for the "Play on DEV mode" use case. For production mode the best way to go is using the sbt-javaagent plugin, which works well with sbt-native-packager which in turn is what Play uses to package the apps! (yeah, quite a chain there :joy:)

There is some info in the setting up the agent section of the docs, the very last section. That one is for Kanela but if you are still on Kamon 1.x just change Kanela for the AspectJ Weaver and that's it!