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

aspectj dependency scope [was: version update to 1.8.x] #106

Closed
Andrei-Pozolotin opened this issue Nov 7, 2014 · 4 comments
Closed

aspectj dependency scope [was: version update to 1.8.x] #106

Andrei-Pozolotin opened this issue Nov 7, 2014 · 4 comments

Comments

@Andrei-Pozolotin
Copy link
Contributor

kamon depends on aspect version 1.7.4 which seems abandoned
http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.aspectj%22%20AND%20a%3A%22aspectjweaver%22

while 1.8.x is in development; would it be appropriate to do aspectj version update to 1.8.x ?

@ivantopo
Copy link
Contributor

ivantopo commented Nov 7, 2014

Hello Andrei, as of 290a3c9 we moved to AspectJ 1.8.1 and probably will take it to 1.8.4 that was released a few hours ago. In practice we never found any problem in using the 1.8.1 weaver with previous versions of Kamon, but the upgrade is there anyway, our next release will come with the upgraded versions. Also, note that we no longer have a compile dependency on the weaver, just on aspectjrt.

@Andrei-Pozolotin
Copy link
Contributor Author

Ivan:

  1. re: "next release will come with the upgraded versions"
  • great, thank you
  1. re: "no longer have a compile dependency on the weaver, just on aspectjrt"
aspectjrt.jar < [is part of] < aspectjweaver.jar < [is part of] < aspectjtools.jar

and since aspectjweaver is provided to the system class loader as an agent,
then additional dependency to aspectjrt will lead to class duplication
and class loader conflicts

I verified that when I remove aspectjrt form the class path
and when jvm is started with -javaagent:aspectjweaver.jar
or when aspectjweaver is loaded via jvm attach api,
kamon still works fine.

so the kamon-core dependency should be either to aspectjrt or to aspectjweaver,
but only in scope=provided (or as a not-transitive dependency).

I would prefer aspectjweaver, to have people think
only about single artifact they must provide on class path,
eliminate confusion aspectjrt vs aspectjweaver as well as version mismatch.

this affects both sbt and maven

pom.xml should look like

        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <scope>provided</scope>
        </dependency>

@Andrei-Pozolotin Andrei-Pozolotin changed the title aspectj version update to 1.8.x aspectj dependency scope [was: version update to 1.8.x] Nov 7, 2014
@ivantopo
Copy link
Contributor

ivantopo commented Nov 9, 2014

@Andrei-Pozolotin thanks a lot for the detailed explanation, totally agree with the proposal and made the changes already!

@Andrei-Pozolotin
Copy link
Contributor Author

thank you.

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

2 participants