Creating archetypes: archetype.xml or archetype-metadata.xml or both?

2010-12-13 Thread pt
I am confused by some of the wording in the guide to creating archetypes
(http://maven.apache.org/guides/mini/guide-creating-archetypes.html):

 cut here ---
An archetype is made up of:
   * an archetype descriptor (archetype.xml in directory:
src/main/resources/META-INF/maven/).
...
Note: this mini-guide has been written for archetype plugin version
1.0.x ... . Archetype plugin 2.0.x ... __adds__ (emphasis mine) a new
archetype descriptor (stored in archetype-metadata.xml file)
 cut here ---

I interpret this as saying that to create a v2 archetype, both the
original archetype.xml and the v2 archetype-metadata.xml files are
required.  I'm having a hard type creating an archetype, and
maintaining two files that contain the same basic info is a bit of a
pain.



-- 
Insert your favorite quote here as a signature or risk looking like a
squeamish ossifrage

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



Problem while creating archetypes and encodings

2010-03-05 Thread Javier Díaz

Hello:

I'm trying to create and archetype from a project using a default 
encoding different from UTF-8. As states in the plugin page the option 
defaultEncoding could be used for that purpose but after configuring my 
pom and executing the command, the file archetype-metada.xml still uses 
UTF-8. Attached can be found the pom file I'm using and the resulting 
archetype-metada.xml.


I've detected that the property defaultEncoding is not been used in the 
class CreateArchetypeFromProjectMojo. Maybe that's the cause of the 
problem.


Should I open a jira? Is there anything I'm not considering?

Thanks in advance,

Javier Díaz

?xml version=1.0 encoding=UTF-8?
!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ License); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  --
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;
modelVersion4.0.0/modelVersion
groupIdorg.apache.maven.archetype.test/groupId
artifactIdtest-create-3/artifactId
version1.0-SNAPSHOT/version
nameMaven archetype Test create-3/name
packagingpom/packaging
modules
moduleapplication/module
modulelibs/module
/modules
	build
		plugins
			plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-archetype-plugin/artifactId
configuration
	defaultEncodingISO-8859-1/defaultEncoding
/configuration
			/plugin
		/plugins
	/build
/project
?xml version=1.0 encoding=UTF-8?archetype-descriptor name=test-create-3
  requiredProperties
requiredProperty key=someProperty
  defaultValueA String to search for/defaultValue
/requiredProperty
  /requiredProperties
  fileSets
fileSet filtered=true encoding=UTF-8
  directorysrc/site/directory
  includes
include**/*.xml/include
  /includes
/fileSet
fileSet encoding=UTF-8
  directorysrc/site/directory
  includes
include**/*.apt/include
  /includes
/fileSet
fileSet encoding=UTF-8
  directorysrc/site/directory
  includes
include**/*.png/include
  /includes
/fileSet
fileSet filtered=true encoding=UTF-8
  directory/directory
  includes
include.classpath/include
includeprofiles.xml/include
  /includes
/fileSet
  /fileSets
  modules
module id=${rootArtifactId}-application dir=application name=${rootArtifactId}-application
  fileSets
fileSet filtered=true packaged=true encoding=UTF-8
  directorysrc/main/java/directory
  includes
include**/*.java/include
  /includes
  excludes
excludeMain.java/exclude
  /excludes
/fileSet
fileSet filtered=true encoding=UTF-8
  directorysrc/main/java/directory
  includes
includeMain.java/include
  /includes
/fileSet
fileSet filtered=true packaged=true encoding=UTF-8
  directorysrc/main/resources/directory
  includes
include**/*.groovy/include
  /includes
/fileSet
fileSet filtered=true encoding=UTF-8
  directorysrc/main/resources/directory
  includes
include**/*.properties/include
  /includes
/fileSet
fileSet packaged=true encoding=UTF-8
  directorysrc/main/java/directory
  includes
include**/*.ogg/include
include**/*.png/include
  /includes
/fileSet
fileSet encoding=UTF-8
  directorysrc/main/resources/directory
  includes
include**/*.png/include
include**/*.MF/include
  /includes
/fileSet
fileSet filtered=true packaged=true encoding=UTF-8
  directorysrc/test/java/directory
  includes
include**/*.java/include
  /includes
  excludes
excludeTestAll.java/exclude
  /excludes
/fileSet
fileSet filtered=true encoding=UTF-8
  directorysrc/test/java/directory
  includes
includeTestAll.java/include
  /includes
/fileSet
fileSet filtered=true packaged=true 

Re: Creating archetypes and disabling velocity

2009-05-11 Thread Doug Hughes
:39:31 +0200
  Subject: Re: Creating archetypes and disabling velocity
  From: heinrich.nirs...@gmail.com
  To: users@maven.apache.org
 
  On Sun, May 10, 2009 at 7:37 PM, Doug Hughes dhug...@alagad.com
 wrote:
   Rather than editing my source files, is there not a way to disable
 velocity
   for spcific files or folders?  I ask because some of the problem files
 in my
   archetype are binary.  I'm not too comfortable editing those by hand
 as you
   suggest.  And I think they may be related to the problems I'm seeing.
 
  Did you try the filtered=false attribute in the
  archetype-metadata.xml file when you used the archetype:generate goal?
 
  - Henry
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 

 _
 Hotmail® goes with you.

 http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009





Re: Creating archetypes and disabling velocity

2009-05-11 Thread Raphaël Piéroni
 et peut être privilégié. Si vous n'êtes pas le
  destinataire prévu, nous te demandons avec bonté que pour satisfaire
  informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
  de ceci est interdite. Ce message sert à l'information seulement et n'aura
  pas n'importe quel effet légalement obligatoire. Étant donné que les email
  peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
  aucune responsabilité pour le contenu fourni.
 
 
 
 
   Date: Sun, 10 May 2009 21:39:31 +0200
   Subject: Re: Creating archetypes and disabling velocity
   From: heinrich.nirs...@gmail.com
   To: users@maven.apache.org
  
   On Sun, May 10, 2009 at 7:37 PM, Doug Hughes dhug...@alagad.com
  wrote:
Rather than editing my source files, is there not a way to disable
  velocity
for spcific files or folders?  I ask because some of the problem files
  in my
archetype are binary.  I'm not too comfortable editing those by hand
  as you
suggest.  And I think they may be related to the problems I'm seeing.
  
   Did you try the filtered=false attribute in the
   archetype-metadata.xml file when you used the archetype:generate goal?
  
   - Henry
  
   -
   To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
   For additional commands, e-mail: users-h...@maven.apache.org
  
 
  _
  Hotmail® goes with you.
 
  http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009
 
 
 

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



Re: Creating archetypes and disabling velocity

2009-05-11 Thread Doug Hughes
 for
 the
   exchange of information and has no legal binding effect. Due to the
 easy
   manipulation of emails we cannot take responsibility over the the
 contents.
   Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
   Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
 unbefugte
   Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
 Nachricht
   dient lediglich dem Austausch von Informationen und entfaltet keine
   rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit
 von
   E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
   Ce message est confidentiel et peut être privilégié. Si vous n'êtes
 pas le
   destinataire prévu, nous te demandons avec bonté que pour satisfaire
   informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
 copie
   de ceci est interdite. Ce message sert à l'information seulement et
 n'aura
   pas n'importe quel effet légalement obligatoire. Étant donné que les
 email
   peuvent facilement être sujets à la manipulation, nous ne pouvons
 accepter
   aucune responsabilité pour le contenu fourni.
  
  
  
  
Date: Sun, 10 May 2009 21:39:31 +0200
Subject: Re: Creating archetypes and disabling velocity
From: heinrich.nirs...@gmail.com
To: users@maven.apache.org
   
On Sun, May 10, 2009 at 7:37 PM, Doug Hughes dhug...@alagad.com
   wrote:
 Rather than editing my source files, is there not a way to disable
   velocity
 for spcific files or folders?  I ask because some of the problem
 files
   in my
 archetype are binary.  I'm not too comfortable editing those by
 hand
   as you
 suggest.  And I think they may be related to the problems I'm
 seeing.
   
Did you try the filtered=false attribute in the
archetype-metadata.xml file when you used the archetype:generate
 goal?
   
- Henry
   
   
 -
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
   
  
   _
   Hotmail® goes with you.
  
  
 http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009
  
  
  

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




Re: Creating archetypes and disabling velocity

2009-05-11 Thread Raphaël Piéroni
 unauthorized forwarding or
   manufacturing of a copy is inadmissible. This message serves only for
 the
   exchange of information and has no legal binding effect. Due to the
 easy
   manipulation of emails we cannot take responsibility over the the
 contents.
   Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
   Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
 unbefugte
   Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
 Nachricht
   dient lediglich dem Austausch von Informationen und entfaltet keine
   rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit
 von
   E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
   Ce message est confidentiel et peut être privilégié. Si vous n'êtes
 pas le
   destinataire prévu, nous te demandons avec bonté que pour satisfaire
   informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
 copie
   de ceci est interdite. Ce message sert à l'information seulement et
 n'aura
   pas n'importe quel effet légalement obligatoire. Étant donné que les
 email
   peuvent facilement être sujets à la manipulation, nous ne pouvons
 accepter
   aucune responsabilité pour le contenu fourni.
  
  
  
  
Date: Sun, 10 May 2009 21:39:31 +0200
Subject: Re: Creating archetypes and disabling velocity
From: heinrich.nirs...@gmail.com
To: users@maven.apache.org
   
On Sun, May 10, 2009 at 7:37 PM, Doug Hughes dhug...@alagad.com
   wrote:
 Rather than editing my source files, is there not a way to disable
   velocity
 for spcific files or folders?  I ask because some of the problem
 files
   in my
 archetype are binary.  I'm not too comfortable editing those by
 hand
   as you
 suggest.  And I think they may be related to the problems I'm
 seeing.
   
Did you try the filtered=false attribute in the
archetype-metadata.xml file when you used the archetype:generate
 goal?
   
- Henry
   
   
 -
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
   
  
   _
   Hotmail® goes with you.
  
  
 http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009
  
  
  

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




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



Re: Creating archetypes and disabling velocity

2009-05-10 Thread Doug Hughes
I wanted to add to my last message.  I found some instructions on using
archetype:create-from-project to create a new archetype.  I followed them to
create a new archetype project.  This had a slightly different file layout
than the webapp archetype I was trying to customize before.  However, I'm
still having the same problem I did before.  Specifically, archetype:create
seems to be trying to send every file through the velocity system.

The archetype:create-from-project did create an archetype-metadata.xml file
which I've modified as such in an attempt to completely remove all filtering
from my archetype.

?xml version=1.0 encoding=UTF-8?
archetype-descriptor name=ColdFusion-archetype
  fileSets
fileSet filtered=false packaged=true
  directorysrc/main/directory
  includes
include**/*.cfm/include
  /includes
