maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Petrelli <antonio.petre...@gmail.com>
Subject Re: How to set some variables in archetypes?
Date Fri, 05 Nov 2010 12:17:56 GMT
2010/11/5 Sonja Stocker <sonja.stocker@gmx.de>:
> I´m developing an archetype for out projects. Their general structure is Customer -->
Project --> Submodule_1, ..., Submodule_n. For each project the customer and project vary.
During the archetype generating I´m able to set the name of the top directory, customer.
But after this I have to change the name of the project in the generated Maven project, in
all subordinated directories.
>
> Is there a possibility to use place holder for this name which whould be replaced during
the generating of the archetype? I´ve tried it with
> <modules>
>    <module>${project}</module>
> </modules>
> in the upper POM and using archetype.properties where this property was declared: project=PROJECTNAME.
But it didn´t work.
Any other idea?

I suppose that you are using create-from-project goal.
You can have module names automatically replaced when module names are
an "extension" to the name of the project.
For example:
my-project
-- my-project-ear
-- my-project-ejb
-- my-project-war
See here for more information:
http://maven.apache.org/archetype/maven-archetype-plugin/examples/create-multi-module-project.html

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message