Fix Java component publishingWhen we introduced the `java-library` plugin, we made surethe published POM reflects what a downstream project in thesame build would see: `api` dependencies are exposed, `implementation`dependencies are hidden. The legacy `compile`/`runtime` dependenciesare exposed as well for backwards compatibility.We forgot to adjust the tests for the existing `java` plugin,leading to a confusing difference in behavior. The `java` pluginwas still hiding the legacy `compile` and `runtime` dependencies fromconsumers. This was due to a bug in the implementation of `JavaLibrary`,which was looking for the `api` configuration instead of the `apiElements`configuration.
Project dependencies map to a single publication of the depended-on project - For single publication, use it - For multiple publications, fail unless all publications have the same coordinates - For no publications, use the project coordinates - Added ProjectDependencyPublicationResolver to do the work of determining the coordinates to use for a project dependency