
com.robertboothby.utilities.maven.MavenUtilities Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of abstract-freemarker-template-mojo Show documentation
Show all versions of abstract-freemarker-template-mojo Show documentation
This project contains an Abstract Mojo that provides the foundation for Maven plugins that wish to produce files
using Freemarker templates.
package com.robertboothby.utilities.maven;
import org.apache.maven.project.MavenProject;
import java.io.File;
public class MavenUtilities {
/**
* Utility method that takes a directory and if it is not absolute resolves it against the Maven project base directory.
* @param directory The directory to resolve.
* @param project The Maven project whose base directory to use.
* @return the resolved directory.
* @see Resolving Relative Paths
*/
public static File getAbsoluteBuildDirectory(File directory, MavenProject project) {
if(!directory.isAbsolute()){
directory = new File(project.getBasedir(), directory.getPath());
}
return directory;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy