4

I need a URI to locate a resource in a maven dependency. For example, if I declare a dependency :

<dependency>
  <groupId>top.marchand.xml</groupId>
  <artifactId>xslLibrary</artifactId>
</dependency>

I want to access ot /path/to/file.xsl that is inside xslLibrary. For sure, I can access via classpath resource loading, but I need a URI to point this resource.

Does a URI scheme (according to RFC 3986 ) has already been registered at IETF for such things ?

I would like to register something like :

dependency://groupId+artifactId$version/path/to/file.xsl

Thanks in advance, Christophe

Community
  • 1
  • 1

1 Answers1

0

I've implemented such a protocol, based on XML catalogs. Available as a maven plugin here : https://github.com/cmarchand/maven-catalogBuilder-plugin/wiki

Also implemented as a Protocol Handler in oXygen XML Developer : https://github.com/cmarchand/oxygen-maven-project-support