Hi Raphaël,

Thanks for getting back to me.  Yes I tried executing the
'archetype:create-from-project' goal with and without interactive mode
enabled.
When interactive mode was enabled I tried that with and without additional
properties.  All of the situations created the same archetype without the
expected values for the groupId and artifactId.  When I used interactive
mode and then just step through the process, (saying no to additional
properties and yes to the default values) I got the following output.  The
default values show the groupId and the artifactId of the original project.
After I say no to additional properties the plugin shows me the another
archetype artifactId, but this never gets pasted through.

[INFO] [archetype:create-from-project]
[INFO] Setting default archetype's groupId: com.mycompany.example
[INFO] Setting default archetype's artifactId: *myapp*
[INFO] Setting default archetype's version: 1.0-SNAPSHOT
[INFO] Setting default groupId: com.mycompany.example
[INFO] Setting default artifactId: myapp
[INFO] Setting default version: 1.0-SNAPSHOT
[INFO] Setting default package: com.mycompany.example.myapp

Add a new custom property Y: : n

Confirm archetype configuration:
archetype.groupId=com.mycompany.example
archetype.artifactId=*myapp-archetype*
archetype.version=1.0-SNAPSHOT
version=1.0-SNAPSHOT
package=com.mycompany.example.myapp
groupId=com.mycompany.example
artifactId=myapp

Totally happy to raise this in Jira, just wanted to make sure I understood
this completely what was happening.

Trent



2008/6/24 Raphaël Piéroni <[EMAIL PROTECTED]>:

> Hi Trent,
>
> Does the interactive (without additional properties) and the non
> interactive execution of create-from-project
> both gives you a wrongly named archetype ?
>
> Please feel free to raise a jira, as it seems by your explain that
> this is a bug.
> http://jira.codehaus.org/secure/BrowseProject.jspa?id=11095
>
> Regards,
>
> Raphaël
>
> 2008/6/24 Trent Rosenbaum <[EMAIL PROTECTED]>:
> > Hi everyone,
> >
> > I was wondering if anyone would be able to help me explain what I am
> > experiencing when I execute the Maven 'archetype:create-from-project'
> goal
> > on a simple Maven project.
> > I have a simple maven project created from the original quickstart
> process.
> >  Everything is left normal and it has the following project details
> >
> > groupId:  *com.mycompany.example*
> > artifactId:  *myapp*
> >
> > Now what I wanted to do was use the achetype plugin to generate a new
> > archetype for another time.  I execute the following on the command line
> and
> > the plugin begins.
> >
> > *mvn archetype:create-from-project -Dinteractive=true*
> >
> > I do not add any new custom properties and I am asked to confirm the
> > following before the new archetype is created.
> >
> > archetype.groupId=*com.mycompany.example*
> > archetype.artifactId=*myapp-archetype*
> > archetype.version=*1.0-SNAPSHOT*
> > version=*1.0-SNAPSHOT*
> > package=*com.mycompany.example.myapp*
> > groupId=*com.mycompany.example*
> > artifactId=*myapp*
> >
> > The above values look fine.  My understanding is that the plugin will
> > generate an artifact with the following values
> >
> > groupId:  *com.mycompany.example*
> > artifactId:  *myapp-archetype*
> >
> > Instead I get a generated artifact with the following values
> >
> > groupId:  *com.mycompany.example*
> > artifactId:  *myapp*
> >
> > This archetype now will occupy the same repository location as the
> original
> > project that I used to create the new archetype in the first place.  I
> have
> > tried to override the all of the properties, (archetype.groupId,
> > archetype.artifactId, groupId and artifactId) and I still get the same
> > problem.  With the plugin in its current state, (version: 2.0-alpha-3) am
> I
> > expecting to much from it or should it be work as expected above?  I
> guess I
> > could edit the pom.xml for the new archetype, but I thought that the use
> of
> > interactive mode meant that I would not have to do that.  Instead I
> thought
> > I would be able to execute the plugin, install the archetype and then
> > generate the new project without having to explore the newly generated
> > sources.
> >
> > Any help would be great.  I really like the plugin over the old version,
> but
> > there just seems to be something that is not clicking with me.
> >
> > Many thanks
> > Trent
> > *
> > *
> >
>

Reply via email to