summaryrefslogtreecommitdiffstats
path: root/vespa-maven-plugin
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2022-08-08 10:58:06 +0200
committerjonmv <venstad@gmail.com>2022-08-08 10:58:06 +0200
commit36e02a3065d98a6281d6ca579436f47e9477b970 (patch)
tree06703a381ac3e6bef7ae79fe83db437a8a78d310 /vespa-maven-plugin
parentf2aa09101b6edf726f01141c12e77ddb1d1a8f9e (diff)
Use project basedir when looking for deployment.xml in compile versjon mojo
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 707da31b5ef..4e5c80e1099 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
@@ -6,6 +6,7 @@ import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.w3c.dom.Element;
+import java.io.File;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.nio.file.Files;
@@ -28,7 +29,7 @@ public class CompileVersionMojo extends AbstractVespaMojo {
@Override
protected void doExecute() throws IOException {
Path output = Paths.get(outputFile).toAbsolutePath();
- OptionalInt allowMajor = majorVersion(Paths.get("src/main/application/deployment.xml"));
+ OptionalInt allowMajor = majorVersion(new File(project.getBasedir(), "src/main/application/deployment.xml").toPath());
String compileVersion = controller.compileVersion(id, allowMajor);
if (allowMajor.isPresent()) {
getLog().info("Allowing major version " + allowMajor.getAsInt() + ".");