Hi,
Every now and then I see references to variables in the format
${some.expression}. However, I do not fully understand them: which
variables are there?
1. User variables
You can define your own variables and use them in the pom like this:
<property>
<name>variable1</name>
<value>somevalue</value>
</property>
now I can refer to it:
...${variable1}
Or I can pass -Dvariable1=somevalue and refer to it in the same manner.
2. POM element variables
Another use case are values defined in other pom elements:
${artifactId} refers to project/artifactId.
However, I do not understand how to refer to nested elements. Would I
have to use ${parent.artifactId} to get the artifact of the parent?
3. Plugin parameters
If I get the documentation pages for plugins right, the parameter column
is the name of the parameter to be used in <configuration/> elements,
whereas the expression column is the property to pass using -D. For
instance, eclipse:add-maven-repo does it that way: To pass the eclipse
workspace, you can use:
<configuration>
...
<workspace>VALUE</workspace>
</configuration>
-OR-
on the command line, specify: '-Declipse.workspace=VALUE'
4. Built-in variables?
Are there any built-in variables, such as the current project path, I
can refer to? Are they specified somewhere?
Regards,
Dietrich
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]