Aexyn / caliper

Automatically exported from code.google.com/p/caliper
Apache License 2.0
0 stars 0 forks source link

Put Caliper annotations into a separate Maven module #271

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently when I want to use the Caliper annotations to write a benchmark class 
I need to add the dependency com.google.caliper:caliper to my project, which 
brings a lot more transitive dependencies into my project, which makes life 
hard.

If I understand Caliper correctly, all you need in order to write a benchmark 
class are the Caliper annotations. Therefore I propose to provide a module with 
just those annotations and without further dependencies which could be added to 
almost every project without conflicts.

Of course this change would break the way, how Caliper is supposed to be 
executed (according to the tutorial video), but I hope there is an easy 
solution to this problem. Maybe a caliper-maven-plugin?

Original issue reported on code.google.com by michael.tamm2 on 7 Aug 2013 at 3:32

GoogleCodeExporter commented 9 years ago
Yeah, that sounds reasonable.  Though, I'm curious.  How do transitive 
dependencies "make life hard"?

Original comment by gak@google.com on 7 Aug 2013 at 5:40

GoogleCodeExporter commented 9 years ago
Because of version conflicts and how Maven resolves those: E.g. Hadoop has 
guava 11 as dependency which wins (at least in my pom.xml) over the guava 14 
dependency of Caliper which results in a ClassNotFoundException when I execute 
Caliper ...

Original comment by michael.tamm2 on 7 Aug 2013 at 8:40

GoogleCodeExporter commented 9 years ago
11 wins over 14?  Ick.

Original comment by gak@google.com on 7 Aug 2013 at 8:44

GoogleCodeExporter commented 9 years ago
Yeah, see 
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism
.html -- the version number does not count, but how "near" the dependency is ...

Original comment by michael.tamm2 on 7 Aug 2013 at 9:01