Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven properties in site apt files

How can I use maven properties in site APT files? For example I want to use ${project.version} in the index.apt so I can always refer to the latest version without manually changing the index.apt file before deploying the site.

like image 236
kayahr Avatar asked Jan 29 '11 11:01

kayahr


People also ask

What are the property references in Maven pom?

Maven supports a great set of property references. In pom.xml it can get the os configured properties, Java properties. You can also define your own properties on the parent pom and can refer those properties from the child. Let's discuss each of them here These are the properties defined in the os level environment variables.

Where can I find the built-in properties of my Maven plugin?

maven Built-in Plugin Properties Each plugin has a set of built in properties. For a reference of these properties, you can find a "Properties" link in the left hand navigation of the plugin documentationof each individual plugin. Last published: 03 February 2008 08:50 CET

How to access the environmental properties of a variable in Maven?

For accessing the Environmental properties, add the prefix env before the variable like follows. By default, the maven provides the feature to get the project related properties Such as groupId, artifactId, version the project. For accessing these properties, you need to add the prefix project before the variable. Say example.

What is the core file of Maven?

The settings.xml is the core file of maven. It generally appears on the conf folder of maven_home. All core maven configurations placed inside of the settings.xml file. Also on settings.xml file, it is able to define properties under the profiles, those properties can access from any project running under that maven


1 Answers

Found it. Just had to rename the apt files to *.apt.vm. Maven then pipes the files through Velocity which can process the properties.

like image 159
kayahr Avatar answered Sep 23 '22 06:09

kayahr