/fileSet
  /fileSets
/archetype-descriptor

Unfortuantly, when I run archetype:create I'm still getting the same errors
from velocity.  Am I going about this the right way?  Is there any good
documentation on this stuff?  Or maybe a useful book I could buy?

Thanks,

Doug Hughes, President
Alagad Inc.
dhug...@alagad.com
888 Alagad4 (x300)
Office: 919-550-0755
Fax: 888-248-7836


On Sat, May 9, 2009 at 11:06 PM, Doug Hughes dhug...@alagad.com wrote:

 Hi,

 I'm in the process of creating my first archetype.  I've based it on the
 simple-webapp archetype, but I've added the entire ColdFusion application.
 This is 4114 files total.  I can build and install the archetype just fine
 using mvn install just fine.  However, when I use mvn archetype:create to
 create a new project based on my archetype I get this in the resulting
 output:

 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template =
 archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
 [line 17,column 20] : $coldfusion is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template =
 archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
 [line 17,column 31] : $tagext is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template =
 archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
 [line 17,column 38] : $lang is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template =
 archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
 [line 17,column 43] : $RegistryTag is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template =
 archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
 [line 62,column 244] : $Lcoldfusion is not a valid reference.
 [ERROR] ResourceManager.getResource() parse exception:
 org.apache.velocity.exception.ParseErrorException: Lexical error:
 org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 206,
 column 35.  Encountered: EOF after : 

 I think that what's going on is that the Velosity templating system is
 seeing $ or ${ or something like that in the ColdFusion files.  I'm trying
 to find a way to tell velosity to ignore these files.  Any tips on this?
 I've read every line of documentation on the archetype plugin I can find,
 but there's no clear answer.

 I did find one page which discussed a file called archetype-metadata.xml.
 The simple-webapp archetype I based this on didn't have one of these files.
 I added it under src/main/resources/META-INF/maven, with the following XML,
 but it didn't seem to have any effect at all the next time I tried to create
 my archetype:

 ?xml version=1.0 encoding=UTF-8?
 archetype-descriptor name=basic
   fileSets
 fileSet filtered=false packaged=true
   directorysrc/main/directory
   includes
 include**/*.*/include
   /includes
 /fileSet
   /fileSets
 /archetype-descriptor

 I get the impression that there are two versions of the archetype plugin
 and that the I might be building my archetype based on documentation on the
 archetype 1 plugin and that the archetype-metadata.xml file is specific to
 version 2?

 Thanks for your help,

 Doug Hughes, President
 Alagad Inc.
 dhug...@alagad.com
 888 Alagad4 (x300)
 Office: 919-550-0755
 Fax: 888-248-7836



Re: Creating archetypes and disabling velocity

2009-05-10 Thread Doug Hughes
Sorry to keep harping on this topic.  I'm hoping someone can offer some
advice. :)

As a last test, I intentionally put invalid XML in the
archetype-metadata.xml file.  I was able to run archetype:create without it
reporting an XML error.  This tells me it's ignoring my metadata file
anyhow any ideas on what I can do to work around this?

Thanks,

Doug Hughes, President
Alagad Inc.
dhug...@alagad.com
888 Alagad4 (x300)
Office: 919-550-0755
Fax: 888-248-7836


On Sun, May 10, 2009 at 8:58 AM, Doug Hughes dhug...@alagad.com wrote:

 I wanted to add to my last message.  I found some instructions on using
 archetype:create-from-project to create a new archetype.  I followed them to
 create a new archetype project.  This had a slightly different file layout
 than the webapp archetype I was trying to customize before.  However, I'm
 still having the same problem I did before.  Specifically, archetype:create
 seems to be trying to send every file through the velocity system.

 The archetype:create-from-project did create an archetype-metadata.xml file
 which I've modified as such in an attempt to completely remove all filtering
 from my archetype.

 ?xml version=1.0 encoding=UTF-8?
  archetype-descriptor name=ColdFusion-archetype
   fileSets
 fileSet filtered=false packaged=true
   directorysrc/main/directory
   includes
 include**/*.cfm/include
   /includes
 /fileSet
   /fileSets
 /archetype-descriptor

 Unfortuantly, when I run archetype:create I'm still getting the same errors
 from velocity.  Am I going about this the right way?  Is there any good
 documentation on this stuff?  Or maybe a useful book I could buy?

 Thanks,

 Doug Hughes, President
 Alagad Inc.
 dhug...@alagad.com
 888 Alagad4 (x300)
 Office: 919-550-0755
 Fax: 888-248-7836


 On Sat, May 9, 2009 at 11:06 PM, Doug Hughes dhug...@alagad.com wrote:

 Hi,

 I'm in the process of creating my first archetype.  I've based it on the
 simple-webapp archetype, but I've added the entire ColdFusion application.
 This is 4114 files total.  I can build and install the archetype just fine
 using mvn install just fine.  However, when I use mvn archetype:create to
 create a new project based on my archetype I get this in the resulting
 output:

 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template =
 archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
 [line 17,column 20] : $coldfusion is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template =
 archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
 [line 17,column 31] : $tagext is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template =
 archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
 [line 17,column 38] : $lang is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template =
 archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
 [line 17,column 43] : $RegistryTag is not a valid reference.
 [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
 reference : template =
 archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
 [line 62,column 244] : $Lcoldfusion is not a valid reference.
 [ERROR] ResourceManager.getResource() parse exception:
 org.apache.velocity.exception.ParseErrorException: Lexical error:
 org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 206,
 column 35.  Encountered: EOF after : 

 I think that what's going on is that the Velosity templating system is
 seeing $ or ${ or something like that in the ColdFusion files.  I'm trying
 to find a way to tell velosity to ignore these files.  Any tips on this?
 I've read every line of documentation on the archetype plugin I can find,
 but there's no clear answer.

 I did find one page which discussed a file called archetype-metadata.xml.
 The simple-webapp archetype I based this on didn't have one of these files.
 I added it under src/main/resources/META-INF/maven, with the following XML,
 but it didn't seem to have any effect at all the next time I tried to create
 my archetype:

 ?xml version=1.0 encoding=UTF-8?
 archetype-descriptor name=basic
   fileSets
 fileSet filtered=false packaged=true
   directorysrc/main/directory
   includes
 include**/*.*/include
   /includes
 /fileSet
   /fileSets
 /archetype-descriptor

 I get the impression that there are two versions of the archetype plugin
 and that the I might be building my archetype based on documentation on the
 archetype 1 plugin and that the archetype-metadata.xml file is specific to
 version 2?

 Thanks for your help,

 Doug Hughes, President
 Alagad Inc.
 

RE: Creating archetypes and disabling velocity

2009-05-10 Thread Martin Gainty


can you display the maven-metadata.xml (and your project's pom.xml) and display 
the command you are using which *should* reproduce this error?

thanks,
Martin 
__ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung/Note de 
déni et de confidentialité
This message is confidential. If you should not be the intended receiver, then 
we ask politely to report. Each unauthorized forwarding or manufacturing of a 
copy is inadmissible. This message serves only for the exchange of information 
and has no legal binding effect. Due to the easy manipulation of emails we 
cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 From: dhug...@alagad.com
 Date: Sun, 10 May 2009 09:13:14 -0400
 Subject: Re: Creating archetypes and disabling velocity
 To: users@maven.apache.org
 
 Sorry to keep harping on this topic.  I'm hoping someone can offer some
 advice. :)
 
 As a last test, I intentionally put invalid XML in the
 archetype-metadata.xml file.  I was able to run archetype:create without it
 reporting an XML error.  This tells me it's ignoring my metadata file
 anyhow any ideas on what I can do to work around this?
 
 Thanks,
 
 Doug Hughes, President
 Alagad Inc.
 dhug...@alagad.com
 888 Alagad4 (x300)
 Office: 919-550-0755
 Fax: 888-248-7836
 
 
 On Sun, May 10, 2009 at 8:58 AM, Doug Hughes dhug...@alagad.com wrote:
 
  I wanted to add to my last message.  I found some instructions on using
  archetype:create-from-project to create a new archetype.  I followed them to
  create a new archetype project.  This had a slightly different file layout
  than the webapp archetype I was trying to customize before.  However, I'm
  still having the same problem I did before.  Specifically, archetype:create
  seems to be trying to send every file through the velocity system.
 
  The archetype:create-from-project did create an archetype-metadata.xml file
  which I've modified as such in an attempt to completely remove all filtering
  from my archetype.
 
  ?xml version=1.0 encoding=UTF-8?
   archetype-descriptor name=ColdFusion-archetype
fileSets
  fileSet filtered=false packaged=true
