Skip to content

Commit

Permalink
Add a flag to skip the service-component file check in packaging-plugin
Browse files Browse the repository at this point in the history
This allows to disable the selectively based on property values.

(cherry picked from commit 2963a7a)
  • Loading branch information
HannesWell authored and eclipse-tycho-bot committed Sep 16, 2024
1 parent dbdc59b commit b74f8de
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ public class PackagePluginMojo extends AbstractTychoPackagingMojo {
@Parameter(defaultValue = "true")
private boolean deriveHeaderFromSource;

/**
* If {@code true}, it is checked that the explicitly declared OSGi service
* component files exist.
*/
@Parameter(defaultValue = "true")
private boolean checkServiceComponentFilesExist = true;

@Component
private SourceReferenceComputer soureReferenceComputer;

Expand Down Expand Up @@ -262,7 +269,7 @@ private File createPluginJar() throws MojoExecutionException {
checkBinIncludesExist(buildProperties, binIncludesIgnoredForValidation.toArray(new String[0]));
// 4. check DS files exits...
TychoProject facet = getTychoProjectFacet();
if (facet instanceof OsgiBundleProject bundleProject) {
if (checkServiceComponentFilesExist && facet instanceof OsgiBundleProject bundleProject) {
String components = bundleProject.getManifestValue("Service-Component", project);
if (components != null) {
if (components.contains("*")) {
Expand Down

0 comments on commit b74f8de

Please sign in to comment.