Re: Custom Archetypes: Creating empty directories

2009-11-20 Thread Matthew Runo
http://jira.codehaus.org/browse/ARCHETYPE-57 gives an example of how to do this.

Thanks for your time!

Matthew Runo
Software Engineer, Zappos.com
mr...@zappos.com - 702-943-7833

On Nov 19, 2009, at 11:37 PM, Richard Hauswald wrote:

 Hello list,
 I'm trying to create a custom archetype. All is working fine except
 that I can't create empty directories. Is this impossible or do miss
 something?
 Thanks,
 Richard
 -- 
 Richard Hauswald
 Blog: http://tnfstacc.blogspot.com/
 LinkedIn: http://www.linkedin.com/in/richardhauswald
 Xing: http://www.xing.com/profile/Richard_Hauswald
 
 -
 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



Archetype creation w/ metadata

2009-11-12 Thread Matthew Runo
Hello folks!

I hope this makes sense, as I'm about out of ideas as to how to go about 
getting my archetype to work as needed. I have two outstanding issues that I 
can't seem to squash.

1. When I use my archetype to make a project, I get an extra directory and I'm 
not sure how... Here's the resulting directory structure, when I create my app 
from /Users/mruno:

test-app
- pom.xml
^ src
-- all the stuff under src is properly placed
^ Users
- ^ mruno... and so on, to create an empty resources directory under 
/Users/mruno/test/src/main/resources and /Users/mruno/test/src/test/resources

I've no idea how or why these two empty directories are being created. When I 
check out the archetype from / I do not get this directory, leading me to think 
it's some sort of path issue.

2. I need to ask the user for some input to customize the project before 
Velocity goes through and does its variable replacement. I've tried making an 
archetype-metadata.xml but it seems like this file is ignored. How can I make 
maven use that file? I have created an archetype.xml as well, and it seems to 
be used. I've attached both files here:

--= archetype.xml =--
?xml version=1.0 encoding=UTF-8?archetype
  idsite-manager-app/id
  sources
source filtered=truesrc/main/java/TestControl.java/source
  /sources
  testSources
source filtered=truesrc/test/java/TestControlTest.java/source
  /testSources
  resources
resource filtered=truesrc/main/resources/build.properties/resource
resource filtered=truesrc/main/resources/log4j.xml/resource
resource filtered=truesrc/test/resources/build.properties/resource
resource filtered=truesrc/main/webapp/WEB-INF/web.xml/resource
resource 
filtered=truesrc/main/webapp/WEB-INF/spring-security.xml/resource
resource 
filtered=truesrc/main/webapp/WEB-INF/spring-servlet.xml/resource
  /resources
  siteResources
resource 
filtered=falsesrc/main/webapp/WEB-INF/freemarker/header.ftl/resource
resource 
filtered=falsesrc/main/webapp/WEB-INF/freemarker/login.ftl/resource
resource 
filtered=falsesrc/main/webapp/WEB-INF/freemarker/macros/library.ftl/resource
resource 
filtered=falsesrc/main/webapp/WEB-INF/freemarker/test.ftl/resource
  /siteResources
/archetype

--= archetype-metadata.xml =--
?xml version=1.0 encoding=UTF-8?
archetype-descriptor name=site-manager-app partial=true
  idsite-manager-app/id
  requiredProperties
requiredProperty key=name
  defaultValueMy Sample Application/defaultValue
/requiredProperty
requiredProperty key=description /
  /requiredProperties
  fileSets
fileSet packaged=true encoding=UTF-8
  directory./src/main/java/directory
  includes
include**/*.java/include
  /includes
/fileSet
fileSet packaged=true encoding=UTF-8
  directory./src/test/java/directory
  includes
include**/*.java/include
  /includes
/fileSet
fileSet encoding=UTF-8
  directory./src/main/webapp/WEB-INF/directory
  includes
include**/*.xml/include
  /includes
/fileSet
fileSet encoding=UTF-8
  directory./src/main/resources/directory
  includes
include**/*.xml/include
include**/*.properties/include
  /includes
/fileSet
fileSet encoding=UTF-8
  directory./src/test/resources/directory
  includes
include**/*.xml/include
include**/*.properties/include
  /includes
/fileSet
fileSet encoding=UTF-8
  directory./src/main/webapp/WEB-INF/freemarker/directory
  includes
include*.ftl/include
include**/*.ftl/include
  /includes
/fileSet
/archetype-descriptor

I really appreciate your time and help! Forgive me if I'm making silly 
mistakes... so far as I can tell though, I'm not.

