You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brian Fox (JIRA)" <ji...@codehaus.org> on 2008/02/19 00:00:29 UTC

[jira] Updated: (ARCHETYPE-122) The defined artifact is not an archetype?

     [ http://jira.codehaus.org/browse/ARCHETYPE-122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Fox updated ARCHETYPE-122:
--------------------------------

    Fix Version/s:     (was: 2.0-alpha-2)
                   2.0-alpha-3

> The defined artifact is not an archetype?
> -----------------------------------------
>
>                 Key: ARCHETYPE-122
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-122
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Archetypes
>    Affects Versions: 2.0-alpha-1
>         Environment: Maven version: 2.0.8
> Java version: 1.6.0
> OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
>            Reporter: Geert Pante
>             Fix For: 2.0-alpha-3
>
>         Attachments: ebit-test-archetype-1.0-SNAPSHOT.jar, ebit-test-archetype-1.0-SNAPSHOT.pom, ebit-test-archetype.zip
>
>
> I'm using maven-archetype-plugin from http://people.apache.org/~rafale/staging-repo/maven-archetype-plugin/.
> I'm stuck trying to create a basic archetype. I created a POM with packaging=maven-archetype and build extension org.apache.maven.archetype:archetype-packaging:2.0-alpha-1. I put the resources from https://svn.apache.org/repos/asf/maven/archetype/tags/maven-archetype-2.0-alpha-1/archetype-common/src/test/archetypes/basic-1.0 under src/main/resources and managed to package and install the archetype.
> However, when I try to generate a new project from the archetype, I get:
> -> The defined artifact is not an archetype
> I see in the code that you first try to parse META-INF/maven/archetype-metadata.xml, and then META-INF/maven/archetype.xml. I assume that my archetype-metadata.xml is correct, but I'm not sure. I don't need to have an archetype.xml, I guess...
> See attachment for sample project, and full stack trace below:
> E:\>mvn -e archetype:create -DarchetypeCatalog=local
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'archetype'.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Maven Default Project
> [INFO]    task-segment: [archetype:create] (aggregator-style)
> [INFO] ------------------------------------------------------------------------
> [INFO] Preparing archetype:create
> [INFO] No goals needed for project - skipping
> [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus
> .velocity.ContextClassLoaderResourceLoader'.
> [INFO] Setting property: velocimacro.messages.on => 'false'.
> [INFO] Setting property: resource.loader => 'classpath'.
> [INFO] Setting property: resource.manager.logwhenfound => 'false'.
> [INFO] [archetype:create]
> Choose archetype:
> 1: local -> ebit-test-plugin (ebit-test-plugin)
> 2: local -> ebit-test-archetype (ebit-test-archetype)
> Choose a number:  (1/2): 2
> [INFO] ------------------------------------------------------------------------
> [DEBUG] Can not load old archetype
> java.io.IOException: The META-INF/maven/archetype.xml descriptor cannot be found.
>         at org.apache.maven.archetype.common.DefaultArchetypeArtifactManager.getOldArchetypeDescriptorReader(DefaultArchetypeArtifactManager.java:589)
>         at org.apache.maven.archetype.common.DefaultArchetypeArtifactManager.loadOldArchetypeDescriptor(DefaultArchetypeArtifactManager.java:542)
>         at org.apache.maven.archetype.common.DefaultArchetypeArtifactManager.isOldArchetype(DefaultArchetypeArtifactManager.java:506)
>         at org.apache.maven.archetype.common.DefaultArchetypeArtifactManager.isOldArchetype(DefaultArchetypeArtifactManager.java:271)
>         at org.apache.maven.archetype.ui.DefaultArchetypeGenerationConfigurator.configureArchetype(DefaultArchetypeGenerationConfigurator.java:125)
>         at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:167)
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] The defined artifact is not an archetype
> [INFO] ------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: The defined artifact is not an archetype
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
> Caused by: org.apache.maven.plugin.MojoExecutionException: The defined artifact is not an archetype
>         at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:173)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
>         ... 16 more
> Caused by: org.apache.maven.archetype.exception.ArchetypeGenerationConfiguration
> Failure: The defined artifact is not an archetype
>         at org.apache.maven.archetype.ui.DefaultArchetypeGenerationConfigurator.configureArchetype(DefaultArchetypeGenerationConfigurator.java:139)
>         at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:167)
>         ... 18 more
> [INFO] ------------------------------------------------------------------------

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira