File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Generate Dynamic web.xml with custom archetype Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Generate Dynamic web.xml with custom archetype" Watch "Generate Dynamic web.xml with custom archetype" New topic
Author

Generate Dynamic web.xml with custom archetype

Chandra Sekar
Ranch Hand

Joined: Apr 12, 2006
Posts: 94
Hi,

I have been creating a custom archetype for maven. I want the content of web.xml of the generated projects to vary based on the groupId of the project.

Can something like this be achieved in the archetype creation itself?


Chandru
Chandra Sekar
Ranch Hand

Joined: Apr 12, 2006
Posts: 94
Oh my bad!

I found the solution myself.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

You could find forgiveness for your sins if you would post the solution...


JBoss In Action
Chandra Sekar
Ranch Hand

Joined: Apr 12, 2006
Posts: 94
Peter Johnson wrote:You could find forgiveness for your sins if you would post the solution...

Using ${groupId}, ${artifactId}, ${version} and ${package} in the files does the trick. These get replaced by the value defined for the corresponding properties during project creation.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Generate Dynamic web.xml with custom archetype
 
Similar Threads
Eclipse Indigo m2e plugin missing archetypes
maven struts2 plugins
how to run a project using maven
Myfaces Archetype for JSF Custom Components
unable to create project from archetype