Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Document Properties Marker
overridefalse
Doctypemacrohide
NameNexus Link Macro 
Short DescriptionRenders a link to an artifact stored on a Nexus server. 
Parent
Parent Property
property-nameName
 
Audience
Name List
doctyperole
render-no-hits-as-blanktrue
propertyAudience
 

Categories
Name List
doctypecategory
namesLink / Information System
 
Tags
Tag List
namesLink Resource, Remote Reference
 

Iteration
Iteration
valueproduction
hide
ExtensionInformation Systems Extension 
Since1.0 
Sort Keyhide
Section
indextrue
show-titlefalse
titleDescription

The macro allows to render a link and/or a code fragment with the artifact as a Maven XML dependency snippet .

The artifact reference is provided by the user in the macro's body. The macro will create a link to the artifact on a Nexus server.

Content Marker
idexample
Example Box

The macro body contains the reference to the artifact.

This is the rendered short link:

The rendered XML code looks like this:

In this example the title is a link to the artifact on the Nexus server.

Transclusion
documentPDAC1:Information System Extension Notice
idsSummary

...

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
documentPDAC1:System 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 is specified. The value may be left blank. In this case the value of the space property 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 artifacthttps://repo1.maven.org/maven2/commons-lang/commons-lang/2.6/commons-lang-2.6.jarPrior to the extension this feature has been provided with version 1.8 of the projectdoc Toolbox.
$1.0Query to Search Centralhttp://search.maven.org/remotecontent?filepath=commons-lang/commons-lang/2.6/commons-lang-2.6.jar-
<char>< 1.0Query to a Nexus serverhttps://www.example.com/nexus/service/local/artifact/maven/redirect?r=central&g=commons-lang&a=commons-lang&v=2.6&e=jarThe 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-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 Nexus Link Macro#System System Identifier.none
shortcut-id-(systemId)The property allows to map the Nexus Link Macro#System System Identifier to another value for lookup in Confluence's shortcuts.nexus
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. 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.

...

Section
titleReferences

Section
titleResources

Piwik Set Multiple Custom Variables
NameValue
Departmentprojectdoc
Categoryprojectdoc-macro
Typeremote