diff options
author | gjoranv <gv@verizonmedia.com> | 2020-07-07 22:20:31 +0200 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2020-07-07 22:22:36 +0200 |
commit | b970b3e21fc63e6ae7c762d308622801b31782fd (patch) | |
tree | 4f0796137ae99fd6585670949ee8077263e1eeff /bundle-plugin | |
parent | 662b3248241af984017dbba49e8b31299f2bd286 (diff) |
Fail if the 'discPreinstallBundle' config parameter is used
.. unless the new option 'buildVespaPlatformBundle' is set to true.
Diffstat (limited to 'bundle-plugin')
-rw-r--r-- | bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateOsgiManifestMojo.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateOsgiManifestMojo.java b/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateOsgiManifestMojo.java index d5aaa5888b2..be71c9c149f 100644 --- a/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateOsgiManifestMojo.java +++ b/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateOsgiManifestMojo.java @@ -55,8 +55,14 @@ public class GenerateOsgiManifestMojo extends AbstractGenerateOsgiManifestMojo { @Parameter(alias = "Main-Class") private String mainClass = null; + @Parameter(defaultValue = "false") + private boolean buildVespaPlatformBundle; + public void execute() throws MojoExecutionException { try { + if (discPreInstallBundle != null && ! buildVespaPlatformBundle) + throw new MojoExecutionException("The 'discPreInstallBundle' parameter can only be used by Vespa platform bundles."); + Artifacts.ArtifactSet artifactSet = Artifacts.getArtifacts(project); warnOnUnsupportedArtifacts(artifactSet.getNonJarArtifacts()); warnIfInternalContainerArtifactsAreIncluded(artifactSet.getJarArtifactsToInclude()); |