public class

MavenArtifactProvisionOption

extends AbstractProvisionOption<T extends AbstractProvisionOption<T>>
implements MavenUrlReference
java.lang.Object
   ↳ org.ops4j.pax.exam.options.AbstractProvisionControl<T extends org.ops4j.pax.exam.options.AbstractProvisionControl<T>>
     ↳ org.ops4j.pax.exam.options.AbstractProvisionOption<T extends org.ops4j.pax.exam.options.AbstractProvisionOption<T>>
       ↳ org.ops4j.pax.exam.options.MavenArtifactProvisionOption

Class Overview

Option specifying provisioning from an maven url (Pax URL mvn: handler).

Summary

Public Constructors
MavenArtifactProvisionOption()
Constructor.
MavenArtifactProvisionOption(MavenUrlReference artifact)
Constructor based on a mevn artifact option.
Public Methods
MavenArtifactProvisionOption artifactId(String artifactId)
Sets the artifact id.
MavenArtifactProvisionOption classifier(String classifier)
Sets the artifact classifier.
boolean equals(Object obj)
String getURL()
Getter.
MavenArtifactProvisionOption groupId(String groupId)
Sets the artifact group id.
int hashCode()
Boolean isSnapshot()
Returns true if the specified version is a snapshot version, false if not and null if the version is not yet specified.
boolean shouldUpdate()
String toString()
MavenArtifactProvisionOption type(String type)
Sets the artifact type.
MavenArtifactProvisionOption update(Boolean shouldUpdate)
Keep track if the user used the update method, so we do not override the value when handling automatic update on SNAPSHOT versions.
MavenArtifactProvisionOption version(MavenUrlReference.VersionResolver resolver)
Determines the artifact version using an MavenUrlReference.VersionResolver.
MavenArtifactProvisionOption version(String version)
Sets the artifact version or version range.
MavenArtifactProvisionOption versionAsInProject()
Version will be discovered from the dependencies of Maven project that includes the regression.
Protected Methods
MavenArtifactProvisionOption itself()
Implemented by sub classes in order to return itself (this) for fluent api usage
[Expand]
Inherited Methods
From class org.ops4j.pax.exam.options.AbstractProvisionControl
From class java.lang.Object
From interface org.ops4j.pax.exam.options.MavenUrlReference
From interface org.ops4j.pax.exam.options.ProvisionControl
From interface org.ops4j.pax.exam.options.UrlReference

Public Constructors

public MavenArtifactProvisionOption ()

Constructor.

public MavenArtifactProvisionOption (MavenUrlReference artifact)

Constructor based on a mevn artifact option.

Parameters
artifact maven artifact (cannot be null)

Public Methods

public MavenArtifactProvisionOption artifactId (String artifactId)

Sets the artifact id.

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

public MavenArtifactProvisionOption classifier (String classifier)

Sets the artifact classifier.

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

public boolean equals (Object obj)

public String getURL ()

Getter.

Returns
  • url (cannot be null)

public MavenArtifactProvisionOption 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 int hashCode ()

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 boolean shouldUpdate ()

public String toString ()

public MavenArtifactProvisionOption 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 MavenArtifactProvisionOption update (Boolean shouldUpdate)

Keep track if the user used the update method, so we do not override the value when handling automatic update on SNAPSHOT versions.

public MavenArtifactProvisionOption 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 MavenArtifactProvisionOption 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 MavenArtifactProvisionOption versionAsInProject ()

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

Returns
  • itself, for fluent api usage

Protected Methods

protected MavenArtifactProvisionOption itself ()

Implemented by sub classes in order to return itself (this) for fluent api usage

Returns
  • itself