You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by mraible <ma...@raibledesigns.com> on 2006/10/09 01:47:01 UTC

Using archetype:create to generate an archetype from an existing project

I'm trying to use the archetype plugin to create an archetype from an
existing project. From the following issue, I'm not quite sure if this
functionality exists or not:

http://jira.codehaus.org/browse/ARCHETYPE-31

When I try to run archetype:create against Equinox
(http://equinox.dev.java.net), I get the following error:

mvn archetype:create -DgroupId=org.appfuse
-DartifactId=equinox-spring-hibernate -Dpackaging=war

[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error creating from archetype

Embedded error: Unable to add module to the current project as it is not of
packaging type 'pom'

Is it possible to create an archetype from an existing project?

Thanks,

Matt
-- 
View this message in context: http://www.nabble.com/Using-archetype%3Acreate-to-generate-an-archetype-from-an-existing-project-tf2407158.html#a6709860
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Using archetype:create to generate an archetype from an existing pro

Posted by mraible <ma...@raibledesigns.com>.


Wayne Fay wrote:
> 
> Matt,
> 
> I don't believe this functionality has been implemented in any
> released plugins. IIUC, you're looking for the archetype plugin to
> look at your project and turn it into an archetype, which you can
> later use to create future projects/modules, right? Use your current
> project as a baseline for future work etc without all the work of
> *actually* creating an official archetype...
> 
> 

Yes, this is what I'm looking for.  Listing all the files in an XML file[1]
seems somewhat painful to me.  Equinox has 35[2] different combinations that
can be created, and it'd be quite a bit of work to write the archetype
descriptor for each one.

Thanks,

Matt

[1] http://maven.apache.org/guides/mini/guide-creating-archetypes.html
[2] http://home.raibledesigns.com:8280/artifacts/equinox-1.x/20061008173744/

-- 
View this message in context: http://www.nabble.com/Using-archetype%3Acreate-to-generate-an-archetype-from-an-existing-project-tf2407158.html#a6710331
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Using archetype:create to generate an archetype from an existing project

Posted by Wayne Fay <wa...@gmail.com>.
Matt,

I don't believe this functionality has been implemented in any
released plugins. IIUC, you're looking for the archetype plugin to
look at your project and turn it into an archetype, which you can
later use to create future projects/modules, right? Use your current
project as a baseline for future work etc without all the work of
*actually* creating an official archetype...

The reason you are getting this error message is that the
archetype:create command is attempting to create a new module in the
current project, but modules are only supported in projects with
packaging type pom, and its seem you're in a non-POM (probably WAR)
project directory.

HTH.
Wayne

On 10/8/06, mraible <ma...@raibledesigns.com> wrote:
>
> I'm trying to use the archetype plugin to create an archetype from an
> existing project. From the following issue, I'm not quite sure if this
> functionality exists or not:
>
> http://jira.codehaus.org/browse/ARCHETYPE-31
>
> When I try to run archetype:create against Equinox
> (http://equinox.dev.java.net), I get the following error:
>
> mvn archetype:create -DgroupId=org.appfuse
> -DartifactId=equinox-spring-hibernate -Dpackaging=war
>
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error creating from archetype
>
> Embedded error: Unable to add module to the current project as it is not of
> packaging type 'pom'
>
> Is it possible to create an archetype from an existing project?
>
> Thanks,
>
> Matt
> --
> View this message in context: http://www.nabble.com/Using-archetype%3Acreate-to-generate-an-archetype-from-an-existing-project-tf2407158.html#a6709860
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org