Problems with mergeJar configurations in Eclipse
Closed this issue · 2 comments
I'm attempting to migrate a project to JPMS and am using the merge-jars
branch to work around a problem with some dependencies sharing the same package. Specifically, I'm working around some Protostuff dependencies sharing the same package; this configuration seems to fix it:
extraJavaModuleInfo {
automaticModule("protostuff-core-1.7.2.jar", "io.protostuff") {
mergeJar("protostuff-api-1.7.2.jar")
mergeJar("protostuff-collectionschema-1.7.2.jar")
}
automaticModule("protostuff-runtime-registry-1.7.2.jar", "io.protostuff.runtime") {
mergeJar("protostuff-runtime-1.7.2.jar")
}
...
}
Building on the commandline succeeds. However, Eclipse seems to have trouble resolving all io.protostuff
package imports. The mergeJar
configuration is probably not being picked up in Eclipse. I have several other automaticModule
configurations, such as automaticModule("jsr305-3.0.2.jar", "jsr305")
, and they seem to work in Eclipse.
Are there any solutions for this problem?
Hi @ChrisTrenkamp thanks for bringing the "merge-jar" brach up to date. I merged your PR.
Apart from this issue, does this work well for you? As I wrote quite a while back here, I still saw some issues with Jars not merged correctly.
Did you not encounter that, or do you have any additional fixes for that branch? Maybe I can look into integrating this for real again.
Regarding the problem you are seeing: Would you mind creating a complete reproducer project (on GitHub or as Zip attached to this issue)? Then I can have a look.
@ChrisTrenkamp I implemented an alternative solution to solve the "mergeJar" case (#1). Although the syntax to use it mostly remained the same - see #1 (comment)
Please give version 0.12
a try.