aspose 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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 5772
    
    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
maven struts2 plugins
Eclipse Indigo m2e plugin missing archetypes
unable to create project from archetype
Myfaces Archetype for JSF Custom Components
how to run a project using maven