From 20a0c689641cda2ab470c33a34f481520e2c7d24 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Mon, 29 Sep 2014 17:41:56 +0200 Subject: [PATCH] [BUILD] Release version should match latest version This commit ensures that the latest version in our code is identical to the project.version specified in the pom.xml file. --- pom.xml | 1 + src/test/java/org/elasticsearch/VersionTests.java | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/pom.xml b/pom.xml index f1f56123e17..b7d6dd1043e 100644 --- a/pom.xml +++ b/pom.xml @@ -515,6 +515,7 @@ ${tests.cluster} ${tests.heap.size} ${tests.filter} + ${project.version} ${env.ES_TEST_LOCAL} ${es.node.mode} ${es.logger.level} diff --git a/src/test/java/org/elasticsearch/VersionTests.java b/src/test/java/org/elasticsearch/VersionTests.java index b43ac8a6ee9..1c81bce9e73 100644 --- a/src/test/java/org/elasticsearch/VersionTests.java +++ b/src/test/java/org/elasticsearch/VersionTests.java @@ -36,6 +36,16 @@ import static org.hamcrest.Matchers.sameInstance; public class VersionTests extends ElasticsearchTestCase { + @Test + public void testMavenVersion() { + // maven sets this property to ensure that the latest version + // we use here is the version that is actually set to the project.version + // in maven + String property = System.getProperty("tests.version", null); + assumeNotNull(property); + assertEquals(property, Version.CURRENT.toString()); + } + @Test public void testVersions() throws Exception { assertThat(V_0_20_0.before(V_0_90_0), is(true));