maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sanchit gupta <saanchithefri...@gmail.com>
Subject Using Maven archetype for dynamic file creation
Date Mon, 30 Jun 2014 07:44:29 GMT
I am using  maven archetypes
<http://maven.apache.org/archetype/maven-archetype-plugin/>  for generation
of code and as given they also use Velocity. Velocity can be used for
dynamic file generation, it can use java objects and use there methods,
fields etc to generate dynamic file. However as far as maven archetype is
concerned I see that they are only capable of simple variable substitution
and a static file/folder structure.

   1.

   Is there a way to do processing prior to creating a project from an
   archetype, add java objects to the velocity context, and have the archetype
   templates be able to access them.
   2. Is there some documentation about how to use java objects with the
   maven archetype to generate dynamic file content?


-- 

Sincere Regards,
Sanchit Gupta

"A man is a success if he gets up in the morning and gets to bed at night,
and in between he does what he wants to do."
— Bob Dylan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message