directorysrc/main/directory
includes
  include**/*.cfm/include
/includes
  /fileSet
/fileSets
  /archetype-descriptor
 
  Unfortuantly, when I run archetype:create I'm still getting the same errors
  from velocity.  Am I going about this the right way?  Is there any good
  documentation on this stuff?  Or maybe a useful book I could buy?
 
  Thanks,
 
  Doug Hughes, President
  Alagad Inc.
  dhug...@alagad.com
  888 Alagad4 (x300)
  Office: 919-550-0755
  Fax: 888-248-7836
 
 
  On Sat, May 9, 2009 at 11:06 PM, Doug Hughes dhug...@alagad.com wrote:
 
  Hi,
 
  I'm in the process of creating my first archetype.  I've based it on the
  simple-webapp archetype, but I've added the entire ColdFusion application.
  This is 4114 files total.  I can build and install the archetype just fine
  using mvn install just fine.  However, when I use mvn archetype:create to
  create a new project based on my archetype I get this in the resulting
  output:
 
  [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
  reference : template =
  archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
  [line 17,column 20] : $coldfusion is not a valid reference.
  [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
  reference : template =
  archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
  [line 17,column 31] : $tagext is not a valid reference.
  [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
  reference : template =
  archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
  [line 17,column 38] : $lang is not a valid reference.
  [WARNING] org.apache.velocity.runtime.exception.ReferenceException:
  reference : template =
  archetype-resources/src/main/webapp/CFIDE/adminapi

Re: Creating archetypes and disabling velocity

2009-05-10 Thread Heinrich Nirschl
On Sun, May 10, 2009 at 3:13 PM, Doug Hughes dhug...@alagad.com wrote:
 As a last test, I intentionally put invalid XML in the
 archetype-metadata.xml file.  I was able to run archetype:create without it
 reporting an XML error.  This tells me it's ignoring my metadata file
 anyhow any ideas on what I can do to work around this?

I think, this file is only used, if you use the archetype:generate goal.

 [line 17,column 31] : $tagext is not a valid reference.

For the references that should go unchanged into the generated sources
I usually do

#set ($d = $)

... ${d}{target} ...

This will expand to ${target} and will not raise a warning.

- Henry

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



Re: Creating archetypes and disabling velocity

2009-05-10 Thread Doug Hughes
Rather than editing my source files, is there not a way to disable  
velocity for spcific files or folders?  I ask because some of the  
problem files in my archetype are binary.  I'm not too comfortable  
editing those by hand as you suggest.  And I think they may be related  
to the problems I'm seeing.


Thanks,

Doug

On May 10, 2009, at 12:41 PM, Heinrich Nirschl heinrich.nirs...@gmail.com 
 wrote:


On Sun, May 10, 2009 at 3:13 PM, Doug Hughes dhug...@alagad.com  
wrote:

As a last test, I intentionally put invalid XML in the
archetype-metadata.xml file.  I was able to run archetype:create  
without it

reporting an XML error.  This tells me it's ignoring my metadata file
anyhow any ideas on what I can do to work around this?


I think, this file is only used, if you use the archetype:generate  
goal.



[line 17,column 31] : $tagext is not a valid reference.


For the references that should go unchanged into the generated sources
I usually do

#set ($d = $)

... ${d}{target} ...

This will expand to ${target} and will not raise a warning.

- Henry

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



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



Re: Creating archetypes and disabling velocity

2009-05-10 Thread Heinrich Nirschl
On Sun, May 10, 2009 at 7:37 PM, Doug Hughes dhug...@alagad.com wrote:
 Rather than editing my source files, is there not a way to disable velocity
 for spcific files or folders?  I ask because some of the problem files in my
 archetype are binary.  I'm not too comfortable editing those by hand as you
 suggest.  And I think they may be related to the problems I'm seeing.

Did you try the filtered=false attribute in the
archetype-metadata.xml file when you used the archetype:generate goal?

- Henry

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



RE: Creating archetypes and disabling velocity

2009-05-10 Thread Martin Gainty

how about adding includes for wanted extensions and excludes for files to be 
excluded
such as this FileSet declaration for archetype-metadata.xml file?

archetype-descriptor
!-- usual declaration statements --
fileSets
fileSet filtered=true packaged=false
  directorysrc/site/directory
  includes
include**/*.ftl/include
  /includes
  excludes
exclude**/*.vm/exclude
  /excludes?
/fileSet
/fileSets
/archetype-descriptor

http://ant.apache.org/manual/CoreTypes/fileset.html
?
Martin Gainty 
__ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung/Note de 
déni et de confidentialité
This message is confidential. If you should not be the intended receiver, then 
we ask politely to report. Each unauthorized forwarding or manufacturing of a 
copy is inadmissible. This message serves only for the exchange of information 
and has no legal binding effect. Due to the easy manipulation of emails we 
cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 Date: Sun, 10 May 2009 21:39:31 +0200
 Subject: Re: Creating archetypes and disabling velocity
 From: heinrich.nirs...@gmail.com
 To: users@maven.apache.org
 
 On Sun, May 10, 2009 at 7:37 PM, Doug Hughes dhug...@alagad.com wrote:
  Rather than editing my source files, is there not a way to disable velocity
  for spcific files or folders?  I ask because some of the problem files in my
  archetype are binary.  I'm not too comfortable editing those by hand as you
  suggest.  And I think they may be related to the problems I'm seeing.
 
 Did you try the filtered=false attribute in the
 archetype-metadata.xml file when you used the archetype:generate goal?
 
 - Henry
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 

_
Hotmail® goes with you. 
http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009

Re: Creating archetypes and disabling velocity

2009-05-10 Thread Doug Hughes
Martin,

Thanks for the suggestion the thing is, that's what this tread started
about.  I have an archetype-metadata.xml file and followed the documentation
(not at the link you provided which, fyi, doesn't document the filtered or
packaged attributes).

Anyhow, it seems that the archetype-metadata.xml file is being ignored.  No
mater what I put in that file (including invalid xml), it makes no
difference.  It's like the file doesn't even exist.

I'll send more information on the structure of the archetype project and my
various files and the commands I'm running later.

Thanks,

Doug Hughes, President
Alagad Inc.
dhug...@alagad.com
888 Alagad4 (x300)
Office: 919-550-0755
Fax: 888-248-7836


On Sun, May 10, 2009 at 4:26 PM, Martin Gainty mgai...@hotmail.com wrote:


 how about adding includes for wanted extensions and excludes for files to
 be excluded
 such as this FileSet declaration for archetype-metadata.xml file?

 archetype-descriptor
 !-- usual declaration statements --
 fileSets
fileSet filtered=true packaged=false
  directorysrc/site/directory
  includes
include**/*.ftl/include
  /includes
  excludes
exclude**/*.vm/exclude
  /excludes?
/fileSet
 /fileSets
 /archetype-descriptor

 http://ant.apache.org/manual/CoreTypes/fileset.html
 ?
 Martin Gainty
 __
 Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung/Note
 de déni et de confidentialité
 This message is confidential. If you should not be the intended receiver,
 then we ask politely to report. Each unauthorized forwarding or
 manufacturing of a copy is inadmissible. This message serves only for the
 exchange of information and has no legal binding effect. Due to the easy
 manipulation of emails we cannot take responsibility over the the contents.
 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
 Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
 Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
 dient lediglich dem Austausch von Informationen und entfaltet keine
 rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
 E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
 destinataire prévu, nous te demandons avec bonté que pour satisfaire
 informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
 de ceci est interdite. Ce message sert à l'information seulement et n'aura
 pas n'importe quel effet légalement obligatoire. Étant donné que les email
 peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
 aucune responsabilité pour le contenu fourni.




  Date: Sun, 10 May 2009 21:39:31 +0200
  Subject: Re: Creating archetypes and disabling velocity
  From: heinrich.nirs...@gmail.com
  To: users@maven.apache.org
 
  On Sun, May 10, 2009 at 7:37 PM, Doug Hughes dhug...@alagad.com wrote:
   Rather than editing my source files, is there not a way to disable
 velocity
   for spcific files or folders?  I ask because some of the problem files
 in my
   archetype are binary.  I'm not too comfortable editing those by hand as
 you
   suggest.  And I think they may be related to the problems I'm seeing.
 
  Did you try the filtered=false attribute in the
  archetype-metadata.xml file when you used the archetype:generate goal?
 
  - Henry
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 

 _
 Hotmail® goes with you.

 http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009



Creating archetypes and disabling velocity

2009-05-09 Thread Doug Hughes
Hi,

I'm in the process of creating my first archetype.  I've based it on the
simple-webapp archetype, but I've added the entire ColdFusion application.
This is 4114 files total.  I can build and install the archetype just fine
using mvn install just fine.  However, when I use mvn archetype:create to
create a new project based on my archetype I get this in the resulting
output:

[WARNING] org.apache.velocity.runtime.exception.ReferenceException:
reference : template =
archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
[line 17,column 20] : $coldfusion is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException:
reference : template =
archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
[line 17,column 31] : $tagext is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException:
reference : template =
archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
[line 17,column 38] : $lang is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException:
reference : template =
archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
[line 17,column 43] : $RegistryTag is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException:
reference : template =
archetype-resources/src/main/webapp/CFIDE/adminapi/_datasource/getaccessdefaultsfromregistry.cfm
[line 62,column 244] : $Lcoldfusion is not a valid reference.
[ERROR] ResourceManager.getResource() parse exception:
org.apache.velocity.exception.ParseErrorException: Lexical error:
org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 206,
column 35.  Encountered: EOF after : 

I think that what's going on is that the Velosity templating system is
seeing $ or ${ or something like that in the ColdFusion files.  I'm trying
to find a way to tell velosity to ignore these files.  Any tips on this?
I've read every line of documentation on the archetype plugin I can find,
but there's no clear answer.

I did find one page which discussed a file called archetype-metadata.xml.
The simple-webapp archetype I based this on didn't have one of these files.
I added it under src/main/resources/META-INF/maven, with the following XML,
but it didn't seem to have any effect at all the next time I tried to create
my archetype:

?xml version=1.0 encoding=UTF-8?
archetype-descriptor name=basic
  fileSets
fileSet filtered=false packaged=true
  directorysrc/main/directory
  includes
include**/*.*/include
  /includes
/fileSet
  /fileSets
/archetype-descriptor

I get the impression that there are two versions of the archetype plugin and
that the I might be building my archetype based on documentation on the
archetype 1 plugin and that the archetype-metadata.xml file is specific to
version 2?

Thanks for your help,

Doug Hughes, President
Alagad Inc.
dhug...@alagad.com
888 Alagad4 (x300)
Office: 919-550-0755
Fax: 888-248-7836


Creating archetypes with images?

