In your archetype, you can use variable substitutions wherein a variable name
is enclosed with two underscores before and after the property name. These
variable substitutions are intended to take place during project creation.

For example, shown below is a directory name within the archetype resources
that has been expressed using the property 'rootArtifactId'. So if
rootArtifactId=purchase-order, then the final, interpolated name of the
directory in the new project instance will be purchase-order-service.

__rootArtifactId__-service

The same sort of substitution can be used for filenames as well as for
directory names. While 'rootArtifactId' is a standard property in the
archetype, you can also supply your own properties and use them in this same
manner.


Kent Narling wrote:
> 
> Is there any way to customize the names of the files generated by an
> archetype?
> 
> eg I would like to generate a shell file that is installed by the
> project and naturally this shell file should be named according to one
> of the archetype properties...
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Way-to-customize-file-names-in-archetypes--tp27721206p27729518.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to