apache / apache/maven

[MNG-6734] Ability to add Java sources to plugins classpath from .mvn directory

Open
#8,523 2 comments 0 reactions 0 assignees View on GitHub
enhancement priority:minor
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 40m
Merged PRs (30d)
275

Description

**[Abel Salgado Romero](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=abel%20s.romero)** opened **[MNG-6734](https://issues.apache.org/jira/browse/MNG-6734?redirect=false)** and commented

In plugins like [asciidoctor-maven-plugin](https://github.com/asciidoctor/asciidoctor-maven-plugin) it is possible to add Java Asciidoctor extensions and other customizations to the conversion process.
These need to be available to the asciidoctor-maven-plugin classpath and due to how maven manages plugin's dependencies, this means that users need to publish these extension in a maven repo or create multi-module projects like in this example https://github.com/asciidoctor/asciidoctor-maven-examples/tree/master/java-extension-example.
This is cumbersome and a bit of overkill when some users just want to add a single class.

So, I wonder if would make sense to be able to add Java sources in the ".mvn" directory that are compiled and added to the classpath so that maven plugins can use them.
Ideally, to avoid classpath issues, I'd like to be able to tell which plugins use the code, maybe with an XML descriptor or some directory convention.

---
No further details from [MNG-6734](https://issues.apache.org/jira/browse/MNG-6734?redirect=false)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.