You'll need to modify the following method in ArtifactInstaller.java:

    private void installStrutsViews() {
        Copy copy = (Copy) antProject.createTask("copy");
        copy.setFile(new File(sourceDirectory +
"/src/main/webapp/WEB-INF/pages/" + pojoName + "Form.jsp"));
        copy.setTofile(new File(destinationDirectory +
"/src/main/webapp/WEB-INF/pages/" + pojoNameLower + "Form.jsp"));
        copy.execute();

        copy.setFile(new File(sourceDirectory +
"/src/main/webapp/WEB-INF/pages/" + pojoName + "List.jsp"));
        copy.setTofile(new File(destinationDirectory +
"/src/main/webapp/WEB-INF/pages/" + pojoNameLower + "List.jsp"));
        copy.execute();
    }

Matt

On Thu, May 8, 2008 at 2:06 PM, wkbutler <[EMAIL PROTECTED]> wrote:
> Sorry - this is obvious but I should mention it - I added the new
> configureExporter() template call just after the other pages being generated
> for the struts framework, i.e.
>
> // views
> configureExporter("appfuse/web/struts/list-view.ftl",
> "src/main/webapp/WEB-INF/pages/{class-name}List.jsp").start();
> configureExporter("appfuse/web/struts/form-view.ftl",
> "src/main/webapp/WEB-INF/pages/{class-name}Form.jsp").start();
> configureExporter("appfuse/web/struts/search-view.ftl",
> "src/main/webapp/WEB-INF/pages/{class-name}Search.jsp").start();
>
> wkbutler wrote:
> Hi All -
> I have successfullly overridden the FTL templates used by the 'gen' goal of
> appfuse-maven-plugin with my own templates (located in my project under
> test/resources/appfuse).
>
> I have been trying now to add some new templates to the generator. For
> example - I modified org.appfuse.tool.AppFuseExporter.java to include a new
> page:
>
> configureExporter("appfuse/web/struts/search-view.ftl",
> "src/main/webapp/WEB-INF/pages/{class-name}Search.jsp").start();
>
> and rebuilt the plugin, installing it to my local repository. I did verify
> that the local repository was updated and my new template exists in the new
> plugin JAR. Also I did execute a mvn clean and verified the POM references
> the proper plugin version, 2.0.2-SNAPSHOT.
>
> However, executing mvn appfuse:gen -Dentity=Name does not produce my new
> page as expected, although it does produce the built-in files. Any idea what
> I missed?
>
> Thanks -
>
> ________________________________
> View this message in context: Re: appfuse:gen - adding new templates
> Sent from the AppFuse - User mailing list archive at Nabble.com.
>

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

Reply via email to