Unable to use aspectj in java library
See original GitHub issueDescription of the problem / feature request:
When a project uses aspectj (aspectjtools-1.8.13.jar) in a java_library ijar fails with the error ‘Bad magic efbfbdef’
When the ijar utility is used separately the output is: … INFO: StripClass: org/aspectj/org/eclipse/jdt/internal/compiler/parser/UpdateParserFiles.class Bad magic efbfbdef
It seems that the ijar utility isn’t able to read the UpdateParserFiles class file properly or it contains an invalid magic number.
Due to this issue we aren’t able to migrate from Maven to Bazel.
Bugs: what’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Checkout bazel project and build ijar
git clone “https://github.com/bazelbuild/bazel.git” cd bazel bazel build //third_party/ijar
Download aspjectj jar
mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:get -Dartifact=org.aspectj:aspectjtools:1.8.13
Run ijar against aspectj jar
./bazel-bin/third_party/ijar/ijar -v ~/.m2/repository/org/aspectj/aspectjtools/1.8.13/aspectjtools-1.8.13.jar
What operating system are you running Bazel on?
MacOS Sierra
What’s the output of bazel info release
?
release 0.10.0
Have you found anything relevant by searching the web?
When searching for 0xEFBFBDEF i found this stackoverflow question regarding encoding errors: https://stackoverflow.com/questions/5421879/objectinputstream-happy-with-fileinputstream-not-happy-with-getresourceasstream
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (7 by maintainers)
If I only was a little less impatient… Aspectj released version 1.9.0 which doesn’t include the corrupt class file.
Ok, thanks. I’ll try to use maven_jar from a Skylark rule.