diff options
author | Harald Musum <musum@verizonmedia.com> | 2021-04-06 14:19:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-06 14:19:35 +0200 |
commit | 778894b29b13831115c19ff13285541a10ab2d30 (patch) | |
tree | 62ea7aa8689a3d5421f54cd0ac6c5290e82f23dc /bundle-plugin | |
parent | 5df00bb90a04082847440716bcb6146bdda0ca06 (diff) |
Revert "Gjoranv/merge di into core (rebased)"
Diffstat (limited to 'bundle-plugin')
-rw-r--r-- | bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateOsgiManifestMojo.java | 11 |
1 files changed, 3 insertions, 8 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 e1d199c4c9b..31c8049b0dd 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 @@ -61,13 +61,12 @@ public class GenerateOsgiManifestMojo extends AbstractGenerateOsgiManifestMojo { public void execute() throws MojoExecutionException { try { - if (discPreInstallBundle != null && ! buildLegacyVespaPlatformBundle) + if (discPreInstallBundle != null && !buildLegacyVespaPlatformBundle) throw new MojoExecutionException("The 'discPreInstallBundle' parameter can only be used by legacy Vespa platform bundles."); Artifacts.ArtifactSet artifactSet = Artifacts.getArtifacts(project); warnOnUnsupportedArtifacts(artifactSet.getNonJarArtifacts()); - if (! isContainerDiscArtifact(project.getArtifact())) - throwIfInternalContainerArtifactsAreIncluded(artifactSet.getJarArtifactsToInclude()); + warnIfInternalContainerArtifactsAreIncluded(artifactSet.getJarArtifactsToInclude()); List<Export> exportedPackagesFromProvidedJars = exportedPackagesAggregated( artifactSet.getJarArtifactsProvided().stream().map(Artifact::getFile).collect(Collectors.toList())); @@ -189,7 +188,7 @@ public class GenerateOsgiManifestMojo extends AbstractGenerateOsgiManifestMojo { artifact.getId(), artifact.getType()))); } - private void throwIfInternalContainerArtifactsAreIncluded(Collection<Artifact> includedArtifacts) throws MojoExecutionException { + private void warnIfInternalContainerArtifactsAreIncluded(Collection<Artifact> includedArtifacts) throws MojoExecutionException { /* In most cases it's sufficient to test for 'component', as it's the lowest level container artifact, * Embedding container artifacts will cause class loading issues at runtime, because the classes will * not be equal to those seen by the framework (e.g. AbstractComponent). */ @@ -205,10 +204,6 @@ public class GenerateOsgiManifestMojo extends AbstractGenerateOsgiManifestMojo { return a.getArtifactId().equals("component") && a.getGroupId().equals("com.yahoo.vespa"); } - private boolean isContainerDiscArtifact(Artifact a) { - return a.getArtifactId().equals("container-disc") && a.getGroupId().equals("com.yahoo.vespa"); - } - private PackageTally getProjectClassesTally() { File outputDirectory = new File(project.getBuild().getOutputDirectory()); |