From f5eb9451496da0e5c3779f1e91504584e4343e84 Mon Sep 17 00:00:00 2001 From: felipeal Date: Sat, 27 Nov 2004 21:23:52 +0000 Subject: [PATCH] New customization guide (MPAPPGEN-20) git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116267 13f79535-47bb-0310-9956-ffa450edef68 --- genapp/xdocs/changes.xml | 1 + genapp/xdocs/customization_guide.xml | 103 +++++++++++++++++++++++++++ genapp/xdocs/navigation.xml | 1 + 3 files changed, 105 insertions(+) create mode 100644 genapp/xdocs/customization_guide.xml diff --git a/genapp/xdocs/changes.xml b/genapp/xdocs/changes.xml index 3f9d5f08..8887781b 100644 --- a/genapp/xdocs/changes.xml +++ b/genapp/xdocs/changes.xml @@ -25,6 +25,7 @@ + Added customization guide. Added Velocity-based webapp template (named web-velocity). diff --git a/genapp/xdocs/customization_guide.xml b/genapp/xdocs/customization_guide.xml new file mode 100644 index 00000000..f7fdf84c --- /dev/null +++ b/genapp/xdocs/customization_guide.xml @@ -0,0 +1,103 @@ + + + + + + + Customization Guide + Miguel Griffa + + + +
+

+ The genapp plugin provides several general purpose templates. + Companies or large sites may have their own application templates + that for whatever reason they want to keep in-house. +

+

+ This guide is intended to help writing and maintaining application + templates outside the plugin. In this manner, the plugin can be + updated and the template is not affected. +

+

+ If you have some good application templates, consider contributing a + general purpose version to the project, so more users can benefit + from it. +

+ +

+ Information on this guide can be used to write custom templates + or to simply customize built-in templates. Since templates are + currently stored in a JAR file you cannot modify that template + without having to maintain a customized version of the plugin + (for example, an upgrade of the plugin will not include you + changes, unless they were committed to maven's cvs). +

+
+
+
+ +

+ Go to you local maven installation and extract in a working + directory the contents of + plugins/maven-genapp-plugin.x.y.jar + (where x.y is the version of the plugin). +

+

+ Inside the plugin-resources directory you can find many + directories with different templates. These directories contain + the resources associated with the different templates. Start by + copying one of there to a different directory. This new copy + will be the one that we'll be working on. For this example, we + will consider the new template directory to be on + /opt/templates/foo +

+
+ +

+ Go to /opt/templates/foo. You should find there a + template.properties file and a + template-resources directory. The template + properties file may be customized (open and play with its + properties). +

+

+ Just play with files in the template until you have what you + want. One of the things that you are likely to change is the + project.xml file, to have you company information, + your directory layout and the reports you use. +

+
+
+
+

+ Create a directory for your application and type + maven genapp -Dmaven.genapp.template.dir=/opt/templates/foo + This should generate the application template you defined. +

+

+ If you are willing to write more templates, consider using the + property maven.genapp.template.repository and place + there all your templates. Then, you can invoke you template by the + name of the directory. +

+
+ +
diff --git a/genapp/xdocs/navigation.xml b/genapp/xdocs/navigation.xml index 991a949f..dca2a9e7 100644 --- a/genapp/xdocs/navigation.xml +++ b/genapp/xdocs/navigation.xml @@ -30,6 +30,7 @@ +