i will use the versions defined in bom file but they can not be resolved
Execution failed for task ':WebsphereEAR:ear'.
> Could not resolve all files for configuration ':WebsphereEAR:earlib'.
> Could not find org.springframework.boot:spring-boot-test:.
Required by:
project :WebsphereEAR
project :WebsphereEAR > project :lib1
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
}
if i also apply the java plugin to the EAR project it works as excepted, but why ? versions should be resolved via a bom file.
I’ve actually updated the example, the bom configuration has nothing to do with that problem so I’ve removed that.
There seems to be a general issue with the ear plugin that resolving transitive dependencies without explicit versioning of another project in the same build does only work until you also add the java plugin to the ear project. (ATTENTION this will cause other serious problems - see below!)
If any of the core devs could clarify what’s goin on that would be super interesting.
Update: The setup got broken from gradle 6.4.1 (still working) to 6.5.0-rc-1 (broken) (not sure how to test the previous milestones
We’ve had some long debugging sessions especially because eclipseWtp for ear projects got broken.
When applying the JavaPlugin not a single earlib dependency was added to the deployment assembly resulting in ClassNotFoundExceptions all over the place.
We finally found out that applying the JavaPlatformPlugin solved the BOM issue and fixed EclipseWtp. In the end we nailed it down to these two lines of code that seem to be absolutely necessary to get the ear plugin working again:
I don’t understand what’s going on here and why this is necessary, but maybe a core dev can clarify that and help to integrate it into gradle-core as currently the ear plugin is in a very bad shape. Also I don’t feel compfortable requiring a Internal interface in our code.