summaryrefslogtreecommitdiffstats
path: root/vespa-maven-plugin
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2022-09-01 15:13:23 +0200
committerjonmv <venstad@gmail.com>2022-09-01 15:13:23 +0200
commit77ae94252467cd03c42d60bc48c631e94031a9c5 (patch)
tree16008a1db89300295361dd06b27b5fe1b210841a /vespa-maven-plugin
parentbd9d2aa6675d5834a91d91df4e754cd9b75dd34b (diff)
Fail earlier instead
Diffstat (limited to 'vespa-maven-plugin')
-rw-r--r--vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/CompileVersionMojo.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/CompileVersionMojo.java b/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/CompileVersionMojo.java
index 5c334935a26..8e51555457b 100644
--- a/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/CompileVersionMojo.java
+++ b/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/CompileVersionMojo.java
@@ -36,7 +36,8 @@ public class CompileVersionMojo extends AbstractVespaMojo {
Version compileVersion = Version.fromString(controller.compileVersion(id, allowMajor));
if (compileVersion.isAfter(Vtag.currentVersion))
- compileVersion = Vtag.currentVersion;
+ throw new IllegalStateException("parent version (" + Vtag.currentVersion.toFullString() + ") should be at least as " +
+ "high as the Vespa version to compile against (" + compileVersion.toFullString() + ")");
getLog().info("Vespa version to compile against is '" + compileVersion.toFullString() + "'.");
getLog().info("Writing compile version to '" + output + "'.");