Skip to content

Loading…

Problem with duplicate class in Rhino and closure-compiler as well as several small fixes and cleanups #27

Merged
merged 10 commits into from

3 participants

@codecop

Hi Phil,
when I used your provided/rerleased jar everything worked well, but then I created my own one with Maven (without any changes) and I got IllegalAccessException/Error. The reason is that closure-compiler.jar contains the org.mozilla.classfile package with classes. While these classes are compatible with Rhino 1.7R3 they are not with Rhino 1.7R4 hence the exception. I can only assume that you use another OS to bundle the jar and as such the order of classes loaded when packaging the released jar is different from mine (Windows 7). I checked newer closure-compilers, but none is compatible with Rhino 1.7R4, so I had to change the POM to exclude the offending classes.

After this fix I went forward and removed some warnings and resolved two issues from your task tracker because I had the same problems. I am sorry that Git somehow messed up the diffs, all changes are minor I only changed a few characters in a line, but still it seems it changed the whole file due to line endings. I had thought we are past such issues... Sigh.

I created different commits for the different things so you can cherry-pick what you like. Thank you for ant-jshint.
Peter

codecop added some commits
@codecop codecop Fix the source and target version in compiler plugin so Maven creates…
… proper

Eclipse project configuration files. Bump version to 1.6 because classes in
closure-compiler-r706.jar are 1.6 files.
fd0c6f1
@codecop codecop Use shade instead of assmembly for uber-jar. Exclude
duplicated classes of closure-compiler with Rhino to fix
IllegalAccessExceptions.
dfb3faa
@codecop codecop Use same version of Ant as closure-compiler is depending on, set Ant as
provided as this is an Ant task, so Ant is always there, overwrite scope
of junit to test which drops it from the uber-jar.
5e91b41
@codecop codecop remove unecessary throws in test class, remove ant-jshint-test-dep
uber-jar as it is not used.
Conflicts:

	pom.xml
63a9b18
@codecop codecop add @Override to implementing methods (Java 6) and remove empty JavaDoc
param tags. (no code changes)
aa284d3
@codecop codecop update readme to current version of uber-jar 610b857
@codecop codecop Fix for Issue #26 - calling toString on a Sting just returns this, so no
inpact for regular case but fixes the problem when too many errors were
found (because then it seems a constant instead of a String is
returned).
eeabaef
@codecop codecop add assembly to also generate a zip with external dependencies, solves
Issue #13.
4ed98a3
@codecop codecop Improve error reporting in case of invalid json options file, change
options to Map<Object, Object> instead of Properties because wrong
methods were called on Properties. The properties is only used for the
load method, so outside it can be a Map. This solves Issue #19 and Issue
#24
d67fafb
@codecop codecop log failure message of each file to error so it is better readable (as
it is highlighted in Ant display as red)
9648b8a
@cranberrynut

I have also been struggling with the IllegalAccessError problem at runtime. Once I identified the source of the problem, I then found Peter's fork with the issue resolved. I think anyone interested in using ant-jshint will need to have at least the pom.xml changes for this fix, otherwise they can only use the provided Jar, as Peter mentioned.

It would be great if this could be pulled into the mainline.

Chris

@philmander philmander merged commit f75ba89 into philmander:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 26, 2013
  1. @codecop

    Fix the source and target version in compiler plugin so Maven creates…

    codecop committed
    … proper
    
    Eclipse project configuration files. Bump version to 1.6 because classes in
    closure-compiler-r706.jar are 1.6 files.
Commits on Jun 27, 2013
  1. @codecop

    Use shade instead of assmembly for uber-jar. Exclude

    codecop committed
    duplicated classes of closure-compiler with Rhino to fix
    IllegalAccessExceptions.
  2. @codecop

    Use same version of Ant as closure-compiler is depending on, set Ant as

    codecop committed
    provided as this is an Ant task, so Ant is always there, overwrite scope
    of junit to test which drops it from the uber-jar.
  3. @codecop

    remove unecessary throws in test class, remove ant-jshint-test-dep

    codecop committed
    uber-jar as it is not used.
    Conflicts:
    
    	pom.xml
  4. @codecop

    add @Override to implementing methods (Java 6) and remove empty JavaDoc

    codecop committed
    param tags. (no code changes)
  5. @codecop
  6. @codecop

    Fix for Issue #26 - calling toString on a Sting just returns this, so no

    codecop committed
    inpact for regular case but fixes the problem when too many errors were
    found (because then it seems a constant instead of a String is
    returned).
Commits on Jun 29, 2013
  1. @codecop
  2. @codecop

    Improve error reporting in case of invalid json options file, change

    codecop committed
    options to Map<Object, Object> instead of Properties because wrong
    methods were called on Properties. The properties is only used for the
    load method, so outside it can be a Map. This solves Issue #19 and Issue
    #24
Commits on Jul 1, 2013
  1. @codecop

    log failure message of each file to error so it is better readable (as

    codecop committed
    it is highlighted in Ant display as red)
Something went wrong with that request. Please try again.