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

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

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
         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

        

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

Posted by "Geert Pante (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/ARCHETYPE-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_126358 ] 

Geert Pante commented on ARCHETYPE-122:
---------------------------------------

Fixed in 2.0-alpha-2.

It took me a while to realize that you split up 'generate' from 'create', but mvn archetype:generate worked without complaining about the archetype.

Good job.

> 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

        

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

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
     [ 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

        

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

Posted by "amartino (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/ARCHETYPE-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_124592 ] 

amartino commented on ARCHETYPE-122:
------------------------------------

it seems to be related with artifact jar file creation process. Try to open the jar  (i.e winrar) file, modify any entry and save the artifact



> 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

        

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

Posted by "Geert Pante (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/ARCHETYPE-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_123137 ] 

Geert Pante commented on ARCHETYPE-122:
---------------------------------------

Hi Raphaƫl,

I started with mvn archetype:create-from-project with a very simple project. This created an archetype with both archetype.xml and archetype-metadata.xml. I removed the archetype.xml and installed that one. I got the same error: The defined artifact is not an archetype.

That's when I decided to pick a sample from your tests (archetype-common/src/test/archetypes/basic-1.0), and try that one, but still no success. 
The attached zip contains the source project. Do you see anything wierd in that? Did I put files in the wrong places? They are in the same place as where archetype:create-from-project put them. except that I removed archetype.xml...

Any Ideas? I'll try to debug it to see where the error comes from.



> 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-2
>
>         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