Armand
Armand

Reputation: 24343

Is there a Maven flag indicating whether a build is a SNAPSHOT?

Is there a specific maven property indicating whether the current project.version is a SNAPSHOT or not?

Obviously this could be done by parsing the project.version string, but I'm interested in a specific property.

Upvotes: 2

Views: 113

Answers (1)

noahlz
noahlz

Reputation: 10311

${project.version.snapshot} is not currently a supported property for Maven 3.

See Maven Properties Guide

Currently, there is an open feature request to add regex matching for profile activation. You may want to go comment and upvote the issue: http://jira.codehaus.org/browse/MNG-3826

The use case is exactly what you are mentioning:

Activate a profile when project.version is not SNAPSHOT

is it possible?

Upvotes: 2

Related Questions