Maven Archetype

Missing class org/apache/commons/lang/StringUtils

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Not A Bug
  • Affects Version/s: 2.0-alpha-3
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    mvn 2.0.9
    java 1.6_06
  • Number of attachments :
    2

Description

mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.mycompany.app -DartifactId=my-app

throws ...

[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org/apache/commons/lang/StringUtils
org.apache.commons.lang.StringUtils
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils
at org.apache.velocity.runtime.resource.ResourceManagerImpl.initialize(R
esourceManagerImpl.java:165)
at org.apache.velocity.runtime.RuntimeInstance.initializeResourceManager
(RuntimeInstance.java:594)

Any ideas?

  1. 2008-06-05-trace.txt
    05/Jun/08 1:52 PM
    75 kB
    Raphaël Piéroni
  2. mvn-debug.txt
    05/Jun/08 7:56 AM
    82 kB
    Gabriel Lincourt

Activity

Hide
Raphaël Piéroni added a comment -

Can you please try
1) without -DarchetypeGroupId.
2) with a clean local repository

Thanks

Show
Raphaël Piéroni added a comment - Can you please try 1) without -DarchetypeGroupId. 2) with a clean local repository Thanks
Hide
Gabriel Lincourt added a comment -

Thanks for the tips, Raphaël.
(Andreas reported this issue for my benefit)

I cleaned everything out of my local repository, and then ran just: "mvn archetype:generate"
....and became the exact same error message as before...
java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils

Show
Gabriel Lincourt added a comment - Thanks for the tips, Raphaël. (Andreas reported this issue for my benefit) I cleaned everything out of my local repository, and then ran just: "mvn archetype:generate" ....and became the exact same error message as before... java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils
Hide
Gabriel Lincourt added a comment - - edited

I have attached the output from running "mvn -X archetype:generate"

Btw, we are using an Artifactory server to "proxy" and cache all repository requests.

Show
Gabriel Lincourt added a comment - - edited I have attached the output from running "mvn -X archetype:generate" Btw, we are using an Artifactory server to "proxy" and cache all repository requests.
Hide
Gabriel Lincourt added a comment - - edited

Shouldn't there perhaps be:

<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>

....in the org\apache\maven\archetype\archetype-common\2.0-alpha-3\archetype-common-2.0-alpha-3.pom?

Without it, Maven isn't retrieving the commons-lang repository, which I assume is needed for the archetype to run!?

PS, if I add the dependency to the pom, archetype:generate progresses further, but still has some serious issues. But.... archetype:create works!

Show
Gabriel Lincourt added a comment - - edited Shouldn't there perhaps be: <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> </dependency> ....in the org\apache\maven\archetype\archetype-common\2.0-alpha-3\archetype-common-2.0-alpha-3.pom? Without it, Maven isn't retrieving the commons-lang repository, which I assume is needed for the archetype to run!? PS, if I add the dependency to the pom, archetype:generate progresses further, but still has some serious issues. But.... archetype:create works!
Hide
Raphaël Piéroni added a comment -

Here i tried with a fresh repository.
I use nexus to proxy repositories.
Could it be an artifactory bug?
Is it working without any proxy?

Show
Raphaël Piéroni added a comment - Here i tried with a fresh repository. I use nexus to proxy repositories. Could it be an artifactory bug? Is it working without any proxy?
Hide
Gabriel Lincourt added a comment - - edited

Raphaël, thank you for your help!
Turns out, it is infact indirectly an "issue" with Artifactory. (Without any repository proxy, everything works perfectly for me as well

Artifactory is working as designed, but the Velocity 1.5 POM is faulty. Problem described here:
http://www.nabble.com/problem-with-velocity:velocity:1.5-td15005415.html

Show
Gabriel Lincourt added a comment - - edited Raphaël, thank you for your help! Turns out, it is infact indirectly an "issue" with Artifactory. (Without any repository proxy, everything works perfectly for me as well Artifactory is working as designed, but the Velocity 1.5 POM is faulty. Problem described here: http://www.nabble.com/problem-with-velocity:velocity:1.5-td15005415.html
Hide
Raphaël Piéroni added a comment -

as stated in the comment

Show
Raphaël Piéroni added a comment - as stated in the comment

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: