Abylay Sabirgaliyev
Abylay Sabirgaliyev

Reputation: 726

Using maven properties in command line

Can we use maven properties such as ${maven.project.version} and ${maven.build.timestamp} in command line? For example: mvn clean package -Dbuild.number=${maven.project.version}-${maven.build.timestamp}. I know it is possible to set it as property in pom file.

Upvotes: 2

Views: 971

Answers (1)

Duran Wesley Harris
Duran Wesley Harris

Reputation: 622

No, you can't..

But you can override the properties in your pom.xml with command line parameters by the same name

Upvotes: 4

Related Questions