The following comment has been added to this issue:

     Author: 
    Created: Mon, 18 Aug 2003 4:19 PM
       Body:
At some point I imagine I should make a new issue. Someone tell me when I reach that 
point:

Ideas:

- Could create an optional template.jelly in the template directory that allows the 
template creator to do neat stuff like add custom filters
- Could make a templatepath (like a classpath) instead of the two hardcoded 
directories I have now.  This would allow other plugin developers to specify a 
template directory inside their plugin path

If anyone wants either of these, I can help make it happen.  Its just Not My Itch 
right now :)
---------------------------------------------------------------------
View the issue:

  http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-426


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MAVEN-426
    Summary: Allow genapp to support multiple templates
       Type: Improvement

     Status: Unassigned
   Priority: Major

 Time Spent: Unknown
  Remaining: Unknown

    Project: maven
   Fix Fors:
             1.1
   Versions:
             1.0-beta-9
             1.1

   Assignee: 
   Reporter: Brian Ewins

    Created: Wed, 14 May 2003 10:27 AM
    Updated: Mon, 18 Aug 2003 3:08 PM
Environment: all

Description:
At the moment the genapp plugin is pretty rudimentary, you only get the 'standard' 
maven template project. I'd like maven to support multiple project templates, to make 
it easier to (for example) set up a beginner's webapp, ejb, maven-plugin project; a 
project with a standard setup for a company (logos, developers, scm); etc etc.

Attached is some code to support this proposal. It changes the structure of the genapp 
'plugin.resources' directory so that it more closely matches a normal project:

plugin-resources/:
project.properties  project.xml  src

plugin-resources/src:
conf  java  test

plugin-resources/src/conf:
app.properties

plugin-resources/src/java:
App.java

plugin-resources/src/test:
AbstractTestCase.java  AppTest.java  NaughtyTest.java

Next we identify the three kinds of resource which need copied - those which need 
'repackaged' like java, test; those which need filtered (project.xml), and those which 
just need copied (everything else). I do this by adding a plugin.properties with the 
lines:

maven.genapp.repackage=java,test
maven.genapp.filter=project.xml

Finally I updated the plugin.jelly (attached). The plugin.jelly was written for b8, 
(hence the missing 'ant:' stuff) and takes an extra parameter:
maven -Dpackage=blah -Dtemplate=example genapp
this will try to copy the 'example' project from the user's home dir. This code isn't 
really sophisticated enough, it should try the user's home dir first then fall back on 
the plugin.resources dir, with the 'default' output of genapp moved to a project 
called 'default'; this would let maven ship with more examples (including a reactor 
example!) while giving the user a way to override them.

If the comments on this idea involve more changes to the plugin I'd be happy to oblige.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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

Reply via email to