Get NoClassDefFoundError for commons-lang StringUtils creating archetype

Henri Tremblay henri.tremblay at gmail.com
Sat May 23 10:08:47 UTC 2020


It runs flawlessly on my machine (with Maven 3.6.3).

Version 3.1.2 of the maven-archetype-plugin is used.

Can you please upgrade Maven just in case?

On Sat, 23 May 2020 at 02:46, David Karr <davidmichaelkarr at gmail.com> wrote:

> Maven 3.5.2, Java 8.
>
> This is my command line (copied directly from the docs, just changing the
> artifactId):
>
>     mvn archetype:generate -DinteractiveMode=false
> -DarchetypeGroupId=org.openjdk.jmh
> -DarchetypeArtifactId=jmh-java-benchmark-archetype
> -DgroupId=com.att.example -DartifactId=jmhBenchmarks -Dversion=1.0
>
> On Fri, May 22, 2020 at 6:23 PM Henri Tremblay <henri.tremblay at gmail.com>
> wrote:
>
>> It should work.
>>
>> We need some details.
>>
>> Maven version? 3.6.3?
>> Archetype? jmh-java-benchmark-archetype:1.23
>> Java 8?
>>
>>
>> On Fri, 22 May 2020 at 18:58, David Karr <davidmichaelkarr at gmail.com>
>> wrote:
>>
>>> I've used JMH in the past, and I've always started by creating an
>>> archetype.  Today I tried it, only changing the artifact id from the
>>> command line in the docs.  It ran for quite a while, downloading
>>> artifacts,
>>> and then I saw this:
>>>
>>> [WARNING] Error initializing:
>>> org.codehaus.plexus.velocity.DefaultVelocityComponent at 57d0fc89
>>> java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils
>>>     at
>>> org.apache.velocity.runtime.resource.ResourceManagerImpl.initialize
>>> (ResourceManagerImpl.java:161)
>>>
>>> followed by just about the longest stack trace I've ever seen.  This was
>>> followed by many copies of the same trace.
>>>
>>> I also checked my local .m2 repository, and I don't have this jar
>>> installed
>>> (I have lang3). I searched in the maven output for a reference to that
>>> library. It showed attempts to download other commons libraries, but not
>>> commons-lang.
>>>
>>


More information about the jmh-dev mailing list