To work appropriately in the Java ecosystem, optional dependencies for libraries can be included with scope 'provided' within a pom.xml file.
deps.edn explicitly does not support including dependencies with a scope of 'provided', in favour of using aliases.
In order to work well as a library within a wider Java ecosystem, it would be very helpful to be able to write out a library jar file with a pom.xml file with additional dependencies that are not included in deps.edn, but with a scope of 'provided' for Java build tools.
An example is cljdoc, which cannot build documentation when a library is built and all dependencies are not included appropriately.
'write-pom' already has an option to include a template 'source' pom.xml, but the dependencies are overwritten with information from the deps.edn file.
There are workarounds - e.g. see thread https://clojurians.slack.com/archives/C8V0BQ0M6/p1680090647156119 which patch the process to include deps with a 'provided' scope - but they are not ideal.
do nothing - we monkey patch tools.build as per Slack thread example, or otherwise alter the generated pom.xml to include additional 'provided' scope deps.
merge existing dependencies from the source (template) pom.xml instead of overwriting [but perhaps a breaking change]
provide an additional parameter to 'write-pom' to include arbitrary deps, a sequence of maps that are converted to XML including :scope which would be :provided for these optional dependencies.
work with cljdoc to support aliases so that documentation builds can be customised by library authors so builds such as this do not fail.