Issue Details (XML | Word | Printable)

Key: ARCHETYPE-181
Type: Bug Bug
Status: Closed Closed
Resolution: Not A Bug
Priority: Major Major
Assignee: Unassigned
Reporter: Andreas Höhmann
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Maven Archetype

Missing class org/apache/commons/lang/StringUtils

Created: 05/Jun/08 07:29 AM   Updated: 07/Jun/08 09:15 AM
Component/s: None
Affects Version/s: 2.0-alpha-3
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Text File 2008-06-05-trace.txt (75 kB)
2. Text File mvn-debug.txt (82 kB)

Environment: mvn 2.0.9
java 1.6_06


 Description  « Hide
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?



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Raphaël Piéroni added a comment - 05/Jun/08 07:35 AM
Can you please try
1) without -DarchetypeGroupId.
2) with a clean local repository

Thanks


Gabriel Lincourt added a comment - 05/Jun/08 07:48 AM
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


Gabriel Lincourt added a comment - 05/Jun/08 07:56 AM - 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.


Gabriel Lincourt added a comment - 05/Jun/08 09:17 AM - 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!


Raphaël Piéroni added a comment - 05/Jun/08 01:52 PM
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?

Gabriel Lincourt added a comment - 06/Jun/08 02:37 AM - 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


Raphaël Piéroni added a comment - 07/Jun/08 09:15 AM
as stated in the comment