Search in sources :

Example 1 with FileLocation

use of org.apache.maven.shared.io.location.FileLocation in project maven-plugins by apache.

the class RelativeFileLocatorStrategy method resolve.

@Override
public Location resolve(String locationSpecification, MessageHolder messageHolder) {
    File file = new File(basedir, locationSpecification);
    messageHolder.addInfoMessage("Searching for file location: " + file.getAbsolutePath());
    Location location = null;
    if (file.exists()) {
        location = new FileLocation(file, locationSpecification);
    } else {
        messageHolder.addMessage("File: " + file.getAbsolutePath() + " does not exist.");
    }
    return location;
}
Also used : FileLocation(org.apache.maven.shared.io.location.FileLocation) File(java.io.File) FileLocation(org.apache.maven.shared.io.location.FileLocation) Location(org.apache.maven.shared.io.location.Location)

Aggregations

File (java.io.File)1 FileLocation (org.apache.maven.shared.io.location.FileLocation)1 Location (org.apache.maven.shared.io.location.Location)1