org.apache.maven.model.building
Interface ModelSource

All Known Subinterfaces:
ModelSource2
All Known Implementing Classes:
FileModelSource, StringModelSource, UrlModelSource

public interface ModelSource

Provides access to the contents of a POM independently of the backing store (e.g. file system, database, memory).

This interface does not support loading of parent POM(s) from the same backing store, integrators are strongly encouraged to implement ModelSource2 instead of implementing this interface directly.

Author:
Benjamin Bentmann
See Also:
ModelSource2

Method Summary
 InputStream getInputStream()
          Gets a byte stream to the POM contents.
 String getLocation()
          Provides a user-friendly hint about the location of the POM.
 

Method Detail

getInputStream

InputStream getInputStream()
                           throws IOException
Gets a byte stream to the POM contents. Closing the returned stream is the responsibility of the caller.

Returns:
A byte stream to the POM contents, never null.
Throws:
IOException

getLocation

String getLocation()
Provides a user-friendly hint about the location of the POM. This could be a local file path, a URI or just an empty string. The intention is to assist users during error reporting.

Returns:
A user-friendly hint about the location of the POM, never null.


Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.