Matthew Runo
Software Engineer, Zappos.com
mr...@zappos.com - 702-943-7833


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



Re: Archetype creation w/ metadata

2009-11-12 Thread Matthew Runo
So, I've managed to fix my duplicated directory issue. Apparently I do not need 
fully qualified path's in my pom file like I thought I did. 

I still cannot get maven to recognize my archetype-metadata.xml file though. 

Thanks for your time!

Matthew Runo
Software Engineer, Zappos.com
mr...@zappos.com - 702-943-7833

On Nov 12, 2009, at 10:48 AM, Matthew Runo wrote:

 Hello folks!
 
 I hope this makes sense, as I'm about out of ideas as to how to go about 
 getting my archetype to work as needed. I have two outstanding issues that I 
 can't seem to squash.
 
 1. When I use my archetype to make a project, I get an extra directory and 
 I'm not sure how... Here's the resulting directory structure, when I create 
 my app from /Users/mruno:
 
 test-app
 - pom.xml
 ^ src
 -- all the stuff under src is properly placed
 ^ Users
 - ^ mruno... and so on, to create an empty resources directory under 
 /Users/mruno/test/src/main/resources and /Users/mruno/test/src/test/resources
 
 I've no idea how or why these two empty directories are being created. When I 
 check out the archetype from / I do not get this directory, leading me to 
 think it's some sort of path issue.
 
 2. I need to ask the user for some input to customize the project before 
 Velocity goes through and does its variable replacement. I've tried making an 
 archetype-metadata.xml but it seems like this file is ignored. How can I make 
 maven use that file? I have created an archetype.xml as well, and it seems to 
 be used. I've attached both files here:
 
 --= archetype.xml =--
 ?xml version=1.0 encoding=UTF-8?archetype
  idsite-manager-app/id
  sources
   source filtered=truesrc/main/java/TestControl.java/source
  /sources
  testSources
source filtered=truesrc/test/java/TestControlTest.java/source
  /testSources
  resources
resource filtered=truesrc/main/resources/build.properties/resource
resource filtered=truesrc/main/resources/log4j.xml/resource
resource filtered=truesrc/test/resources/build.properties/resource
resource filtered=truesrc/main/webapp/WEB-INF/web.xml/resource
   resource 
 filtered=truesrc/main/webapp/WEB-INF/spring-security.xml/resource
resource 
 filtered=truesrc/main/webapp/WEB-INF/spring-servlet.xml/resource
  /resources
  siteResources
   resource 
 filtered=falsesrc/main/webapp/WEB-INF/freemarker/header.ftl/resource
resource 
 filtered=falsesrc/main/webapp/WEB-INF/freemarker/login.ftl/resource
resource 
 filtered=falsesrc/main/webapp/WEB-INF/freemarker/macros/library.ftl/resource
resource 
 filtered=falsesrc/main/webapp/WEB-INF/freemarker/test.ftl/resource
  /siteResources
 /archetype
 
 --= archetype-metadata.xml =--
 ?xml version=1.0 encoding=UTF-8?
 archetype-descriptor name=site-manager-app partial=true
  idsite-manager-app/id
  requiredProperties
requiredProperty key=name
  defaultValueMy Sample Application/defaultValue
/requiredProperty
requiredProperty key=description /
  /requiredProperties
  fileSets
fileSet packaged=true encoding=UTF-8
  directory./src/main/java/directory
  includes
include**/*.java/include
  /includes
/fileSet
fileSet packaged=true encoding=UTF-8
  directory./src/test/java/directory
  includes
include**/*.java/include
  /includes
/fileSet
fileSet encoding=UTF-8
  directory./src/main/webapp/WEB-INF/directory
  includes
include**/*.xml/include
  /includes
/fileSet
fileSet encoding=UTF-8
  directory./src/main/resources/directory
  includes
include**/*.xml/include
include**/*.properties/include
  /includes
/fileSet
fileSet encoding=UTF-8
  directory./src/test/resources/directory
  includes
include**/*.xml/include
include**/*.properties/include
  /includes
/fileSet
fileSet encoding=UTF-8
  directory./src/main/webapp/WEB-INF/freemarker/directory
  includes
include*.ftl/include
   include**/*.ftl/include
  /includes
/fileSet
 /archetype-descriptor
 
 I really appreciate your time and help! Forgive me if I'm making silly 
 mistakes... so far as I can tell though, I'm not.
 
 Matthew Runo
 Software Engineer, Zappos.com
 mr...@zappos.com - 702-943-7833
 
 
 -
 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