bndtools / bnd

Bnd/Bndtools. Tooling to build OSGi bundles including Eclipse, Maven, and Gradle plugins.
https://bndtools.org
Other
526 stars 304 forks source link

Infinite automatic build loop in Eclipse when overriding resources in POM #3220

Closed wborn closed 4 years ago

wborn commented 5 years ago

After migrating openHAB from PDE to bnd (4.2.0) one of the remaining issues (https://github.com/openhab/openhab2-addons/issues/5554) is that Eclipse (2019-03) is in an infinite build loop when we enable "Project -> Build Automatically".

After investigating the issue it seems to be caused by the resource definitions in our Maven POMs:

After removing these customizations and updating the Maven projects in Eclipse the infinite loop is resolved. Do you think this loop is caused by an issue in bndtools?

I was able to reproduce the issue on the simpler bndtools/jpmcli project by adding a similar resources definition in https://github.com/wborn/jpmcli/commit/d1efa6168553af656189a034a50fe7621b7da8ce.

IOOOTAlan commented 5 years ago

Is this related to #3201?

wborn commented 5 years ago

It looks like a different issue to me because it's about invoking Maven from the CLI and the POM in the example maggu2810/bnd-resolvebug project doesn't contain such resource definitions.

wborn commented 5 years ago

As a test I also checked if the issue can be reproduced on a simple Maven project (not using bnd) with such a resource definition. There is no build loop when using "Build Automatically" after importing this hello-world-bnd-3220 project in Eclipse. So it's probably not an Eclipse or m2e issue.

rotty3000 commented 5 years ago

As a workaround, is the problem solved by using this approach instead? in bnd:

-includeresource: -${.}/NOTICE, -${.}/*.xsd

(the leading - means don't fail/complain if resource is missing)

wborn commented 5 years ago

Thanks for the suggestion @rotty3000. I was already thinking about using such a workaround and so far it seems to work after testing it. :+1:

rotty3000 commented 5 years ago

Great, as long as we can keep you moving forward! :)

stale[bot] commented 4 years ago

This issue has been automatically closed due to inactivity. If you can reproduce this on a recent version of Bnd/Bndtools or if you have a good use case for this feature, please feel free to reopen the issue with steps to reproduce, a quick explanation of your use case or a high-quality pull request.