archetype:create purpose is to create a project from a defined archetype

to create an archetype, you have the archetype:create-from-project goal

Raphaêl

2007/8/1, Mick Knutson <[EMAIL PROTECTED]>:
>
> SO how can I create an archetype from an existing module I have?
>
>
>
>
> On 8/1/07, Raphaël Piéroni <[EMAIL PROTECTED]> wrote:
> >
> > This is because you did mvn archetype:create in a directory containing a
> > project.
> > And that project has its packaging different from 'pom'.
> >
> > Considering a directory tree of projects, projects descriptors (
> > pom.xmlfiles)
> > located in the leaves of that tree are not constrained but descriptors
> > located
> > at root or junctions must have <packaging>pom</packaging>.
> >
> > I'm not sure of this his the correct maven behaviour, but it is the
> > behaviour assumed by the archetype plugin.
> >
> > Hope this help
> >
> > Raphaël
> >
> >
> > 2007/8/1, Mick Knutson <[EMAIL PROTECTED]>:
> > >
> > > I have a mock module that I want to make into an archetype.
> > >
> > > I have my pom.xml:
> > >
> > > <project xmlns="http://maven.apache.org/POM/4.0.0";
> > >          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > >          xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0
> > > http://maven.apache.org/maven-v4_0_0.xsd";>
> > >     <modelVersion>4.0.0</modelVersion>
> > >
> > >     <groupId>org.delta.esp.dap.tools.archetypes</groupId>
> > >     <artifactId>c2-bpel-archetype</artifactId>
> > >     <version>1.0.0.0</version>
> > >     <packaging>maven-plugin</packaging>
> > >
> > >     <parent>
> > >         <groupId>org.delta.esp.dap.tools</groupId>
> > >         <artifactId>archetypes</artifactId>
> > >         <version>1.0.0.0</version>
> > >     </parent>
> > > </project>
> > >
> > >
> > > Then my mock structure:
> > >
> > >
> > >
> >
> C:\viewstore\esp_lynx_dap\esp\dap\tools\archetypes\c2-bpel-archetype\src\main\resources\archetype-resources\pom.xml
> > >
> > > <project xmlns="http://maven.apache.org/POM/4.0.0";
> > >          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > >          xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0
> > > http://maven.apache.org/maven-v4_0_0.xsd";>
> > >     <modelVersion>4.0.0</modelVersion>
> > >
> > >
> > >     <groupId>${groupId}</groupId>
> > >     <version>${version}</version>
> > >     <artifactId>${artifactId}</artifactId>
> > >     <packaging>jar</packaging>
> > >
> > >     <build>
> > >     </build>
> > > </project>
> > >
> > >
> > >
> > >
> > > I get this error when I run this command:
> > > mvn archetype:create
> > > -DgroupId=
> > org.delta.esp.dap.tools.archetypes-DartifactId=c2-bpel-archetype
> > > -DarchetypeArtifactId=maven-archetype-archetype
> > >
> > >
> > >
> > >
> C:\viewstore\esp_lynx_dap\esp\dap\tools\archetypes\c2-bpel-archetype>mvn
> > > archetype:create
> > > -DgroupId=org.delta.esp.dap.tools.archetypes-DartifactId=c2-bpel
> > > -archetype  -DarchetypeArtifactId=maven-archetype-archetype
> > > [INFO] Scanning for projects...
> > > [INFO] Searching repository for plugin with prefix: 'archetype'.
> > > [INFO]
> > >
> > >
> >
> ----------------------------------------------------------------------------
> > > [INFO] Building Unnamed -
> > >
> >
> org.delta.esp.dap.tools.archetypes:c2-bpel-archetype:maven-plugin:1.0.0.0
> > > [INFO]    task-segment: [archetype:create] (aggregator-style)
> > > [INFO]
> > >
> > >
> >
> ----------------------------------------------------------------------------
> > > [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] **************************************************************
> > > [INFO] Starting Jakarta Velocity v1.4
> > > [INFO] RuntimeInstance initializing.
> > > [INFO] Default Properties File:
> > > org\apache\velocity\runtime\defaults\velocity.properties
> > > [INFO] Default ResourceManager initializing. (class
> > > org.apache.velocity.runtime.resource.ResourceManagerImpl)
> > > [INFO] Resource Loader Instantiated:
> > > org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
> > > [INFO] ClasspathResourceLoader : initialization starting.
> > > [INFO] ClasspathResourceLoader : initialization complete.
> > > [INFO] ResourceCache : initialized. (class
> > > org.apache.velocity.runtime.resource.ResourceCacheImpl)
> > > [INFO] Default ResourceManager initialization complete.
> > > [INFO] Loaded System Directive:
> > > org.apache.velocity.runtime.directive.Literal
> > > [INFO] Loaded System Directive:
> > > org.apache.velocity.runtime.directive.Macro
> > > [INFO] Loaded System Directive:
> > > org.apache.velocity.runtime.directive.Parse
> > > [INFO] Loaded System Directive:
> > > org.apache.velocity.runtime.directive.Include
> > > [INFO] Loaded System Directive:
> > > org.apache.velocity.runtime.directive.Foreach
> > > [INFO] Created: 20 parsers.
> > > [INFO] Velocimacro : initialization starting.
> > > [INFO] Velocimacro : adding VMs from VM library template :
> > > VM_global_library.vm
> > > [ERROR] ResourceManager : unable to find resource
> 'VM_global_library.vm'
> > > in
> > > any resource loader.
> > > [INFO] Velocimacro : error using  VM library template
> > VM_global_library.vm
> > > :
> > > org.apache.velocity.exception.ResourceNotFoundException: Unable to
> find
> > > resour
> > > ce 'VM_global_library.vm'
> > > [INFO] Velocimacro :  VM library template macro registration complete.
> > > [INFO] Velocimacro : allowInline = true : VMs can be defined inline in
> > > templates
> > > [INFO] Velocimacro : allowInlineToOverride = false : VMs defined
> inline
> > > may
> > > NOT replace previous VM definitions
> > > [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline
> will
> > be
> > > global in scope if allowed.
> > > [INFO] Velocimacro : initialization complete.
> > > [INFO] Velocity successfully started.
> > > [INFO] [archetype:create]
> > > [INFO] Defaulting package to group ID:
> > org.delta.esp.dap.tools.archetypes
> > > [INFO]
> > >
> > >
> >
> ----------------------------------------------------------------------------
> > > [INFO] Using following parameters for creating Archetype:
> > > maven-archetype-archetype:RELEASE
> > > [INFO]
> > >
> > >
> >
> ----------------------------------------------------------------------------
> > > [INFO] Parameter: groupId, Value: org.delta.esp.dap.tools.archetypes
> > > [INFO] Parameter: packageName, Value:
> org.delta.esp.dap.tools.archetypes
> > > [INFO] Parameter: basedir, Value:
> > > C:\viewstore\esp_lynx_dap\esp\dap\tools\archetypes\c2-bpel-archetype
> > > [INFO] Parameter: package, Value: org.delta.esp.dap.tools.archetypes
> > > [INFO] Parameter: version, Value: 1.0-SNAPSHOT
> > > [INFO] Parameter: artifactId, Value: c2-bpel-archetype
> > > [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'
> > > [INFO]
> > >
> ------------------------------------------------------------------------
> > > [INFO] For more information, run Maven with the -e switch
> > > [INFO]
> > >
> ------------------------------------------------------------------------
> > > [INFO] Total time: 2 seconds
> > > [INFO] Finished at: Wed Aug 01 08:55:09 PDT 2007
> > > [INFO] Final Memory: 5M/9M
> > > [INFO]
> > >
> ------------------------------------------------------------------------
> > >
> > > C:\viewstore\esp_lynx_dap\esp\dap\tools\archetypes\c2-bpel-archetype>
> > >
> > >
> > >
> > >
> > >
> > > --
> > >
> > > Thanks,
> > > Mick Knutson
> > >
> > > http://www.baselogic.com
> > > http://www.blincmagazine.com
> > > http://www.djmick.com
> > > http://www.myspace.com/mickknutson
> > > http://www.myspace.com/djmick_dot_com
> > > http://www.myspace.com/sexybeotches
> > > http://www.thumpradio.com
> > > ---
> > >
> >
>
>
>
> --
>
> Thanks,
> Mick Knutson
>
> http://www.baselogic.com
> http://www.blincmagazine.com
> http://www.djmick.com
> http://www.myspace.com/mickknutson
> http://www.myspace.com/djmick_dot_com
> http://www.myspace.com/sexybeotches
> http://www.thumpradio.com
> ---
>

Reply via email to