bnd icon indicating copy to clipboard operation
bnd copied to clipboard

New classpath dependency checking in BndtoolsBuilder does not take -dependson into account

Open pkriens opened this issue 2 years ago • 4 comments

I've got a project that builds the executable JAR from other projects and from the repository. I use -includeresource and the ${repo} macro to build the overall jar (it is not OSGi).

-includeresource: \
    @${repo;org.alloytools.api}, \
    @${repo;org.alloytools.util}, \
	@${repo;org.alloytools.alloy.application}, \
	@${repo;org.alloytools.alloy.core}, \
    @${repo;org.alloytools.alloy.classic.provider}, \
	@${repo;org.alloytools.alloy.extra}, \
    @${repo;org.alloytools.alloy.lsp}, \
    @${repo;org.alloytools.alloy.cli}, \
	@${repo;org.alloytools:pardinus.core}, \
	@${repo;org.alloytools:pardinus.nativesat}, \
	@${repo;org.sat4j.core}, \
	@${repo;org.sat4j.maxsat}, \
	@${repo;org.sat4j.pb}, \
    @${repo;jline}, \
    @${repo;slf4j.api}, \
    @${repo;slf4j.simple}, \
	@${repo;org.eclipse.lsp4j}, \
    @${repo;org.eclipse.lsp4j.jsonrpc}, \
    @${repo;com.google.gson}, \
    @${repo;org.eclipse.equinox.common}, \
    @${repo;org.apache.commons.io}, \
	LICENSES

-dependson: *

I understand that bnd cannot guess it depends on the entries in ${repo} macros so I added a -dependson for all projects. This does not work, the dist project does not get build when one of the dependent projects changes.

If I add the project to the -buildpath then a rebuild happens.

Are we not taking -dependson into account in the new depdency checking? It seems to work very nicely otherwise.

pkriens avatar Feb 24 '22 16:02 pkriens

Hmmm. The biz.aQute.bnd.embedded-repo project -dependson the biz.aQute.junit project. When I force the biz.aQute.junit project to rebuild, the incremental builder does NOT call the Bndtools builder for the biz.aQute.bnd.embedded-repo project. So Eclipse never calls the Bndtools builder on the project expressing the -dependson.

bjhargrave avatar Mar 04 '22 18:03 bjhargrave

I have my nose deep in this code... I can have a look

kriegfrj avatar Mar 05 '22 04:03 kriegfrj

@kriegfrj any progress on this?

pkriens avatar May 09 '22 13:05 pkriens

Sorry, no - I intend to circle back to it at some point but at the moment I'm on other priorities. Maybe next week I will be free to have a look.

kriegfrj avatar May 09 '22 13:05 kriegfrj

@kriegfrj is this still on your agenda?

pkriens avatar Jan 18 '23 11:01 pkriens