Johann Goulley Johann Goulley - 1 year ago 120
Java Question

Maven archetype filename pattern with underscore

I'm creating a Maven archetype. I want to generate files like
replaced by a filtered property.

I created a file
and a filtered property
Files without underscore are renamed, but files with underscore around the filtered property are not. Any ideas?

I use maven-archetype-plugin 2.3 and org.apache.maven.archetype:archetype-packaging 2.3.

Other question : is it possible to lowercase a filtered value in a filename like it is possible in a file content with

Answer Source

You can accomplish both by adding required properties with default values set to the filter you want.

For the first case:

<requiredProperty key="messagePropertiesFileName">

Name the file

For the second case, add yet another property:

<requiredProperty key="todoLowerCase">

Use __todoLowerCase__ in folder/file names.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download