org.sonatype.aether.test.util
Class IniArtifactDataReader

java.lang.Object
  extended by org.sonatype.aether.test.util.IniArtifactDataReader

public class IniArtifactDataReader
extends Object

A parser for an artifact description in an INI-like format.

Possible sections are:

The relocation- and dependency-sections contain artifact coordinates of the form:
 gid:aid:ver:ext[:scope][:optional]
 
The dependency-sections may specify exclusions:
 -gid:aid
 
A repository definition is of the form:
 id:type:url
 

Example

 [relocation]
 gid:aid:ver:ext
 
 [dependencies]
 gid:aid:ver:ext:scope
 -exclusion:aid
 gid:aid2:ver:ext:scope:optional
 
 [managed-dependencies]
 gid:aid2:ver2:ext:scope
 -gid:aid
 -gid:aid
 
 [repositories]
 id:type:file:///test-repo
 

Author:
Benjamin Hanzelmann
See Also:
IniArtifactDescriptorReader

Constructor Summary
IniArtifactDataReader()
          Constructs a data reader with the prefix "".
IniArtifactDataReader(String prefix)
          Constructs a data reader with the given prefix.
 
Method Summary
 ArtifactDescription parse(String resource)
          Load an artifact description from the classpath and parse it.
 ArtifactDescription parse(URL res)
          Open the given URL and parse ist.
 ArtifactDescription parseLiteral(String description)
          Parse the given String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IniArtifactDataReader

public IniArtifactDataReader()
Constructs a data reader with the prefix "".


IniArtifactDataReader

public IniArtifactDataReader(String prefix)
Constructs a data reader with the given prefix.

Parameters:
prefix - the prefix to use for loading resources from the classpath.
Method Detail

parse

public ArtifactDescription parse(String resource)
                          throws IOException
Load an artifact description from the classpath and parse it.

Throws:
IOException

parse

public ArtifactDescription parse(URL res)
                          throws IOException
Open the given URL and parse ist.

Throws:
IOException

parseLiteral

public ArtifactDescription parseLiteral(String description)
                                 throws IOException
Parse the given String.

Throws:
IOException


Copyright © 2010-2013. All Rights Reserved.