aboutsummaryrefslogtreecommitdiffstats
path: root/bundle-plugin
diff options
context:
space:
mode:
authorgjoranv <gv@oath.com>2017-10-11 18:52:41 +0200
committergjoranv <gv@oath.com>2017-10-11 18:52:41 +0200
commitaaf894de748c62d8892831e5998c7413e4faf69a (patch)
tree453edf9136625026db8b4fddbd39cc7ae83daabc /bundle-plugin
parentfedca91b6c564a78456b390551b07c346f81e664 (diff)
Look for 'container' artifact too when deciding configgen version.
Diffstat (limited to 'bundle-plugin')
-rw-r--r--bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateSourcesMojo.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateSourcesMojo.java b/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateSourcesMojo.java
index 06486c00810..11f5696c589 100644
--- a/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateSourcesMojo.java
+++ b/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateSourcesMojo.java
@@ -76,11 +76,15 @@ public class GenerateSourcesMojo extends AbstractMojo {
return configGenVersion;
}
- Dependency containerDev = getVespaDependency("container-dev"); // TODO: change to "container"
+ Dependency container = getVespaDependency("container");
+ if (container != null)
+ return container.getVersion();
+
+ Dependency containerDev = getVespaDependency("container-dev");
if (containerDev != null)
return containerDev.getVersion();
- Dependency docproc = getVespaDependency("docproc");
+ Dependency docproc = getVespaDependency("docproc");
if (docproc != null)
return docproc.getVersion();
@@ -89,9 +93,10 @@ public class GenerateSourcesMojo extends AbstractMojo {
return parent.getVersion();
String defaultConfigGenVersion = loadDefaultConfigGenVersion();
- getLog().warn(
- String.format("Did not find container-dev, guessing that version '%s' of config_gen should be used.",
- defaultConfigGenVersion));
+ getLog().warn(String.format(
+ "Did not find either container or container-dev artifact in project dependencies, "
+ + "using default version '%s' of the config class plugin.",
+ defaultConfigGenVersion));
return defaultConfigGenVersion;
}