I have a library that requires me to specify a javaagent using the aspectjweaver jar. eg.
java -jar -javaagent:/some/location/aspectjweaver-1.8.2.jar myFatJar.jar
This works fine. However, the environment that my fatjar will be running on does not have aspectjweaver-1.8.2.jar and I can't put it there (getting a more configurable environment may be a route I go down later).
Is there a way, preferably using sbt-assembly, to package up aspectjweaver into my fatjar, and run it that way? If it matters, my application is a Spray one using Scala, built using sbt.
Constraints
- Can't have a separate jar
- Can specify an arbitrary java command
- Have complete control of the build process