Regarding #1 you need to be more precise.
The jigsaw-team also thought it would be easy to extend the pom for
this.
However, in the end I discovered there's no need to do this.
The plexus-java library has code which you feed the module descriptor
and all jars and it is able to decide if they belong to the modulepath
or classpath.
Only for testing you might want want to decide where services or static
required modules belongs. That's a per-test decision, so can't be done
at pom-level.
plexus-java[1] has proven itself since Java 9, only edge cases are
tricky, but most of the time it is in the details of the specification
of the java module system.
Robert
[1]
https://codehaus-plexus.github.io/plexus-languages/plexus-java/usage.html
------ Oorspronkelijke bericht ------
Van "Ralph Goers" <ralph.go...@dslextreme.com>
Aan "Maven Developers List" <dev@maven.apache.org>
Datum 10-11-2022 06:08:27
Onderwerp Re: Adding extra "scope" type metadata to dependencies?
Extending the pom.xml has been discussed for years. Unfortunately, it validates
the XSD, so when the pom is extended with new attributes older versions of
Maven will fail. This is the main reason why import scope was introduced rather
than using a new element.
There were many discussions about adding provides/requires concepts to the pom
as well as other constructs but they always failed due to this.
Ralph
On Nov 8, 2022, at 1:36 PM, Mark Raynsford
<org.apache.maven.u...@io7m.com.INVALID> wrote:
Hello!
I'd like to be able to add extra metadata to dependencies in a POM file.
Specifically:
1. I'd like to be able to specify whether a dependency goes on the
class or module path rather than have Maven decide for me.
2. I'd like to be able to specify that a dependency _doesn't_ go on
either path (possibly because it's going to be added manually
elsewhere during deployment as an OSGi bundle, or as part of a
dynamically created module layer, or something similar).
Ideally, the second point would be handled properly by IDEs such that
clicking "Run" wouldn't result in artifacts being added to the
classpath/modulepath of the program the IDE runs.
I remember reading (possibly over a year ago now) that there might be
some possibility of an extension that allows for adding extra
information to a <dependency> element, but I'm now unable to find any
evidence this existed.
Is there some way to do this today? If not... Will there be some way in
Maven 4.0.0+?
-- Mark Raynsford | https://www.io7m.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org