The following comment has been added to this issue:

     Author: 
    Created: Mon, 18 Aug 2003 4:17 PM
       Body:
Sure, just unzip my zip into your .maven/plugins directory.

Then, all you have to do is run "maven genapp".  It will ask you for a template.  The 
only one I sent with it was "default" so you have to use that.

It will then prompt you for an id, name, and package for your new app.

If you want to make a new template, create a .maven/template directory and copy the 
.maven/plugins/maven-genapp-plugin-1.0/plugin-resources/default directory into there.  
Rename it to whatever the new name of your template will be.

Then, change the project.xml and files to whatever you want.  For my purposes, I 
stripped out all the .java files and the .properties file since I don't need those.  I 
changed all the information in project.xml to suit my company.

Finally, call "maven genapp" in a new directory and specify the name of your new 
template.
---------------------------------------------------------------------
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