For a while I've been struggling with an issue where I see the search
facility in the "Add" dialog offering some artifacts that are "jar"
artifacts, and some that are "bundle" artifacts. I know the basic
difference between them. The funny thing is, I believe that these
artifacts are all structured similarly, so I'm not sure why it thinks
some are "bundle" artifacts and some are "jar".
I think I found a clue that might explain that last point. I looked at
the two pom artifacts (one m2e says is a "bundle", the other a "jar"),
and the only significant difference is that the "bundle" artifact has a
"packaging" property set to "bundle". the other doesn't have a
packaging property. Ironically, the "jar" artifact's pom uses the
"maven-bundle-plugin" (with extensions = true), but I guess that isn't
enough for m2e to recognize it as a bundle.
The bigger problem is that m2e is offering these "bundle" artifacts into
a pom that doesn't necessarily know what a bundle is. After I store the
dependency reference to the bundle artifact, the project fails to
build. If I manually edit the properties of the dependency, changing it
to a "jar", it works fine.
I know understand that I have to add the "maven-bundle-plugin" reference
to the pom for this to work, but the underlying question is, why does
m2e offer bundle artifacts into a pom that doesn't know what bundle
artifacts are?
I imagine the obvious answer is "because it doesn't know not to", or
some variation of that.
Before I file a bug report, would it be a reasonable enhancement to
expect the m2e search facility in the "Add" dialog to introspect the pom
and determine whether bundles can be used in the pom in question, and if
not, offer bundle artifacts as jar artifacts instead?
_______________________________________________
m2e-users mailing list
m2e-users@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users