OS: OS X, El Capitan
Scala version: 2.11.8
Java Version: 1.8.0_77
SBT Version: 0.13.13
If the aspectjweaver-1.8.6-sources.jar is present under .ivy2/cache/org.aspectj/aspectjweaver/srcs, the sbt-aspectj-runner will erroneously use that jar for the javaagent instead of correctly using .ivy2/cache/org.aspectj/aspectjweaver/jars/aspectjweaver-1.8.6.jar.
The following error is raised when executing aspectj-runner:run:
[info] Error occurred during initialization of VM
[error] Failed to find Premain-Class manifest attribute in /Users/sweaver/.ivy2/cache/org.aspectj/aspectjweaver/srcs/aspectjweaver-1.8.6-sources.jar
[info] agent library failed to init: instrument
java.lang.RuntimeException: Nonzero exit code returned from runner: 1
at scala.sys.package$.error(package.scala:27)
Steps to reproduce:
Explicitly add the aspectj weaver as a dependency and have it set to download sources:
"org.aspectj" % "aspectjweaver" % aspectJVersion withSources() withJavadoc()
Make sure that fork in run := true
Reload/start SBT.
Execute aspectj-runner:run
Should fail
Work-around
Remove 'withSources()' from the dependency:
"org.aspectj" % "aspectjweaver" % aspectJVersion withJavadoc()
OS: OS X, El Capitan Scala version: 2.11.8 Java Version: 1.8.0_77 SBT Version: 0.13.13
If the aspectjweaver-1.8.6-sources.jar is present under .ivy2/cache/org.aspectj/aspectjweaver/srcs, the sbt-aspectj-runner will erroneously use that jar for the javaagent instead of correctly using .ivy2/cache/org.aspectj/aspectjweaver/jars/aspectjweaver-1.8.6.jar.
The following error is raised when executing
aspectj-runner:run
:Steps to reproduce:
"org.aspectj" % "aspectjweaver" % aspectJVersion withSources() withJavadoc()
fork in run := true
aspectj-runner:run
Work-around
"org.aspectj" % "aspectjweaver" % aspectJVersion withJavadoc()
ivy2/cache/org.aspectj/aspectjweaver/srcs/aspectjweaver-1.8.6-sources.jar
aspectj-runner:run