Child pages
  • Link Protocol
Skip to end of metadata
Go to start of metadata

A URL tells you how to find a resource. A link: URL provides a level of indirection: It tells you how to find a resource which contains the URL of the real resource.

When connecting to a link: URL, a new URL is created by stripping the link: prefix. The input stream obtained from this stripped URL is parsed as plain text. The first non-empty and non-comment line is taken to be the URL for the real resource. Comment lines start with a hash '#' character, optionally preceded by whitespace.

Syntax

link-uri := 'link:' any-uri 

Examples

link:file:/home/hwellmann/work/pax-exam.link

The content of the link file can look like this

# This is a comment
# followed by some empty lines


mvn:org.ops4j.pax.exam/pax-exam/2.2.0

Links to classpath URLs can be useful for libraries to provide a default URL which a user may override by prepending the classpath with a library of their own containing a resource of the same name:

link:classpath:META-INF/links/pax-logging.link
  • No labels