org.ops4j.pax.exam.options
Interface MavenUrlReference

All Superinterfaces:
UrlReference
All Known Implementing Classes:
MavenArtifactProvisionOption, MavenArtifactUrlReference

public interface MavenUrlReference
extends UrlReference

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

Since:
0.5.0, April 26, 2009
Author:
Alin Dreghiciu (adreghiciu@gmail.com)

Nested Class Summary
static interface MavenUrlReference.VersionResolver
          Resolves versions based on maven artifact groupId / atifactid.
 
Method Summary
 MavenUrlReference artifactId(java.lang.String artifactId)
          Sets the artifact id.
 MavenUrlReference classifier(java.lang.String classifier)
          Sets the artifact classifier.
 MavenUrlReference groupId(java.lang.String groupId)
          Sets the artifact group id.
 java.lang.Boolean isSnapshot()
          Returns true if the specified version is a snapshot version, false if not and null if the version is not yet specified.
 MavenUrlReference type(java.lang.String type)
          Sets the artifact type.
 MavenUrlReference version(MavenUrlReference.VersionResolver resolver)
          Determines the artifact version using an MavenUrlReference.VersionResolver.
 MavenUrlReference version(java.lang.String version)
          Sets the artifact version or version range.
 MavenUrlReference versionAsInProject()
          Version will be discovered from the dependencies of Maven project that includes the test.
 
Methods inherited from interface org.ops4j.pax.exam.options.UrlReference
getURL
 

Method Detail

groupId

MavenUrlReference groupId(java.lang.String groupId)
Sets the artifact group id.

Parameters:
groupId - artifact group id (cannot be null or empty)
Returns:
itself, for fluent api usage
Throws:
java.lang.IllegalArgumentException - - If group id is null or empty

artifactId

MavenUrlReference artifactId(java.lang.String artifactId)
Sets the artifact id.

Parameters:
artifactId - artifact id (cannot be null or empty)
Returns:
itself, for fluent api usage
Throws:
java.lang.IllegalArgumentException - - If artifact id is null or empty

type

MavenUrlReference type(java.lang.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
Throws:
java.lang.IllegalArgumentException - - If type is null or empty

classifier

MavenUrlReference classifier(java.lang.String classifier)
Sets the artifact classifier.

Parameters:
classifier - artifact classifier (cannot be null or empty)
Returns:
itself, for fluent api usage
Throws:
java.lang.IllegalArgumentException - - If classifier is null or empty

version

MavenUrlReference version(java.lang.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
Throws:
java.lang.IllegalArgumentException - - If version is null or empty

version

MavenUrlReference 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
Throws:
java.lang.IllegalArgumentException - - If version is null

versionAsInProject

MavenUrlReference versionAsInProject()
Version will be discovered from the dependencies of Maven project that includes the test.

Returns:
itself, for fluent api usage

isSnapshot

java.lang.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.


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.