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