Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
titleBody

The macro body contains the reference information either as a short descriptor ID or as a Maven XML dependency snippet .

If the body is empty, the artifact coordinates have to be defined via space properties:

Section
titleDescriptor ID

Provide the artifact coordinates in the colon-separated short format.

The format is groupId:artifactId:type:version:classifier, where type and classifier are optional.

Here are two examples:

Code Block
commons-lang:commons-lang:2.6


Code Block
commons-lang:commons-lang:jar:2.6:sources



Section
titleDependency XML

Provide the artifact coordinates in the Maven Dependency XML format. Here are two examples:

Code Block
languagexml
<dependency>
  <groupId>commons-lang</groupId>
  <artifactId>commons-lang</artifactId>
  <version>2.6</version>
</dependency>


Code Block
languagexml
<dependency>
  <groupId>commons-lang</groupId>
  <artifactId>commons-lang</artifactId>
  <type>jar</type>
  <version>2.6</version>
  <classifier>sources</code>
</dependency>



...

Section
titleProperties


Section
level2
titleSystem Identifier

The system identifier references the connection information to the server. The information is either specified via Confluence's Shortcut Links or via Space Properties.

Transclusion
documentSystem Identifier to URI Resolution Algorithm
idsFragment



Section
level2
titleNexus Repository ID

Identifies the repository within the Nexus server to reference the artifact.

Please note that this value is not used, if the space property nexus-service Nexus Service is specified. The value may be left blank. In this case the value of the space property nexus-default-repo-id Nexus Default Repo ID is used. If the value is not set, the default central is assumed.

There are special identifiers that control the way the URL to the artifact is constructed.

Repo IDSinceDescriptionExampleNotes
*< 1.0Path to the artifact https://repo1.maven.org/maven2/commons-lang/commons-lang/2.6/commons-lang-2.6.jar Prior to the extension this feature has been provided with version 1.8 of the projectdoc Toolbox.
$1.0Query to Search Central http://search.maven.org/remotecontent?filepath=commons-lang/commons-lang/2.6/commons-lang-2.6.jar-
<char>< 1.0Query to a Nexus server https://www.example.com/nexus/service/local/artifact/maven/redirect?r=central&g=commons-lang&a=commons-lang&v=2.6&e=jar The default URL construction mode.



Section
titleRender Link

Check to render a simple link to the artifact on the Nexus server. If unchecked the link is not rendered.


Section
titleLabel

The label to be rendered for the link. If Render Link is unchecked, the label is not used.

If the label starts with a question mark ('?'), the label is considered to be a pattern. The five coordinates are recognized and translated to their artifact property values.The values are separated by colons (':').

PartDescription
gThe group identifier (groupId) of the artifact.
aThe identifier (artifactId) of the artifact.
tThe type of the artifact (e.g. 'jar').
vThe version of the artifact.
cThe classifier of the artifact.

All other characters are ignored.

Example Box


PatternDescription
?vRenders the version of the artifact
?gavRenders the group identifier, artifact identifier and version, separated by colons.




Section
titleRender XML Snippet

Check to render the reference as a Maven XML dependency. If unchecked this information is not rendered.


Section
titlePlain XML

If unchecked, the XML is rendered within the Code Block Macro (only then do the code attributes apply). Otherwise it is rendered as plain XML fragment.

If Render XML Snippet is unchecked, this value is not used.


Section
titleIs Library

If selected the reference links to a library, otherwise a plugin is assumed. This selection makes a difference if an XML fragment is rendered.

If the option is checked, the XML block for the artifact coordinates will be rendered as

Code Block
languagexml
<dependency>
  <groupId>de.smartics.maven.plugin</groupId>
  <artifactId>smartics-jboss-modules-maven-plugin</artifactId>
  <version>2.0.0</version>
</dependency>

If unchecked, the result is rendered as follows:

Code Block
languagexml
<plugin>
  <groupId>de.smartics.maven.plugin</groupId>
  <artifactId>smartics-jboss-modules-maven-plugin</artifactId>
  <version>2.0.0</version>
</plugin>



Section
titleCode Title

If XML is rendered not in plain text, this value is passed to the Code Block Macro.

Also allows the pattern syntax for the label (e.g. "?gav") to be passed as title to the code macro. See Label for details.

Additionally the title may be enclosed in square brackets. In this case the title is rendered as a link. This may be combined with the GAV pattern (e.g. "[?gav]").


Section
titleCode Theme

If XML is rendered not in plain text, this value is passed to the Code Block Macro.


Section
titleCode Line Numbers

If XML is rendered not in plain text, this value is passed to the Code Block Macro.


Section
titleCode First Line

If XML is rendered not in plain text, this value is passed to the Code Block Macro.


Section
titleCode Collapse

If XML is rendered not in plain text, this value is passed to the Code Block Macro.


...

Section
titleDetails


Section
titleSpace Properties

The macro uses the following Space Properties:

Property NameDescriptionDefault Value
nexus-serviceNexus ServiceThe path on the Nexus server to the service that provides access to the artifacts/service/local/artifact/maven/redirect?r=central
url-(systemId)The URL to the Nexus server. For details please refer to System Identifier.none
shortcut-id-(systemId)The property allows to map the System Identifier to another value for lookup in Confluence's shortcuts.nexusnexus-default-repo-id
Nexus Default Repo ID

The default repository identifier to be used for the artifact service (value for parameter 'r').

Note Box

From version 1.8.0 a value of '*' switches to construct a path to the artifact relative to the repository (instead of the Nexus root). That is, if your path look like http://www.mycorp.com/nexus you will want to specify the repository. But if your path is http://www.mycorp.com/nexus/content/repository/central, specify an asterisk to construct a path. In this case nexus-service defaults to blank. Note that a path requires the version to be set. Queries may omit it.


central



Section
titleAutoconvert

To create the macro authors may simply paste the URI to the artifact on a Nexus server to the editor.

All is needed is a configuration of the Nexus base URI. For more information on this topic, please refer to Autoconvert Information System URIs.


...