Question

I git clone souce code from code.google.com when i set guava-tests module benchmark as maven source root ,but it's also error how to solve it? see the picture
follow Frank advice I change to bechmark maked as a "Test Source Root"
but the Idea dislplay can't resolve symbol BeforeExperiment,but my .m2/repository has the jar .see the first screenshot
. enter image description here enter image description here enter image description here

when i exec ,the result is below ,it is empty.

caliper  jar tf 1.0-beta-1/caliper-1.0-beta-1.jar|grep -E com.google.caliper.BeforeExperiment |sort
caliper  jar tf 0.5-rc1/caliper-0.5-rc1.jar|grep -E com.google.caliper.BeforeExperiment |sort
caliper  jar tf 1.0-beta-1/caliper-1.0-beta-1.jar|grep -E com.google.caliper.BeforeExperiment |sort
Was it helpful?

Solution

The guava-tests/benchmark directory is currently not set as a source root in the Maven configuration because it won't build. That said, we just need to push a new version of Caliper to Maven Central that includes the new annotations and such, and I think that should be happening sometime soon.

OTHER TIPS

No publicly available version of Caliper contains the com.google.caliper.BeforeExperiment class.

You can compare the result of the following class searches on search.maven.org for yourself:

You can also check what's in your jar:

$ jar tf ~/.m2/repository/com/google/caliper/caliper/0.5-rc1/caliper-0.5-rc1.jar | \
    grep -E com.google.caliper.B | sort
com/google/caliper/Benchmark.class
$

Or using the most recent "release" of Caliper:

$ jar tf caliper-1.0-beta-1.jar | grep -E com.google.caliper.B | sort
com/google/caliper/Benchmark.class
$
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top