Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bndmanifest and java-library intermodule dependencies #114

Open
nedtwigg opened this issue Jan 13, 2020 · 1 comment
Open

bndmanifest and java-library intermodule dependencies #114

nedtwigg opened this issue Jan 13, 2020 · 1 comment
Labels

Comments

@nedtwigg
Copy link
Member

In diffplug/durian-swt@496386e I used java-library in a multi-module project, and I declared an api dependency on another module within the project. I then saw intermittent errors like this:

> Task :durian-swt:jar FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':durian-swt:jar'.
> A Jar can only accept a file or directory that exists: /home/travis/build/diffplug/durian-swt/durian-swt.os/build/libs/durian-swt.os-3.3.0.jar

The workaround is diffplug/durian-swt@b3df331

@nedtwigg nedtwigg added the bug label Jan 13, 2020
@loetifuss
Copy link

I'm experiencing the same error after switching from biz.aQute.bnd.builder to the bndmanifest plugin.
The problem is that the java-library plugin has a dependency on the class-folder of dependent modules instead of the jar (as it used to be in Gradle before).
Thus, the jar-task of a module may be executed before any of the dependent JARs have been built.

Workaround: You can force Gradle to use the "old" behaviour of depending on JARs by adding the following switch
-Dorg.gradle.java.compile-classpath-packaging=true

It would be great though if the plugin can be adjusted to the new behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants