I know that I can get some settings.xml parameters using properties, for example, ${settings.localRepository} , to get the location of the local repository.
Now imagine that my settings.xml parameter contains the following server definition:
<servers> <server> <id>server-dev</id> <username>devuser</username> <password>devpass</password> </server> <server> <id>server-hom</id> <username>homuser</username> <password>hompass</password> </server> </servers>
Is there any way using the server id to get the value of any parameter? For example, something like ${settings.servers.server.server-dev.username} will return devuser .
I have already tried the following:
${settings.servers.server.server-dev.username} ${settings.servers.server-dev.username} ${settings.servers.server[server-dev].username} ${settings.servers[server-dev].username}
but none of them worked ...
As for this page , this is not possible. However, since this is incorrect documentation, I still have the hope of doing it this way ...
properties maven-2
romaintaz
source share