Hi,
I played with the new archetype plugin (2.0-alpha-2) to test the
feature to have additional properties when creating a project from an
archetype.
Started by creating a new project with the quickstart archetype and
then generated an archetype project with "mvn archetype:create-from-
project" from the created quickstart project. Added properties to the
created archetype-metadata.xml file. The metadata file now looks like
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor name="proptest">
<requiredProperties>
<requiredProperty key="property-with-default">
<defaultValue>default-value</defaultValue>
</requiredProperty>
<requiredProperty key="property-without-default"/>
</requiredProperties>
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/test/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>
The archetype was installed in local repo and tested with "mvn
archetype:generate -DarchetypeCatalog=local" and it worked.
Next test was to use the archetype with m2eclipse. I used the "New
Maven Project" wizard and picked the archetype just created from the
local catalog. In the last dialog of the wizard you can enter values
for group id, artifact id, version and package, but not for the
additional properties defined in the metadata file. And therefore the
project creation will fail with the message "Unable to create project
from archetype [com.acme:proptest:1.0-SNAPSHOT -> null] Archetype is
not configured".
Are properties defined in archetype metada supposed to work with
m2eclipse?
Thanks,
Esa
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email