You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Asmann, Roland" <Ro...@adesso.at> on 2010/11/06 19:09:31 UTC

Properties in the archetype

Hi all,

I'm having some problems with properties in archetypes. I read that it 
is possible to have files and directories renamed with properties 
(http://jira.codehaus.org/browse/ARCHETYPE-191), but this seems to be 
not working on modules.

I have a certain project-structure that must be used, and I want the 
modules to be renamed automatically:

my-test-app
   |-- my-test-ear
   |-- my-test-model
   |-- my-test-services
   |-- my-test-web

The problem here is that when I tell the archetype that I have a 
property "projectName" and rename the directories and module-entries in 
the archetype-metadata.xml to look like "__projectName__-ear" and 
"${projectName}-ear", I don't get those modules!

I've played around a bit and found that when I use a structure like this:

my-test
   |-- my-test-ear
   |-- my-test-model

The archetype-plugin will automatically create directories and entries 
in the archetype-metadata.xml like "__rootArtifactId__-ear" and 
"${rootArtifactId}-ear".

Why is this not working for my custom-property?

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock              T +43 1 2198790-27
Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
A-1210 Wien                         M +43 664 88657566
                                    E roland.asmann@adesso.at
                                    W www.adesso.at

-------------------------------------------------------------
             >>> business. people. technology. <<<
-------------------------------------------------------------

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


Re: Properties in the archetype

Posted by Joachim Van der Auwera <jo...@progs.be>.
I tried using this some time ago and remember this cannot be used for 
generic properties, only for groupId (if I remember correctly). The 
archetype plugin has some limitations at the moment. I hope this can be 
improved soon.

Joachim

On 11/18/2010 12:36 PM, Asmann, Roland wrote:
> Doesn't anybody have an idea?
>
>
> On 06.11.2010 19:09, Asmann, Roland wrote:
>> Hi all,
>>
>> I'm having some problems with properties in archetypes. I read that it
>> is possible to have files and directories renamed with properties
>> (http://jira.codehaus.org/browse/ARCHETYPE-191), but this seems to be
>> not working on modules.
>>
>> I have a certain project-structure that must be used, and I want the
>> modules to be renamed automatically:
>>
>> my-test-app
>> |-- my-test-ear
>> |-- my-test-model
>> |-- my-test-services
>> |-- my-test-web
>>
>> The problem here is that when I tell the archetype that I have a
>> property "projectName" and rename the directories and module-entries in
>> the archetype-metadata.xml to look like "__projectName__-ear" and
>> "${projectName}-ear", I don't get those modules!
>>
>> I've played around a bit and found that when I use a structure like this:
>>
>> my-test
>> |-- my-test-ear
>> |-- my-test-model
>>
>> The archetype-plugin will automatically create directories and entries
>> in the archetype-metadata.xml like "__rootArtifactId__-ear" and
>> "${rootArtifactId}-ear".
>>
>> Why is this not working for my custom-property?
>>
>> --
>> Roland Asmann
>> Senior Software Engineer
>>
>> adesso Austria GmbH
>> Floridotower 26. Stock T +43 1 2198790-27
>> Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
>> A-1210 Wien M +43 664 88657566
>> E roland.asmann@adesso.at
>> W www.adesso.at
>>
>> -------------------------------------------------------------
>>   >>>  business. people. technology.<<<
>> -------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>


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


Re: Properties in the archetype

Posted by "Asmann, Roland" <Ro...@adesso.at>.
Doesn't anybody have an idea?


On 06.11.2010 19:09, Asmann, Roland wrote:
> Hi all,
>
> I'm having some problems with properties in archetypes. I read that it
> is possible to have files and directories renamed with properties
> (http://jira.codehaus.org/browse/ARCHETYPE-191), but this seems to be
> not working on modules.
>
> I have a certain project-structure that must be used, and I want the
> modules to be renamed automatically:
>
> my-test-app
> |-- my-test-ear
> |-- my-test-model
> |-- my-test-services
> |-- my-test-web
>
> The problem here is that when I tell the archetype that I have a
> property "projectName" and rename the directories and module-entries in
> the archetype-metadata.xml to look like "__projectName__-ear" and
> "${projectName}-ear", I don't get those modules!
>
> I've played around a bit and found that when I use a structure like this:
>
> my-test
> |-- my-test-ear
> |-- my-test-model
>
> The archetype-plugin will automatically create directories and entries
> in the archetype-metadata.xml like "__rootArtifactId__-ear" and
> "${rootArtifactId}-ear".
>
> Why is this not working for my custom-property?
>
> --
> Roland Asmann
> Senior Software Engineer
>
> adesso Austria GmbH
> Floridotower 26. Stock T +43 1 2198790-27
> Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
> A-1210 Wien M +43 664 88657566
> E roland.asmann@adesso.at
> W www.adesso.at
>
> -------------------------------------------------------------
>  >>> business. people. technology. <<<
> -------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock              T +43 1 2198790-27
Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
A-1210 Wien                         M +43 664 88657566
                                    E roland.asmann@adesso.at
                                    W www.adesso.at

-------------------------------------------------------------
             >>> business. people. technology. <<<
-------------------------------------------------------------

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