Insert a timestamp into an archetype?

2011-09-30 Thread Dennis Lundberg
Hi I'm creating an archetype, with a bunch of files. In the .java files I want to insert a timestamp. When I use the archetype to generate a new project, the .java files should show when they were generated. Is this possible? I have tried inserting ${maven.build.timestamp} as the default value

Re: Insert a timestamp into an archetype?

2011-09-30 Thread Bram Patelski
You could use filtering? On Fri, Sep 30, 2011 at 22:01, Dennis Lundberg denn...@apache.org wrote: Hi I'm creating an archetype, with a bunch of files. In the .java files I want to insert a timestamp. When I use the archetype to generate a new project, the .java files should show when they

Re: Insert a timestamp into an archetype?

2011-09-30 Thread Dennis Lundberg
Hi Bram Thanks for your suggestion. My current approach is to use filtering to insert the timestamp into the .java file. The problem I am having is actually getting hold of the appropriate value of a timestamp. It should reflect the point in time when my archetype is used to generate a new

Re: Insert a timestamp into an archetype?

2011-09-30 Thread Bram Patelski
Okay, I see. Well, I'm not sure if there is a filter-option for current time. I did once write a custom mojo for renaming packages (so directories) based on the archetype artifactId. That way if I used the archetype to generate a new project called: - groupId: org.apache.whatever - artifactId: