ilija
ilija

Reputation: 563

Maven Version Tag

I am wondering what does this mean:

<version>${artifactId.version}</version>

Does this mean that version is always the current one?

Upvotes: 6

Views: 8554

Answers (3)

falsarella
falsarella

Reputation: 12437

It means that the version is defined by <artifactId.version> property:

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <artifactId.version>3.0.0.1</artifactId.version>
</properties>

In this example, the version would be 3.0.0.1.

Pay attention, also, to use the <project.build.sourceEncoding> and set the versions accordingly to your project needs.

Upvotes: 6

DejanLekic
DejanLekic

Reputation: 19787

It means that you can specify version outside maven, which is a common case.

Example:

mvn <operation> [params...] -DartifactId.version=1.2.3

Upvotes: 1

LaGrandMere
LaGrandMere

Reputation: 10359

You may be missing a $ sign before {artifactId.version}.

And it would mean that you're using this artifactId.version variable to determine the version of your artifact.

Upvotes: 1

Related Questions