2007-06-06 Thread Clifton

Now I'm stuck again! I'm trying to create a custom archetype with binary
image files and it looks like Maven is treating them like text. Is there a
tag or attribute in archetype.xml that I can use to turn off the parsing of
individual files?
-- 
View this message in context: 
http://www.nabble.com/Creating-archetypes-with-images--tf387s177.html#a10995903
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Guide to creating archetypes...

2007-05-03 Thread Rémy Sanlaville

Hi,

If I want to create an archetype, which one is better to use ?
what's the difference ?

http://mojo.codehaus.org/maven-archetypeng/

or

mvn archetype:create
 -DgroupId=[your project's group id]
 -DartifactId=[your project's artifact id]
 -DarchetypeArtifactId=maven-archetype-archetype


(cf. http://maven.apache.org/guides/mini/guide-creating-archetypes.html)

Rémy


Re: Guide to creating archetypes...

2007-05-03 Thread Raphaël Piéroni

2007/5/3, Rémy Sanlaville [EMAIL PROTECTED]:


  what's the difference ?
 Mainly
 - the descriptor is changed
 - user is prompted for selecting the archetype and configuration
 (unless using -B)
 - any file can be resolved as packaged (using package in the directory
 resolution)
 - any file can be resolved as binary (copied instead of velocity template)
 - support for multi project


I forgot:
- archetype creation form an existing project (yes with the above
features packaged, filtered, multiproject)



 
  http://mojo.codehaus.org/maven-archetypeng/
 which is not yet released


Did you have a roadmap when it will be released ?

I got a roadmap (on paper without any date)
But i could say it need at least 2 weeks before putting a first alpha release

Raphaël


So, if I understand, maven-archetypeng has more features and seems more
powerful.
So it's better to look at maven-archetypeng instead of maven-archetype. I
will have a look.
I imagine it will normally replace maven-archetype in the future.


  or
 
  mvn archetype:create
-DgroupId=[your project's group id]
-DartifactId=[your project's artifact id]
-DarchetypeArtifactId=maven-archetype-archetype
 
 
  (cf. http://maven.apache.org/guides/mini/guide-creating-archetypes.html)


 Hope the answer makes sense


Nice thanks.

Rémy



Re: Guide to creating archetypes...

2007-05-03 Thread nicolas de loof

I'm trying to use the archetypeNG plugin from an existing complex (multi
module) project.

The plugins ask me for archetype groupId and other properties on every
module of the source project. It generates an archetype for every module.

I'd like to generate the complete project with modules from a single
archetype, based on my sample project.

How to do this ?

Nico.



2007/5/3, Raphaël Piéroni [EMAIL PROTECTED]:


2007/5/3, Rémy Sanlaville [EMAIL PROTECTED]:
 
   what's the difference ?
  Mainly
  - the descriptor is changed
  - user is prompted for selecting the archetype and configuration
  (unless using -B)
  - any file can be resolved as packaged (using package in the directory
  resolution)
  - any file can be resolved as binary (copied instead of velocity
template)
  - support for multi project

I forgot:
- archetype creation form an existing project (yes with the above
features packaged, filtered, multiproject)

 
  
   http://mojo.codehaus.org/maven-archetypeng/
  which is not yet released


 Did you have a roadmap when it will be released ?
I got a roadmap (on paper without any date)
But i could say it need at least 2 weeks before putting a first alpha
release

Raphaël

 So, if I understand, maven-archetypeng has more features and seems more
 powerful.
 So it's better to look at maven-archetypeng instead of maven-archetype.
I
 will have a look.
 I imagine it will normally replace maven-archetype in the future.

 
   or
  
   mvn archetype:create
 -DgroupId=[your project's group id]
 -DartifactId=[your project's artifact id]
 -DarchetypeArtifactId=maven-archetype-archetype
  
  
   (cf.
http://maven.apache.org/guides/mini/guide-creating-archetypes.html)
 
 
  Hope the answer makes sense


 Nice thanks.

 Rémy




Re: Guide to creating archetypes...

2007-05-03 Thread Raphaël Piéroni

Try mvn -N archetypeng:create-from-project

Raphaël

2007/5/3, nicolas de loof [EMAIL PROTECTED]:

I'm trying to use the archetypeNG plugin from an existing complex (multi
module) project.

The plugins ask me for archetype groupId and other properties on every
module of the source project. It generates an archetype for every module.

I'd like to generate the complete project with modules from a single
archetype, based on my sample project.

How to do this ?

Nico.



2007/5/3, Raphaël Piéroni [EMAIL PROTECTED]:

 2007/5/3, Rémy Sanlaville [EMAIL PROTECTED]:
  
what's the difference ?
   Mainly
   - the descriptor is changed
   - user is prompted for selecting the archetype and configuration
   (unless using -B)
   - any file can be resolved as packaged (using package in the directory
   resolution)
   - any file can be resolved as binary (copied instead of velocity
 template)
   - support for multi project

 I forgot:
 - archetype creation form an existing project (yes with the above
 features packaged, filtered, multiproject)

  
   
http://mojo.codehaus.org/maven-archetypeng/
   which is not yet released
 
 
  Did you have a roadmap when it will be released ?
 I got a roadmap (on paper without any date)
 But i could say it need at least 2 weeks before putting a first alpha
 release

 Raphaël

  So, if I understand, maven-archetypeng has more features and seems more
  powerful.
  So it's better to look at maven-archetypeng instead of maven-archetype.
 I
  will have a look.
  I imagine it will normally replace maven-archetype in the future.
 
  
or
   
mvn archetype:create
  -DgroupId=[your project's group id]
  -DartifactId=[your project's artifact id]
  -DarchetypeArtifactId=maven-archetype-archetype
   
   
(cf.
 http://maven.apache.org/guides/mini/guide-creating-archetypes.html)
  
  
   Hope the answer makes sense
 
 
  Nice thanks.
 
  Rémy
 




Re: Guide to creating archetypes...

2007-05-03 Thread nicolas de loof

I allready tried this, but the generated archetype does not include modules
(only parent pom).

2007/5/3, Raphaël Piéroni [EMAIL PROTECTED]:


Try mvn -N archetypeng:create-from-project

Raphaël

2007/5/3, nicolas de loof [EMAIL PROTECTED]:
 I'm trying to use the archetypeNG plugin from an existing complex (multi
 module) project.

 The plugins ask me for archetype groupId and other properties on every
 module of the source project. It generates an archetype for every
module.

 I'd like to generate the complete project with modules from a single
 archetype, based on my sample project.

 How to do this ?

 Nico.



 2007/5/3, Raphaël Piéroni [EMAIL PROTECTED]:
 
  2007/5/3, Rémy Sanlaville [EMAIL PROTECTED]:
   
 what's the difference ?
Mainly
- the descriptor is changed
- user is prompted for selecting the archetype and configuration
(unless using -B)
- any file can be resolved as packaged (using package in the
directory
resolution)
- any file can be resolved as binary (copied instead of velocity
  template)
- support for multi project
 
  I forgot:
  - archetype creation form an existing project (yes with the above
  features packaged, filtered, multiproject)
 
   

 http://mojo.codehaus.org/maven-archetypeng/
which is not yet released
  
  
   Did you have a roadmap when it will be released ?
  I got a roadmap (on paper without any date)
  But i could say it need at least 2 weeks before putting a first alpha
  release
 
  Raphaël
 
   So, if I understand, maven-archetypeng has more features and seems
more
   powerful.
   So it's better to look at maven-archetypeng instead of
maven-archetype.
  I
   will have a look.
   I imagine it will normally replace maven-archetype in the future.
  
   
 or

 mvn archetype:create
   -DgroupId=[your project's group id]
   -DartifactId=[your project's artifact id]
   -DarchetypeArtifactId=maven-archetype-archetype


 (cf.
  http://maven.apache.org/guides/mini/guide-creating-archetypes.html)
   
   
Hope the answer makes sense
  
  
   Nice thanks.
  
   Rémy
  
 




Guide to creating archetypes...

2007-05-02 Thread Dave Hoffer
The process given for creating a custom archetype seems limiting and
confusing.

I want the standard maven directory layout but in addition I want to add
higher level folders called trunk  tags this way my new artifact
projects will be configured correctly for VCS usage.  (The maven build
usage of this will be in the trunk folder so we do use the standard
maven layout.)

The docs say that these elements represent different sections of the
project, what is not clear is if these are hard coded paths or if these
have this path because the archetype descriptor defines them this way.
If they are hard coded it makes no sense for the path to be included in
the descriptor file, which it is.
* sources = src/main/java
* resources = src/main/resources
* testSources = src/test/java
* testResources = src/test/resources
* siteResources = src/site 

Here is my descriptor:
archetype
idxrite-archetype-default/id
sources
sourcetrunk/src/main/java/App.java/source
/sources
testSources
sourcetrunk/src/test/java/AppTest.java/source
/testSources
resources
resourcetrunk/src/site/site.xml/resource
resourcetrunk/src/site/apt/overview.apt/resource
resourcetrunk/src/site/fml/faqs.fml/resource
/resources
/archetype

Although my files do have this layout pattern when I run this archetype
I an error Template 'trunk/src/main/java/App.java' not in directory
'src/main/java'

How can I add the trunk folder?

-Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Guide to creating archetypes...

2007-05-02 Thread Raphaël Piéroni

Hi Dave,

Currently, you can't add that folder.

Please feel free to raise a Jira.

Raphaël

2007/5/2, Dave Hoffer [EMAIL PROTECTED]:

The process given for creating a custom archetype seems limiting and
confusing.

I want the standard maven directory layout but in addition I want to add
higher level folders called trunk  tags this way my new artifact
projects will be configured correctly for VCS usage.  (The maven build
usage of this will be in the trunk folder so we do use the standard
maven layout.)

The docs say that these elements represent different sections of the
project, what is not clear is if these are hard coded paths or if these
have this path because the archetype descriptor defines them this way.
If they are hard coded it makes no sense for the path to be included in
the descriptor file, which it is.
* sources = src/main/java
* resources = src/main/resources
* testSources = src/test/java
* testResources = src/test/resources
* siteResources = src/site

Here is my descriptor:
archetype
idxrite-archetype-default/id
sources
sourcetrunk/src/main/java/App.java/source
/sources
testSources
sourcetrunk/src/test/java/AppTest.java/source
/testSources
resources
resourcetrunk/src/site/site.xml/resource
resourcetrunk/src/site/apt/overview.apt/resource
resourcetrunk/src/site/fml/faqs.fml/resource
/resources
/archetype

Although my files do have this layout pattern when I run this archetype
I an error Template 'trunk/src/main/java/App.java' not in directory
'src/main/java'

How can I add the trunk folder?

-Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Guide to creating archetypes...

2007-05-02 Thread Dave Hoffer
Can you give me a link to ...the 'next generation' archetype
plugin that is going on over at Codehaus?

-Dave

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 02, 2007 9:10 AM
To: Maven Users List
Subject: Re: Guide to creating archetypes...

On 5/2/07, Dave Hoffer [EMAIL PROTECTED] wrote:

 The process given for creating a custom archetype seems limiting and
 confusing.

I'd say limited and tedious. :)

 Although my files do have this layout pattern when I run this
archetype
 I an error Template 'trunk/src/main/java/App.java' not in directory
 'src/main/java'

 How can I add the trunk folder?

The current archetype code won't let you.

I don't think much more is going to happen with this codebase, so you
might want to check out the work on the 'next generation' archetype
plugin that is going on over at Codehaus and the related discussion on
the dev list archives.

-- 
Wendy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Guide to creating archetypes...

2007-05-02 Thread Wendy Smoak

On 5/2/07, Dave Hoffer [EMAIL PROTECTED] wrote:


Can you give me a link to ...the 'next generation' archetype
plugin that is going on over at Codehaus?


http://mojo.codehaus.org/maven-archetypeng/

--
Wendy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Creating Archetypes

2006-12-05 Thread Deluigi Marcus
Hi


Is it possible to create an archetype with sub-projects?

You can imagine that I want to create nested archetypes: the end-user
should obtain a project that contains sub-projects. 


Thanks for any help!


Greetings

Marcus

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Creating Archetypes

2006-12-05 Thread Wendy Smoak

On 12/5/06, Deluigi Marcus [EMAIL PROTECTED] wrote:


Is it possible to create an archetype with sub-projects?

You can imagine that I want to create nested archetypes: the end-user
should obtain a project that contains sub-projects.


Things may have changed since I last tried, but I wasn't able to do it
in a single archetype.

By adding more than one module to an archetype, I lost the ability to
insert the package name in the directory structure under
src/main/java.

What does work is running 'mvn archetype:create' more than once.  If
you run it in a directory with a pom containing modules, Archetype
will hook up the parent-child relationships automatically.

At the very least, the current plugin needs another layer that calls
the existing archetype:create more than once to create the
multi-module project.

I believe there's some work going on in Appfuse that might be relevant.

--
Wendy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: creating archetypes

2006-09-21 Thread franz see



Douglas Ferguson wrote:
 
 Sorry for the spam, but is there a way to prevent the archetype from
 adding the created module to the pom file?
 
 -Original Message-
 From: Douglas Ferguson 
 Sent: Thursday, September 14, 2006 9:59 PM
 To: users
 Subject: RE: creating archetypes
 
 Also, the archetype also seems to be creating a src/main/java/${groupId}
 directory. Anyway to keep this from happening?
 
 D-
 
 -Original Message-
 From: Douglas Ferguson 
 Sent: Thursday, September 14, 2006 9:32 PM
 To: users
 Subject: creating archetypes
 
 The create archetypes document seems to have descripancies.
 
  
 
 Which is correct?
 
  
 
 testRecources or test-recources?
 
  
 
 Is allowPartial supported?
 
  
 
 The document also says that you can’t create empty directories, is that
 still the case?
 
  
 
 D-
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

Good day to you, Douglas,

Sorry for the late reply. I did not see this before. Anyway, here are my
answers:

* testResources is the correct one (see [1] for the archetype descriptor
schema)
* AFAIK, you can not stop maven-archetype-plugin from creating
src\main\java\{groupId}\**\*.*, unless you specifically specify the
packageName, which would then create src\main\java\{packageName}\**\*.*. 
* IIRC, allowPartial is used for multi-module maven projects. what were you
trying to accomplish with allowPartial?
* Yes, you still can not create empty directories. 
* AFAIK, you cannot stop the adding of the created module to the pom.

For more info regarding the maven-archetype-plugin, here's it's unreleased
under review revised documentation, [2].

Cheers,
Franz

[1] http://www.nabble.com/forum/ViewPost.jtp?post=6052980framed=y 
[2] http://people.apache.org/~oching/maven-archetype-plugin/
-- 
View this message in context: 
http://www.nabble.com/creating-archetypes-tf2275184.html#a6422092
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



creating archetypes

2006-09-14 Thread Douglas Ferguson
The create archetypes document seems to have descripancies.

 

Which is correct?

 

testRecources or test-recources?

 

Is allowPartial supported?

 

The document also says that you can’t create empty directories, is that
still the case?

 

D-




RE: creating archetypes

2006-09-14 Thread Douglas Ferguson
Also, the archetype also seems to be creating a src/main/java/${groupId} 
directory. Anyway to keep this from happening?

D-

-Original Message-
From: Douglas Ferguson 
Sent: Thursday, September 14, 2006 9:32 PM
To: users
Subject: creating archetypes

The create archetypes document seems to have descripancies.

 

Which is correct?

 

testRecources or test-recources?

 

Is allowPartial supported?

 

The document also says that you can’t create empty directories, is that
still the case?

 

D-




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: creating archetypes

2006-09-14 Thread Douglas Ferguson
Sorry for the spam, but is there a way to prevent the archetype from adding the 
created module to the pom file?

-Original Message-
From: Douglas Ferguson 
Sent: Thursday, September 14, 2006 9:59 PM
To: users
Subject: RE: creating archetypes

Also, the archetype also seems to be creating a src/main/java/${groupId} 
directory. Anyway to keep this from happening?

D-

-Original Message-
From: Douglas Ferguson 
Sent: Thursday, September 14, 2006 9:32 PM
To: users
Subject: creating archetypes

The create archetypes document seems to have descripancies.

 

Which is correct?

 

testRecources or test-recources?

 

Is allowPartial supported?

 

The document also says that you can’t create empty directories, is that
still the case?

 

D-




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[M2] Creating archetypes

2006-08-30 Thread ccadete


I installed a new my archetype, created by me, in a repository, with the
groupId=My-Archetype, but when I choose to use it, using the
-DarchetypeGroupID=My-Archetype in the command line, maven will try to
download it from org.apache.maven.archetypes ( that is the default
archetypes location ), so it will not find it.

Maven try to download archetypes using the default
org.apache.maven.archetypes, and the option -DarchetypeGroupID does not
override the default archetypes location.

Is this a bug ?




-- 
View this message in context: 
http://www.nabble.com/-M2--Creating-archetypes-tf2193156.html#a6069348
Sent from the Maven - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [M2] Creating archetypes

2006-08-30 Thread Eric Redmond

Did you actually give it a group name of My-Archetype? Try it again with
the dash. If it works, then yes, it might be a bug.

Eric

On 8/30/06, ccadete [EMAIL PROTECTED] wrote:




I installed a new my archetype, created by me, in a repository, with the
groupId=My-Archetype, but when I choose to use it, using the
-DarchetypeGroupID=My-Archetype in the command line, maven will try to
download it from org.apache.maven.archetypes ( that is the default
archetypes location ), so it will not find it.

Maven try to download archetypes using the default
org.apache.maven.archetypes, and the option -DarchetypeGroupID does not
override the default archetypes location.

Is this a bug ?




--
View this message in context:
http://www.nabble.com/-M2--Creating-archetypes-tf2193156.html#a6069348
Sent from the Maven - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Eric Redmond
http://codehaus.org/~eredmond


Re: [M2] Creating archetypes

2006-08-30 Thread Wendy Smoak

On 8/30/06, ccadete [EMAIL PROTECTED] wrote:


I installed a new my archetype, created by me, in a repository, with the
groupId=My-Archetype, but when I choose to use it, using the
-DarchetypeGroupID=My-Archetype in the command line, maven will try to
download it from org.apache.maven.archetypes ( that is the default
archetypes location ), so it will not find it.


(In addition to the possibly problem with the dash that Eric mentioned,)
If the archetype is not in your local repository, and not in the
central repo, you will need to use
  -DremoteRepositories=...
to tell Maven where to find it.

If you're still stuck, post the exact command you're typing, and the
error message you get.

--
Wendy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [M2] Creating archetypes

2006-08-30 Thread Eric Redmond

On 8/30/06, Eric Redmond [EMAIL PROTECTED] wrote:


Did you actually give it a group name of My-Archetype? Try it again with
the dash. If it works, then yes, it might be a bug.



Woops, I meant without the dash.

Eric



On 8/30/06, ccadete [EMAIL PROTECTED] wrote:



 I installed a new my archetype, created by me, in a repository, with the
 groupId=My-Archetype, but when I choose to use it, using the
 -DarchetypeGroupID=My-Archetype in the command line, maven will try to
 download it from org.apache.maven.archetypes ( that is the default
 archetypes location ), so it will not find it.

 Maven try to download archetypes using the default
 org.apache.maven.archetypes, and the option -DarchetypeGroupID does
 not
 override the default archetypes location.

 Is this a bug ?




 --
 View this message in context: 
http://www.nabble.com/-M2--Creating-archetypes-tf2193156.html#a6069348

 Sent from the Maven - Users forum at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




--
Eric Redmond
http://codehaus.org/~eredmond http://codehaus.org/%7Eeredmond





--
Eric Redmond
http://codehaus.org/~eredmond


Re: [M2] Creating archetypes

2006-08-30 Thread ccadete


I am using:

groupId:myarchetype
artifactId:myarchetype

First, I install the project in the repository,and I see it in the directory
m2/repository/myarchetype that is the groupId directory and it is ok.

Now I try to create a new project using my archetype:

mvn archetype:create 
-DartifactGroupId=myarchetype  
-DarchetypeArtifactId=myarchetype 
-DarchetypeVersion=1.0 
-DgroupId=my.cc 
-DartifactId=cc

and it gives me:

[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Error creating from archetype

Embedded error: Archetype does not exist: Unable to download the artifact
from a
ny repository

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.apache.maven.archetypes
-DartifactId=
myarchetype \
-Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file


  org.apache.maven.archetypes:myarchetype:jar:1.0


And we can see that the groupId is org.apache.maven.archetypes, so it is
getting the default groupId for archetypes.







-- 
View this message in context: 
http://www.nabble.com/-M2--Creating-archetypes-tf2193156.html#a6070269
Sent from the Maven - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [M2] Creating archetypes

2006-08-30 Thread Wendy Smoak

On 8/30/06, ccadete [EMAIL PROTECTED] wrote:

Now I try to create a new project using my archetype:

mvn archetype:create
-DartifactGroupId=myarchetype


Shouldn't that be -DarchetypeGroupId=myarchetype ?

Here's the README for one of mine...
http://svn.apache.org/repos/asf/struts/maven/trunk/struts-archetype-blank/README.txt

HTH,
--
Wendy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [M2] Creating archetypes

2006-08-30 Thread ccadete



Yes, it was that, now it is working :) thanks.

ccadete

-- 
View this message in context: 
http://www.nabble.com/-M2--Creating-archetypes-tf2193156.html#a6070383
Sent from the Maven - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [M2] Creating archetypes

2006-08-30 Thread Takashi Nishigaya

Hi ccadete,

try my bash completion script:

http://blogs.sun.com/nishigaya/entry/bash_completion_for_maven_2

it will complemet plugin parameters as well as well-known plugin
goals.
the above entry is written in japanse, sorry. But you can easily
find the link for the actual bash completion script.

Thanks,
Takashi Nishigaya

ccadete wrote:



Yes, it was that, now it is working :) thanks.

ccadete




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [m2] doc suggestions (was Guide to creating archetypes)

2005-11-09 Thread Jason van Zyl
On Tue, 2005-11-08 at 22:01 -0600, Jeff Jensen wrote:
 Besides the multi-module doc, my experience wishes for the POM entry
 descriptions - some are too vague.  More detail (what is it for/why would
 you use it, how to use it), examples, valid values, etc. would help a lot.
 
 I think the project descriptor has big potential as a solid reference
 vehicle, with the added info.  I would value that more than many of the
 guides.
 
 For a simple example, the packaging element doesn't describe valid values,
 so a search begins to learn them.  Viewing the schema doesn't help, as the
 packaging type is string.  Additionally, I think the phrase type of
 artifact is not intuitive to newbies, so listing the valid values would
 bring contextual explanation, as well as their definition.

Good idea, can you capture this in JIRA please.

 HTH, and thanks for asking.
 
 
 -Original Message-
 From: Jason van Zyl [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, November 08, 2005 9:10 AM
 To: Maven Users List
 Subject: RE: [m2] Guide to creating archetypes
 
 [snip]
 
 Anything in particular that's missing from the guides or introductory
 material? Also check the JIRA components for documentation as I know there
 are guides like the multi-project guide that are in demand and it's noted in
 JIRA. You can also vote on issues which lets us know what you guys want most
 which lets us focus our time better on writing what's most desired.
 
 [snip]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
-- 
jvz.

Jason van Zyl
jason at maven.org
http://maven.apache.org



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [m2] doc suggestions (was Guide to creating archetypes)

2005-11-09 Thread Jeff Jensen
http://jira.codehaus.org/browse/MNG-1479

Thanks Jason.


Quoting Jason van Zyl [EMAIL PROTECTED]:

 On Tue, 2005-11-08 at 22:01 -0600, Jeff Jensen wrote:
  Besides the multi-module doc, my experience wishes for the POM entry
  descriptions - some are too vague.  More detail (what is it for/why would
  you use it, how to use it), examples, valid values, etc. would help a lot.
 
  I think the project descriptor has big potential as a solid reference
  vehicle, with the added info.  I would value that more than many of the
  guides.
 
  For a simple example, the packaging element doesn't describe valid
 values,
  so a search begins to learn them.  Viewing the schema doesn't help, as the
  packaging type is string.  Additionally, I think the phrase type of
  artifact is not intuitive to newbies, so listing the valid values would
  bring contextual explanation, as well as their definition.

 Good idea, can you capture this in JIRA please.

  HTH, and thanks for asking.
 
 
  -Original Message-
  From: Jason van Zyl [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, November 08, 2005 9:10 AM
  To: Maven Users List
  Subject: RE: [m2] Guide to creating archetypes
 
  [snip]
 
  Anything in particular that's missing from the guides or introductory
  material? Also check the JIRA components for documentation as I know there
  are guides like the multi-project guide that are in demand and it's noted
 in
  JIRA. You can also vote on issues which lets us know what you guys want
 most
  which lets us focus our time better on writing what's most desired.
 
  [snip]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 --
 jvz.

 Jason van Zyl
 jason at maven.org
 http://maven.apache.org



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Guide to creating archetypes

2005-11-08 Thread Alexander Hars

Hi,

Two weeks ago I wrote a significantly expanded Guide to Creating 
Archetypes. It was immediately posted to CVS, but it is still not 
available on the website.


Is there some reason why the Maven2 site is not updated regularly (last 
update was 10/21). Shouldn't it be very easy using Maven2?
I am sure that lots of  improvements have been made to the documentation 
in the last weeks.


The documentation is really essential for all us newbies to Maven2 and 
it would help very much if you could update the site.


Thank you very much
Alexander


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Guide to creating archetypes

2005-11-08 Thread Richard Allen
I second that one. My biggest stumbling block so far with adopting Maven 
has been lack of documentation. However, I do understand how difficult 
it can be to get the docs written.


Richard

Alexander Hars wrote:


Hi,

Two weeks ago I wrote a significantly expanded Guide to Creating 
Archetypes. It was immediately posted to CVS, but it is still not 
available on the website.


Is there some reason why the Maven2 site is not updated regularly 
(last update was 10/21). Shouldn't it be very easy using Maven2?
I am sure that lots of  improvements have been made to the 
documentation in the last weeks.


The documentation is really essential for all us newbies to Maven2 and 
it would help very much if you could update the site.


Thank you very much
Alexander


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Guide to creating archetypes

2005-11-08 Thread Anuerin Diaz
maybe we can use http://wiki.apache.org/maven/ for a collaborative
effort? there is no specific wiki site for maven2 but from what i can
see that wiki is relatively unused by maven1.

finalized documents could then be promoted to the official site as the
maintainers see fit. not everybody has ready access to the development
branch so i guess there will be people who will benefit in this
effort.

ciao!

On 11/8/05, Richard Allen [EMAIL PROTECTED] wrote:
 I second that one. My biggest stumbling block so far with adopting Maven
 has been lack of documentation. However, I do understand how difficult
 it can be to get the docs written.

 Richard

 Alexander Hars wrote:

  Hi,
 
  Two weeks ago I wrote a significantly expanded Guide to Creating
  Archetypes. It was immediately posted to CVS, but it is still not
  available on the website.
 
  Is there some reason why the Maven2 site is not updated regularly
  (last update was 10/21). Shouldn't it be very easy using Maven2?
  I am sure that lots of  improvements have been made to the
  documentation in the last weeks.
 
  The documentation is really essential for all us newbies to Maven2 and
  it would help very much if you could update the site.
 
  Thank you very much
  Alexander
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




--

Programming, an artform that fights back

Anuerin G. Diaz
Registered Linux User #246176
Friendly Linux Board @ http://mandrivausers.org/index.php
http://capsule.ramfree17.org , when you absolutely have nothing else
better to do

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [m2] Guide to creating archetypes

2005-11-08 Thread Tony Steele
Please update website, my biggest problem is finding out how to do
things.

Tony
-Original Message-
From: Alexander Hars [mailto:[EMAIL PROTECTED] 
Sent: 08 November 2005 12:53
To: Maven Users List
Subject: Guide to creating archetypes


Hi,

Two weeks ago I wrote a significantly expanded Guide to Creating 
Archetypes. It was immediately posted to CVS, but it is still not 
available on the website.

Is there some reason why the Maven2 site is not updated regularly (last 
update was 10/21). Shouldn't it be very easy using Maven2?
I am sure that lots of  improvements have been made to the documentation

in the last weeks.

The documentation is really essential for all us newbies to Maven2 and 
it would help very much if you could update the site.

Thank you very much
 Alexander


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


http://www.bbc.co.uk/

This e-mail (and any attachments) is confidential and may contain
personal views which are not the views of the BBC unless specifically
stated.
If you have received it in error, please delete it from your system. 
Do not use, copy or disclose the information in any way nor act in
reliance on it and notify the sender immediately. Please note that the
BBC monitors e-mails sent or received. 
Further communication will signify your consent to this.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Guide to creating archetypes

2005-11-08 Thread Jason van Zyl
On Tue, 2005-11-08 at 13:53 +0100, Alexander Hars wrote:
 Hi,
 
 Two weeks ago I wrote a significantly expanded Guide to Creating 
 Archetypes. It was immediately posted to CVS, but it is still not 
 available on the website.

http://maven.apache.org/guides/mini/guide-creating-archetypes.html

Is that not it?

 Is there some reason why the Maven2 site is not updated regularly (last 
 update was 10/21). Shouldn't it be very easy using Maven2?

mvn site-deploy

 I am sure that lots of  improvements have been made to the documentation 
 in the last weeks.

It is usually deployed once a day if not more.

 The documentation is really essential for all us newbies to Maven2 and 
 it would help very much if you could update the site.

We usually update the site when changes are made, but like all human
beings we sometimes miss things. If the guide you are referring does not
have the expected content just let me know.

 Thank you very much
  Alexander
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
-- 
jvz.

Jason van Zyl
jason at maven.org
http://maven.apache.org

Our achievements speak for themselves. What we have to keep track
of are our failures, discouragements and doubts. We tend to forget
the past difficulties, the many false starts, and the painful
groping. We see our past achievements as the end result of a
clean forward thrust, and our present difficulties as
signs of decline and decay.

 -- Eric Hoffer, Reflections on the Human Condition


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Guide to creating archetypes

2005-11-08 Thread Jason van Zyl
On Tue, 2005-11-08 at 08:02 -0500, Richard Allen wrote:
 I second that one. My biggest stumbling block so far with adopting Maven 
 has been lack of documentation. However, I do understand how difficult 
 it can be to get the docs written.

If there is something lacking then it is best to use one of the four
components we have for documentation:

http://jira.codehaus.org/secure/BrowseProject.jspa

As far as the site goes I've tried to make the first quick links give a
clear path to the documentation if that is lacking just let us know:

Features
Download 
Installation Instructions 
Getting Started 
Documentation
Available Plug-ins 
Plug-in Matrix
Where is it?

The plug-in matrix is particularly helpful when looking for specific
things you need and we now have 34 mini guides, and 11 guides on
introductory material. We can only help with users' direction. Saying
there is a lack of documentation doesn't really help anyone. We need
to know where it is lacking in order to fix it.



 Richard
 
 Alexander Hars wrote:
 
  Hi,
 
  Two weeks ago I wrote a significantly expanded Guide to Creating 
  Archetypes. It was immediately posted to CVS, but it is still not 
  available on the website.
 
  Is there some reason why the Maven2 site is not updated regularly 
  (last update was 10/21). Shouldn't it be very easy using Maven2?
  I am sure that lots of  improvements have been made to the 
  documentation in the last weeks.
 
  The documentation is really essential for all us newbies to Maven2 and 
  it would help very much if you could update the site.
 
  Thank you very much
  Alexander
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
-- 
jvz.

Jason van Zyl
jason at maven.org
http://maven.apache.org

Our achievements speak for themselves. What we have to keep track
of are our failures, discouragements and doubts. We tend to forget
the past difficulties, the many false starts, and the painful
groping. We see our past achievements as the end result of a
clean forward thrust, and our present difficulties as
signs of decline and decay.

 -- Eric Hoffer, Reflections on the Human Condition


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Guide to creating archetypes

2005-11-08 Thread Jason van Zyl
On Tue, 2005-11-08 at 15:11 +0200, Anuerin Diaz wrote:
 maybe we can use http://wiki.apache.org/maven/ for a collaborative
 effort? there is no specific wiki site for maven2 but from what i can
 see that wiki is relatively unused by maven1.

Anyone is welcome to use the wiki but we have a decent pattern started
for the doco. People can help by adding to the FAQs, creating mini
guides and creating introductory guides. If they are placed in JIRA they
are usually processed pretty quickly. Full documents if they are new are
preferred and patches for everything else are greatly appreciated.
Patches get absorbed pretty quickly.

 finalized documents could then be promoted to the official site as the
 maintainers see fit. not everybody has ready access to the development
 branch so i guess there will be people who will benefit in this
 effort.

Unfortunately we don't have a very good work flow in place for this
right now and JIRA is your best bet at the moment.

 ciao!
 
 On 11/8/05, Richard Allen [EMAIL PROTECTED] wrote:
  I second that one. My biggest stumbling block so far with adopting Maven
  has been lack of documentation. However, I do understand how difficult
  it can be to get the docs written.
 
  Richard
 
  Alexander Hars wrote:
 
   Hi,
  
   Two weeks ago I wrote a significantly expanded Guide to Creating
   Archetypes. It was immediately posted to CVS, but it is still not
   available on the website.
  
   Is there some reason why the Maven2 site is not updated regularly
   (last update was 10/21). Shouldn't it be very easy using Maven2?
   I am sure that lots of  improvements have been made to the
   documentation in the last weeks.
  
   The documentation is really essential for all us newbies to Maven2 and
   it would help very much if you could update the site.
  
   Thank you very much
   Alexander
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 --
 
 Programming, an artform that fights back
 
 Anuerin G. Diaz
 Registered Linux User #246176
 Friendly Linux Board @ http://mandrivausers.org/index.php
 http://capsule.ramfree17.org , when you absolutely have nothing else
 better to do
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
-- 
jvz.

Jason van Zyl
jason at maven.org
http://maven.apache.org

Three people can keep a secret provided two of them are dead.

 -- Unknown


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [m2] Guide to creating archetypes

2005-11-08 Thread Jason van Zyl
On Tue, 2005-11-08 at 14:42 +, Tony Steele wrote:
 Please update website, 

The site is updated very frequently. We try to keep it current with the
changes made to the documentation.

 my biggest problem is finding out how to do
 things.

Anything in particular that's missing from the guides or introductory
material? Also check the JIRA components for documentation as I know
there are guides like the multi-project guide that are in demand and
it's noted in JIRA. You can also vote on issues which lets us know what
you guys want most which lets us focus our time better on writing what's
most desired.

 Tony
 -Original Message-
 From: Alexander Hars [mailto:[EMAIL PROTECTED] 
 Sent: 08 November 2005 12:53
 To: Maven Users List
 Subject: Guide to creating archetypes
 
 
 Hi,
 
 Two weeks ago I wrote a significantly expanded Guide to Creating 
 Archetypes. It was immediately posted to CVS, but it is still not 
 available on the website.
 
 Is there some reason why the Maven2 site is not updated regularly (last 
 update was 10/21). Shouldn't it be very easy using Maven2?
 I am sure that lots of  improvements have been made to the documentation
 
 in the last weeks.
 
 The documentation is really essential for all us newbies to Maven2 and 
 it would help very much if you could update the site.
 
 Thank you very much
  Alexander
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 http://www.bbc.co.uk/
 
 This e-mail (and any attachments) is confidential and may contain
 personal views which are not the views of the BBC unless specifically
 stated.
 If you have received it in error, please delete it from your system. 
 Do not use, copy or disclose the information in any way nor act in
 reliance on it and notify the sender immediately. Please note that the
 BBC monitors e-mails sent or received. 
 Further communication will signify your consent to this.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
-- 
jvz.

Jason van Zyl
jason at maven.org
http://maven.apache.org

happiness is like a butterfly: the more you chase it, the more it will
elude you, but if you turn your attention to other things, it will come
and sit softly on your shoulder ...

 -- Thoreau 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [m2] Guide to creating archetypes

2005-11-08 Thread ir. ing. Jan Dockx


On 8 Nov 2005, at 15:42, Tony Steele wrote:


Please update website, my biggest problem is finding out how to do
things.

Tony



That's one for my sigs! :-)



[…]  my biggest problem is finding out how to do things.
(in a mail on the Maven Users List)


Re: Guide to creating archetypes

2005-11-08 Thread Anuerin Diaz
On 11/8/05, Jason van Zyl [EMAIL PROTECTED] wrote:
 On Tue, 2005-11-08 at 15:11 +0200, Anuerin Diaz wrote:
  maybe we can use http://wiki.apache.org/maven/ for a collaborative
  effort? there is no specific wiki site for maven2 but from what i can
  see that wiki is relatively unused by maven1.

 Anyone is welcome to use the wiki but we have a decent pattern started
 for the doco. People can help by adding to the FAQs, creating mini
 guides and creating introductory guides. If they are placed in JIRA they
 are usually processed pretty quickly. Full documents if they are new are
 preferred and patches for everything else are greatly appreciated.
 Patches get absorbed pretty quickly.

  finalized documents could then be promoted to the official site as the
  maintainers see fit. not everybody has ready access to the development
  branch so i guess there will be people who will benefit in this
  effort.

 Unfortunately we don't have a very good work flow in place for this
 right now and JIRA is your best bet at the moment.


the way i see it is we can use JIRA as the official promotion vehicle.
documentation could be refined in the wikis by user comments and
suggestions and if no more flaws are detected then it could be
submitted to JIRA for inclusion on the main site. the wiki can also be
a repository of bits and pieces that are not full-bodied enough to
warrant their own mini-guide (e.g. a listing of all properties that
could be accessed in maven) .

another advantage of this approach is that the the rough drafts can
aid users find their way. although the downside is if the draft is
very rough it could make learning something more difficult than it
seems.

just an idea. :)

ciao!


--

Programming, an artform that fights back

Anuerin G. Diaz
Registered Linux User #246176
Friendly Linux Board @ http://mandrivausers.org/index.php
http://capsule.ramfree17.org , when you absolutely have nothing else
better to do

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Guide to creating archetypes

2005-11-08 Thread Wim Deblauwe
2005/11/8, Jason van Zyl [EMAIL PROTECTED]:

 On Tue, 2005-11-08 at 13:53 +0100, Alexander Hars wrote:
  Hi,
 
  Two weeks ago I wrote a significantly expanded Guide to Creating
  Archetypes. It was immediately posted to CVS, but it is still not
  available on the website.

 http://maven.apache.org/guides/mini/guide-creating-archetypes.html

 Is that not it?


What I miss there is what archetype.xml contains in the META-INF directory.
That does not seem to get explained.

regards,

Wim


A few questions about creating archetypes

2005-10-26 Thread Alexander Hars

Hi,

I have read the Guide to creating archetypes but I am not sure about a 
few things:


I assume that we create the archetype as a maven-plugin. Then it needs a 
pom.
Do I include the archetype ... /archetype in the archetype plugin's 
pom.xml?

Do I  also need to define packagingmaven-plugin/packaging ?
Do we need to define any dependencies ?

When the archetype initializes a project, it needs to create a pom.xml 
for the new project.

That pom.xml is different from the archetype plugin pom.xml.
So how do I define the pom.xml that the archetype plugin should create?

Thanks for your help!

-Alexander






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: A few questions about creating archetypes

2005-10-26 Thread Jorg Heymans

Alexander Hars wrote:
 Hi,
 
 I have read the Guide to creating archetypes but I am not sure
 about a few things:
 
 I assume that we create the archetype as a maven-plugin. Then it
 needs a pom. Do I include the archetype ... /archetype in the
 archetype plugin's pom.xml? Do I  also need to define
 packagingmaven-plugin/packaging ? Do we need to define any
 dependencies ?
 
 When the archetype initializes a project, it needs to create a
 pom.xml for the new project. That pom.xml is different from the
 archetype plugin pom.xml. So how do I define the pom.xml that the
 archetype plugin should create?
 

Have a look at the example archetypes here [1], they helped me a lot in
understanding how archetypes are meant to be structured.


Jorg

[1]
http://svn.apache.org/viewcvs.cgi/maven/components/trunk/maven-archetype/maven-archetypes/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: A few questions about creating archetypes

2005-10-26 Thread Luca Gmail
I answer the last part of your question. The pom.xml for the new project is
the pom you like to use. So it contanins the dipendences, the repositories,
ecc. you decide your new project should have.

Bye,
Luca

-Original Message-
From: Alexander Hars [mailto:[EMAIL PROTECTED] 
Sent: mercoledì 26 ottobre 2005 9.35
To: users@maven.apache.org
Subject: A few questions about creating archetypes

Hi,

I have read the Guide to creating archetypes but I am not sure about a 
few things:

I assume that we create the archetype as a maven-plugin. Then it needs a 
pom.
Do I include the archetype ... /archetype in the archetype plugin's 
pom.xml?
Do I  also need to define packagingmaven-plugin/packaging ?
Do we need to define any dependencies ?

When the archetype initializes a project, it needs to create a pom.xml 
for the new project.
That pom.xml is different from the archetype plugin pom.xml.
So how do I define the pom.xml that the archetype plugin should create?

Thanks for your help!

-Alexander






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Summary: Guide for creating archetypes

2005-10-26 Thread Jason van Zyl
On Wed, 2005-10-26 at 18:24 +0200, Alexander Hars wrote:
 Hi,
 thank you for all the helpful tips about where to look for creating 
 archetypes. I am summarizing what I learned in a step-by-step guide below:
 
 The only question that I have not been able to solve is how to use 
 instruct an archetype to create an EMPTY directory (directory tag does 
 not work).

If you can integrate it into this:

http://maven.apache.org/guides/mini/guide-creating-archetypes.html

In APT format I would apply the patch immediately. It's hard to
integrate non-standard formats. I greatly appreciate the effort but
doing the doco in our current standard format APT pretty much guarantees
the patch will be applied.

Here's the format of the archetype guide:

http://svn.apache.org/viewcvs.cgi/maven/components/trunk/maven-
site/src/site/apt/guides/mini/guide-creating-archetypes.apt?
rev=326378view=markup

And here's the guide for APT:

http://maven.apache.org/guides/mini/guide-apt-format.html

Again, not to discourage you but it's just hard at the moment with
everything going on to absorb non APT doco submissions.

 
  H O W T O C R E A T E  A  N  A R C H E 
 T Y P E
 
 
 1. Create a new project.
  add the directories:
 src/main/resources/META-INF  //will hold archetype.xml
 src/main/resources/archetype-resources   //will hold the pom.xml and 
 source tree that need to be copied
 
 2. Create a POM for the archetype, e.g.
 
 project
   modelVersion4.0.0/modelVersion
   groupIdmy.groupIdgroupId
   artifactIdmy-archetype-id/artifactId
   version1.0-SNAPSHOT/version
   packagingmaven-plugin/packaging
 /project
 
 3. The file structure for your archetype must be located in the
 directory: src/main/resources/META-INF and 
 src/main/resources/archetype-resources
 
 4. create an archetype descriptor in a file called archetype.xml and 
 place it in:
 src/main/resources/META-INF/pom.xml
 Note that allowPartialtrue/allowPartial makes it possible to run the 
 archetype creation on an existing project.
 
 for example:
 
 archetype
   idmy-archetype-id/id
   allowPartialfalse/allowPartial
   sources
  sourcesrc/main/java/App.java/source
   /sources
   testSources
 sourcesrc/test/java/AppTest.java/source
   /testSources
   siteResources
 resourcesrc/site/apt/index.apt/resource
   /siteResources
 /archetype
 
 You can select from the following tags:
  sources = src/main/java
  resources = src/main/resources
  test-sources = src/test/java
  test-resources = src/test/resources
  site-resources = src/site
 
 (I have not been able to find a way to create empty directories, though).
 
 5. create the pom.xml that the archetype should create and place it
 in:
 src/main/resources/archetype-resources/pom.xml
 
 for example:
 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;
   modelVersion4.0.0/modelVersion
   groupId${groupId}/groupId
   artifactId${artifactId}/artifactId
   packagingjar/packaging
   version${version}/version
   nameA custom project/name
   urlhttp://www.myorganization.org/url
   dependencies
 dependency
   groupIdjunit/groupId
   artifactIdjunit/artifactId
   version3.8.1/version
   scopetest/scope
 /dependency
   /dependencies
 /project
 
 6. run mvn install
 This installs your archetype locally.
 
 7. to create a new project based on your archetype use:
  mvn archetype:create -DarchetypeGroupId=my.groupId 
 -DarchetypeArtifactId=my-archetype-id -DarchetypeVersion=1.0-SNAPSHOT 
 -DgroupId=my.organization -DartifactId=myArtifactId
 Note: Don't forget -DarchetypeVersion !
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
-- 
jvz.

Jason van Zyl
jason at maven.org
http://maven.apache.org

Our achievements speak for themselves. What we have to keep track
of are our failures, discouragements and doubts. We tend to forget
the past difficulties, the many false starts, and the painful
groping. We see our past achievements as the end result of a
clean forward thrust, and our present difficulties as
signs of decline and decay.

 -- Eric Hoffer, Reflections on the Human Condition


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Summary: Guide for creating archetypes

2005-10-26 Thread Alexander Hars
The .apt version of the Guide for creating archetypes is below (I did 
verify that the conversion of this file to html works).


In section 2 on archetype.xml, I include a note:
At this point one can only specify individual files to be created but 
not empty directories.

If that is not right, please correct it.

Cheers
-Alexander

.apt file is below

--
Guide to Creating Archetypes
--
Jason van Zyl, Alexander Hars
--
26 October 2005
--

Guide to Creating Archetypes

Creating an archetype is a pretty straight forward process. An 
archetype is a very simple plugin, that
contains the project prototype you wish to create. An archetype is made 
up of:


* an archetype descriptor (archetype.xml in directory: 
src/main/resources/META-INF/). It lists all the files
  that will be contained in the archetype and categorizes them so they 
can be processed correctly by the

  archetype generation mechanism.

* the prototype files that are copied by the archetype (directory: 
src/main/resources/archetype-resources/)


* the prototpye pom (pom.xml in: src/main/resourcs/archetype-resources)

* a pom for the archetype (pom.xml in the archetype's root directory).

[]

To create an archetype follow these steps:

* 1. Create a new project and pom.xml for the archetype plugin

 An example pom.xml for an archetype plugin looks as follows:

++

project
 modelVersion4.0.0/modelVersion
 groupIdmy.groupIdgroupId
 artifactIdmy-archetype-id/artifactId
 version1.0-SNAPSHOT/version
 packagingmaven-plugin/packaging
/project

++

 All you need to specify is a groupId, artifactId and version. 
These three parameters will be needed later for
 invoking the archetype via archetype:create from the commandline. 


* 2. Create the archetype descriptor

The archetype descriptor is a file called archetype.xml which must be 
located in src/main/resources/META-INF/
An example for an archetype descriptor can be found in the quickstart 
archetype:


++

archetype
 idquickstart/id
 sources
   sourcesrc/main/java/App.java/source
 /sources
 testSources
   sourcesrc/test/java/AppTest.java/source
 /testSources
/archetype

++

The \id\ tag should be the same as the artifactId in the archetype 
pom.xml.


An optional \allowPartial\true\/allowPartial\ tag makes it possible 
to run the archetype:create even existing projects.


The \sources\, \resources\, \test-resources\ and 
\site-resources\ tags represent the different sections of the project:


* \sources\ = src/main/java

* \resources\ = src/main/resources

* \test-sources\ = src/test/java

* \test-resources\ = src/test/resources

* \site-resources\ = src/site
[]

\sources\ and \test-sources\ can contain \source\ elements that 
specify a source file.


\test-resources\ and \site-resources\ can contain \resource\ 
elements that specify a resource file.


At this point one can only specify individual files to be created but 
not empty directories.


Thus the quickstart archetype shown above defines the following 
directory structure:


++

archetype
|-- pom.xml
`-- src
   `-- main
   `-- resources
   |-- META-INF
   |   `-- archetype.xml
   `-- archetype-resources
   |-- pom.xml
   `-- src
   |-- main
   |   `-- java
   |   `-- App.java
   `-- test
   `-- java
   `-- AppTest.java

++

* 3. Create the prototype files and the prototype pom.xml

The next component of the archetype to be created is the prototype 
pom.xml. Any pom.xml will do, just
don't forget to the set artifactId and groupId as variables  ( 
$\{artifactId\} / $\{groupId\} ). Both variables
will be initialized from the commandline when calling 
archetype:create.  


An example for a prototype pom.xml is:

++

project
 modelVersion4.0.0/modelVersion
 groupId${groupId}/groupId
 artifactId${artifactId}/artifactId
 packagingjar/packaging
 version${version}/version
 nameA custom project/name
 urlhttp://www.myorganization.org/url
 dependencies
   dependency
 groupIdjunit/groupId
 artifactIdjunit/artifactId
 version3.8.1/version
 scopetest/scope
   /dependency
 /dependencies
/project

++

* 4. Install and run the archetype

Now you are ready to install the archetype:

++

mvn install

++

Now that you have created an archetype you can try it on your local 
system by using the following command:
In this command, you need to specify the full information about the 
archetype you want to use (its groupId, its artifactId, its version) and 
the information about the new project you want to create (artifactId and 
groupId).
Don't forget to include the version of your archetype (if you don't 
include the version, you archetype creation may fail with a message that 
version:RELEASE was not found)



++

mvn archetype:create -DarchetypeGroupId=archetype-groupId 
-DarchetypeArtifactId