I am trying out the m2eclipse plugin. This plugin has the nice feature that
you can start a project based on an archetype, which in my opinion is
fantastic: not every open source project needs to write an eclipse plugin to
do this, they only need an archetype.
Anyway, I cannot get it to work. i found out that in background something
like the following is executed:
mvn archetype:generate -DarchetypeGroupId=org.mule.tools
-DarchetypeArtifactId=mule-project-archetype -DarchetypeVersion=2.0.1
This gives me the error below. Apparently this is because
'archetype-resources/pom.xml' is missing. Indeed I can only find a velocity
template (pom.vm).
Does this mean I can never use the mule project archetype with m2eclipse?
cheers,
jeroen
[INFO]
----------------------------------------------------------------------------
[INFO] Using following parameters for creating OldArchetype:
mule-project-archetype:2.0.1
[INFO]
----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: test
[INFO] Parameter: packageName, Value: test
[INFO] Parameter: package, Value: test
[INFO] Parameter: artifactId, Value: test
[INFO] Parameter: basedir, Value: C:\mydata\workspace_mule
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[ERROR] ResourceManager : unable to find resource
'archetype-resources/pom.xml' in any resource loader.
[ERROR] Failed to generate project from the old archetype
org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Failed to
generate project from the old archetype
at
org.apache.maven.archetype.generator.DefaultArchetypeGenerator.processOldArchetype(DefaultArchetypeGenerator.java:272)
at
org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:145)
at
org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:290)
at
org.apache.maven.archetype.DefaultArchetype.generateProjectFromArchetype(DefaultArchetype.java:75)
at
org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:185)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:224)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by:
org.apache.maven.archetype.old.ArchetypeTemplateProcessingException: Error
merging velocity templates
at
org.apache.maven.archetype.old.DefaultOldArchetype.processTemplate(DefaultOldArchetype.java:911)
at
org.apache.maven.archetype.old.DefaultOldArchetype.processTemplate(DefaultOldArchetype.java:748)
at
org.apache.maven.archetype.old.DefaultOldArchetype.processTemplates(DefaultOldArchetype.java:489)
at
org.apache.maven.archetype.old.DefaultOldArchetype.createArchetype(DefaultOldArchetype.java:337)
at
org.apache.maven.archetype.generator.DefaultArchetypeGenerator.processOldArchetype(DefaultArchetypeGenerator.java:255)
... 22 more
Caused by: org.apache.velocity.exception.ResourceNotFoundException: Unable
to find resource 'archetype-resources/pom.xml'
at
org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:452)
at
org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:335)
at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1102)
at
org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:498)
at
org.apache.maven.archetype.old.DefaultOldArchetype.processTemplate(DefaultOldArchetype.java:905)
... 26 more
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] : org.apache.maven.archetype.exception.ArchetypeGenerationFailure:
Failed to generate project from the old archetype
Failed to generate project from the old archetype
--
View this message in context: http://www.nabble.com/mvn-archetype%3Agenerate-%2B-mule-project-archetype-tp17990452p17990452.html
Sent from the Mule - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
==================================================================
6/18/08 11:06:34 AM BRT: [INFO] User settings file does not exist
C:\Documents and Settings\Fast\.m2\settings.xml
6/18/08 11:06:41 AM BRT: [INFO] User settings file does not exist
C:\Documents and Settings\Fast\.m2\settings.xml
6/18/08 11:06:50 AM BRT: Downloading central :
nexus-maven-repository-index.properties
6/18/08 11:06:50 AM BRT: Downloaded [central] ->
http://repo1.maven.org/maven2/.index/nexus-maven-repository-index.properties
6/18/08 11:06:50 AM BRT: No index update available for central
6/18/08 7:23:31 PM BRT: [INFO] Setting property:
classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
6/18/08 7:23:31 PM BRT: [INFO] Setting property: velocimacro.messages.on =>
'false'.
6/18/08 7:23:31 PM BRT: [INFO] Setting property: resource.loader =>
'classpath'.
6/18/08 7:23:31 PM BRT: [INFO] Setting property:
resource.manager.logwhenfound => 'false'.
6/18/08 7:23:36 PM BRT: [INFO]
----------------------------------------------------------------------------
6/18/08 7:23:36 PM BRT: [INFO] Using following parameters for creating
OldArchetype: mule-project-archetype:2.0.1
6/18/08 7:23:36 PM BRT: [INFO]
----------------------------------------------------------------------------
6/18/08 7:23:36 PM BRT: [INFO] Parameter: groupId, Value: com.druid
6/18/08 7:23:36 PM BRT: [INFO] Parameter: packageName, Value: com.druid.odin
6/18/08 7:23:36 PM BRT: [INFO] Parameter: basedir, Value: C:/Projects
6/18/08 7:23:36 PM BRT: [INFO] Parameter: package, Value: com.druid.odin
6/18/08 7:23:36 PM BRT: [INFO] Parameter: version, Value: 0.0.1-SNAPSHOT
6/18/08 7:23:36 PM BRT: [INFO] Parameter: artifactId, Value: odin
6/18/08 7:23:36 PM BRT: [ERROR] Failed to generate project from the old
archetype Failed to generate project from the old archetype
==================================================================
Regards,
Marcio.
Have a look at
http://mule.mulesource.org/display/MULE2USER/Project+Archetype which
describes how to use the project archetype.
Note especially which archetype goal we use (create) vs the one that you
found out (generate).
We create and compile a sample project as part of our daily build so I'm
pretty sure that the archetype works per se. Cannot comment on m2eclipse
though ...
HTH,
-dirk
Dirk Olmes-5 wrote:Have a look at http://mule.mulesource.org/display/MULE2USER/Project+Archetype which describes how to use the project archetype. Note especially which archetype goal we use (create) vs the one that you found out (generate).