Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accessors-smart 1.1 on maven central is still using org.objectweb.asm #20

Closed
otrosien opened this issue Nov 20, 2015 · 15 comments
Closed

Comments

@otrosien
Copy link

I'm still getting clashes when including accessors-smart with other libraries that use asm.

@burtonator
Copy link

yeah.. I'm running into the same problem. We have a script that is smart enough to detect conflicts ... and it finds that the ASM you use also is used as asm as a stand alone library.

Why do you need to embed ASM instead of just using it as a regular dependency.

Thoughts on what a PR would look like that cleans this up?

@tigerscar
Copy link

I do have the same problem. The dependency for json-path (see below) causes after 'mvn eclipse:eclipse' two libraries with the asm packages (accessors-smart-1.1.jar and asm-5.0.3.jar). Both are providing the packages org.objectweb.asm and org.objectweb.asm.signature.

So it is impossible to make a runnable JAR file from Eclipse (but maybe I am unexperienced and there is a workaround for it, I don't know).

<dependency>
    <groupId>com.jayway.jsonpath</groupId>
    <artifactId>json-path</artifactId>
    <version>2.2.0</version>
</dependency>

@tigerscar
Copy link

This worked out for me (exclude it from the Maven dependency):

<dependency>
    <groupId>com.jayway.jsonpath</groupId>
    <artifactId>json-path</artifactId>
    <version>2.2.0</version>
    <exclusions>
        <exclusion>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm</artifactId>
        </exclusion>
    </exclusions>
</dependency>

See dadoonet's comment in json-path/JsonPath#224.

@burtonator
Copy link

Still the same problem.. Just got stuck on this again and wasted a few hours.

This is a hard conflict for Elasticsearch because it won't allow you to run with a 'jarhell' config with duplicate classes.

So there's no way to run JsonPath on Elasticsearch.

Nor should there be really.. putting the same .class files in different .jars is just asking for problems.

@nezihyigitbasi
Copy link

nezihyigitbasi commented Aug 16, 2016

Embedding the asm classes in the accessors-smart jar causes conflicts for me too. Any plans to fix this?

@chenzhuogit
Copy link

chenzhuogit commented Aug 29, 2016

<dependency>
    <groupId>com.jayway.jsonpath</groupId>
    <artifactId>json-path</artifactId>
    <version>2.2.0</version>
    <exclusions>
        <exclusion>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm</artifactId>
        </exclusion>
    </exclusions>
</dependency>

This not work for me. The accessorts-smart conflict with asm-all 3.3.1

@ptriller
Copy link

I am unable json-smart because of the embedded asm. Usually when asm is embedded the packages of the classes are renamed. the JDK does this and cglib does this, so it seems the way to go. THis would fix all problems in this thread.

@UrielCh
Copy link
Contributor

UrielCh commented Sep 16, 2016

If I remember, I rename my ASM stuff, so the trouble should be Fixed now.

@ptriller
Copy link

This line :

<Embed-Dependency>asm;groupId=org.ow2.asm;inline=true</Embed-Dependency>

copies the ASM dependency into the jar file without any renaming``

@UrielCh
Copy link
Contributor

UrielCh commented Sep 16, 2016

I will check that this week end.

thx.

@burtonator
Copy link

Why can't a normal dependency be used? That would fix our problem. We've had to back out a bunch of code to avoid this problem.

@ptriller
Copy link

If you want to embedd asm and hide it by renaming the package you can do that with:
https://maven.apache.org/plugins/maven-shade-plugin/

I normal dependency can cause problems, too because asm3.3.1 is not compatible to the newer asm and the old one is still used widely.

@mattnelson
Copy link
Contributor

Issued a PR(#35) for this change

@brenuart
Copy link

+1

@UrielCh
Copy link
Contributor

UrielCh commented Mar 25, 2017

last json smart version use ASM V5.0.4

@UrielCh UrielCh closed this as completed Mar 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants