JMH support for JVM languages

Aggelos Biboudis biboudis at gmail.com
Wed Apr 2 21:41:58 UTC 2014


Thanks!

A small quirk that I noticed is that in my project hierarchy:
+project/
|----- java/
|----- scala/

if I fire up mvn from the top level directory project/ for the java project
it works:

> $ mvn -f ./java/pom.xml clean install
> <OK>
> $ java -jar java/target/microbenchmarks.jar -gc true -f 1 -i 3 -wi 3
> <OK>


if I fire up mvn from the top level directory project/ for the scala
project it compiles, but when I try to run it I get this message:

> $ java -jar scala/target/microbenchmarks.jar -gc true -f 1 -i 3 -wi 3
> No matching benchmarks. Miss-spelled regexp?
> Use EXTRA verbose mode to debug the pattern matching.
>

and under  project/ a directory appears named target/ with two empty files.

$ tree target/
> target/
> └── classes
>     └── META-INF
>         ├── CompilerHints
>         └── MicroBenchmarks
>
> 2 directories, 2 files
>

if I cd into scala/ and invoke maven from there, it compiles, packages and
runs my microbenchmarks perfectly ok.

I used the 0.5.5 version artifact template generator for the java project
and 1.0 for my scala one. My

Kind regards,
Aggelos Biboudis.



On Wed, Apr 2, 2014 at 1:13 PM, Aleksey Shipilev <
aleksey.shipilev at oracle.com> wrote:

> Cool. Nothing to be apologetic about! One of the reasons why we don't
> set up all the environment for other JVM languages is because those get
> old all the time.
>
> -Aleksey.
>
> On 04/02/2014 06:35 AM, Aggelos Biboudis wrote:
> > My apologies again for before, I was so desperate to unify my scala/java
> > micro benchrmaks under jmh that I rushed into sending email before even
> > editing the pom.xml.
> >
> > I used jmh tonight with a scala pet-project (methods that perform some
> > operations on collections) and I also used it with a macro-based project.
> > Everything seems fine!
> >
> > Kind regards,
> > Aggelos.
> >
> >
> >
> > On Wed, Apr 2, 2014 at 3:49 AM, Aggelos Biboudis <biboudis at gmail.com>
> wrote:
> >
> >> My bad. Sorry, Ι rushed into sending email. :)
> >>
> >>
> >> On Wed, Apr 2, 2014 at 3:42 AM, Aggelos Biboudis <biboudis at gmail.com
> >wrote:
> >>
> >>> Hi!
> >>>
> >>> I got this one at the mvn clean install after generating the sample
> >>> project (I didn't even reach the *5) Hack, hack, hack!* xD). The
> version
> >>> for the scala-library doesn't seem to be passed properly.
> >>>
> >>> Downloading:
> >>>>
> http://repo.maven.apache.org/maven2/org/scala-lang/scala-library/0.0.0/scala-library-0.0.0.jar
> >>>> [INFO]
> >>>>
> ------------------------------------------------------------------------
> >>>> [INFO] BUILD FAILURE
> >>>> [INFO]
> >>>>
> ------------------------------------------------------------------------
> >>>> [INFO] Total time: 37.257s
> >>>> [INFO] Finished at: Wed Apr 02 03:30:02 EEST 2014
> >>>> [INFO] Final Memory: 10M/90M
> >>>> [INFO]
> >>>>
> ------------------------------------------------------------------------
> >>>> [ERROR] Failed to execute goal
> >>>> net.alchim31.maven:scala-maven-plugin:3.1.6:compile (default) on
> project
> >>>> test: wrap:
> org.apache.maven.artifact.resolver.ArtifactNotFoundException:
> >>>> Could not find artifact org.scala-lang:scala-library:jar:0.0.0 in
> central (
> >>>> http://repo.maven.apache.org/maven2)
> >>>> [ERROR]
> >>>> [ERROR] Try downloading the file manually from the project website.
> >>>> [ERROR]
> >>>> [ERROR] Then, install it using the command:
> >>>> [ERROR] mvn install:install-file -DgroupId=org.scala-lang
> >>>> -DartifactId=scala-library -Dversion=0.0.0 -Dpackaging=jar
> >>>> -Dfile=/path/to/file
> >>>> [ERROR]
> >>>> [ERROR] Alternatively, if you host your own repository you can deploy
> >>>> the file there:
> >>>> [ERROR] mvn deploy:deploy-file -DgroupId=org.scala-lang
> >>>> -DartifactId=scala-library -Dversion=0.0.0 -Dpackaging=jar
> >>>> -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
> >>>> [ERROR]
> >>>> [ERROR]
> >>>> [ERROR] org.scala-lang:scala-library:jar:0.0.0
> >>>> [ERROR]
> >>>> [ERROR] from the specified remote repositories:
> >>>> [ERROR] central (http://repo.maven.apache.org/maven2, releases=true,
> >>>> snapshots=false)
> >>>> [ERROR] -> [Help 1]
> >>>> [ERROR]
> >>>> [ERROR] To see the full stack trace of the errors, re-run Maven with
> the
> >>>> -e switch.
> >>>> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> >>>> [ERROR]
> >>>> [ERROR] For more information about the errors and possible solutions,
> >>>> please read the following articles:
> >>>> [ERROR] [Help 1]
> >>>>
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> >>>>
> >>>
> >>> Kind regards,
> >>> Aggelos.
> >>>
> >>> --
> >>> @biboudis <https://twitter.com/biboudis>
> >>>
> >>>
> >>
>
>


More information about the jmh-dev mailing list