Nov 10, 2018

How To Create Properties / Variables In Maven

In file pom.xml:

<properties>
        <appengine.app.version>1</appengine.app.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <owb.version>1.2.7</owb.version>
</properties>

You can refer to those properties as: ${appengine.app.version}, ${owb.version} etc.

<dependency>
            <groupId>org.apache.openwebbeans</groupId>
            <artifactId>openwebbeans-spi</artifactId>
            <version>${owb.version}</version>
            <scope>compile</scope>
</dependency>