org.apache.maven.model.locator
Class DefaultModelLocator

java.lang.Object
  extended by org.apache.maven.model.locator.DefaultModelLocator
All Implemented Interfaces:
ModelLocator

@Component(role=ModelLocator.class)
public class DefaultModelLocator
extends Object
implements ModelLocator

Locates a POM file within a project base directory.

Author:
Benjamin Bentmann

Constructor Summary
DefaultModelLocator()
           
 
Method Summary
 File locatePom(File projectDirectory)
          Locates the POM file within the specified project directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultModelLocator

public DefaultModelLocator()
Method Detail

locatePom

public File locatePom(File projectDirectory)
Description copied from interface: ModelLocator
Locates the POM file within the specified project directory. In case the given project directory does not exist or does not contain a POM file, the return value indicates the expected path to the POM file. Sub directories of the project directory will not be considered when locating the POM file. The return value will be an absolute path if the project directory is given as an absolute path.

Specified by:
locatePom in interface ModelLocator
Parameters:
projectDirectory - The (possibly non-existent) base directory to locate the POM file in, must not be null.
Returns:
The path to the (possibly non-existent) POM file, never null.


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.