public class

MavenArtifactUrlReference

extends Object
implements MavenUrlReference
java.lang.Object
   ↳ org.ops4j.pax.exam.options.MavenArtifactUrlReference

Class Overview

Option specifying a maven url (Pax URL mvn: handler).

Summary

Public Constructors
MavenArtifactUrlReference()
Public Methods
MavenArtifactUrlReference artifactId(String artifactId)
Sets the artifact id.
MavenUrlReference classifier(String classifier)
Sets the artifact classifier.
String getURL()
Getter.
MavenArtifactUrlReference groupId(String groupId)
Sets the artifact group id.
Boolean isSnapshot()
Returns true if the specified version is a snapshot version, false if not and null if the version is not yet specified.
String toString()
MavenArtifactUrlReference type(String type)
Sets the artifact type.
MavenArtifactUrlReference version(String version)
Sets the artifact version or version range.
MavenArtifactUrlReference version(MavenUrlReference.VersionResolver resolver)
Determines the artifact version using an MavenUrlReference.VersionResolver.
MavenArtifactUrlReference versionAsInProject()
Version will be discovered from the dependencies of Maven project that includes the regression.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.ops4j.pax.exam.options.MavenUrlReference
From interface org.ops4j.pax.exam.options.UrlReference

Public Constructors

public MavenArtifactUrlReference ()

Public Methods

public MavenArtifactUrlReference artifactId (String artifactId)

Sets the artifact id.

Parameters
artifactId artifact id (cannot be null or empty)
Returns
  • itself, for fluent api usage

public MavenUrlReference classifier (String classifier)

Sets the artifact classifier.

Parameters
classifier artifact classifier (cannot be null or empty)
Returns
  • itself, for fluent api usage

public String getURL ()

Getter.

Returns
  • url (cannot be null)
Throws
IllegalArgumentException - If group id is null or empty - If artifact id is null or empty

public MavenArtifactUrlReference groupId (String groupId)

Sets the artifact group id.

Parameters
groupId artifact group id (cannot be null or empty)
Returns
  • itself, for fluent api usage

public Boolean isSnapshot ()

Returns true if the specified version is a snapshot version, false if not and null if the version is not yet specified.

Returns
  • true if the specified version is a snapshot version, false if not and null if the version is not yet specified.

public String toString ()

public MavenArtifactUrlReference type (String type)

Sets the artifact type. Do not set the value (use this method) if default artifact type should be used.

Parameters
type artifact type (cannot be null or empty)
Returns
  • itself, for fluent api usage

public MavenArtifactUrlReference version (String version)

Sets the artifact version or version range. If version is a SNAPSHOT version the bundle will be set to updatable, otherwise the bundle will not be updated. This handling happens only if the user dows not use the update() by itself (see org.ops4j.pax.exam.options.ProvisionOption#update(boolean)).

Parameters
version artifact version / version range (cannot be null or empty)
Returns
  • itself, for fluent api usage

public MavenArtifactUrlReference version (MavenUrlReference.VersionResolver resolver)

Determines the artifact version using an MavenUrlReference.VersionResolver.

Parameters
resolver a MavenUrlReference.VersionResolver (cannot be null)
Returns
  • itself, for fluent api usage

public MavenArtifactUrlReference versionAsInProject ()

Version will be discovered from the dependencies of Maven project that includes the regression.

Returns
  • itself, for fluent api usage