[ https://jira.codehaus.org/browse/ARCHETYPE-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=280324#comment-280324 ]
Rob Manning commented on ARCHETYPE-216: --------------------------------------- I'll take you up on your offer for an explanation. I think I understand the motivation for this issue. Perhaps it is just a misunderstanding of the documentation, or perhaps there is a missing feature here. I want to create an archetype that let's me give an alternative default value for the package; one that is different from the value specified as the groupId. Here is an example of the problem as I see it. Issue the following maven command: mvn archetype:generate -DarchetypeGroupId=net.sf.squirrel-sql.plugins -DarchetypeArtifactId=squirrelsql-plugin-archetype -DarchetypeVersion=3.3.0-rc2 It will prompt you for the groupId and suppose you enter "net.sf.squirrel-sql.plugins" Next it will prompt you for artifactId and version, specify whatever I don't care. However, the next prompt is: Define value for property 'package': net.sf.squirrel-sql.plugins: : Here is where the archetype plugin takes a bad turn. You see, Maven groupIds prefer dashes ("-"), but the Java compiler forbids dashes in package names. Yet the archetype plugin simply spits out what the user gave as the groupId. Ok, so how do I configure the archetype to let me override the default value for property "package" ? Like I said, it could just be a documentation issue, as I simply don't see how you specify this override for maven required properties. I suspect the original poster attempted to list "groupId", "artifactId", "version", and/or "package" in the "requiredProperties" section of the archetype-metadata.xml file and ran into this exception. Is this supported now ? Rob > Default value for properties groupId, artifactId, version, package don't > work... > -------------------------------------------------------------------------------- > > Key: ARCHETYPE-216 > URL: https://jira.codehaus.org/browse/ARCHETYPE-216 > Project: Maven Archetype > Issue Type: Bug > Components: Generator > Affects Versions: 2.0-alpha-4 > Environment: WinXP SP2, java version "1.5.0_14" > Reporter: Juergen Haeussler > > ... as it is described in the online documentation: > http://maven.apache.org/plugins/maven-archetype-plugin/specification/archetype-metadata.html > When I try to specify them in archetype-metadata.html I get the following > exception: > {noformat}[ERROR] The archetype is not configured > org.apache.maven.archetype.exception.ArchetypeNotConfigured: The archetype is > not configured > at > org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.generateArchetype(DefaultFilesetArchetypeGenerator.java:98) > at > org.apache.maven.archetype.generator.DefaultArchetypeGenerator.processFileSetArchetype(DefaultArchetypeGenerator.java:215) > at > org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:130) > 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:170) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:227) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) > 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:585) > 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){noformat} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira