public class BuildEnvironment extends Object
This class contains settings and methods that are not specific to a single
MavenProject
, but rather specific to a tree of projects.
Modifier and Type | Field and Description |
---|---|
protected boolean |
debug |
protected boolean |
downloadAutomatically |
protected String |
endLine |
protected PrintStream |
err |
protected Set<File> |
excludedFromMultiProjects |
protected Map<File,MavenProject> |
file2pom |
protected boolean |
ignoreMavenRepositories |
static String |
IMAGEJ_APP_DIRECTORY |
protected JavaCompiler |
javac |
protected Map<String,MavenProject> |
localPOMCache |
protected static File |
mavenRepository |
protected Stack<File> |
multiProjectRoots |
protected boolean |
offlineMode |
protected int |
updateInterval |
protected boolean |
verbose |
Constructor and Description |
---|
BuildEnvironment(PrintStream err,
boolean downloadAutomatically,
boolean verbose,
boolean debug) |
Modifier and Type | Method and Description |
---|---|
void |
addMultiProjectRoot(File root) |
protected static int |
compareVersion(String version1,
String version2) |
boolean |
containsProject(Coordinate coordinate) |
boolean |
containsProject(String groupId,
String artifactId) |
static void |
copy(InputStream in,
File target) |
static void |
copy(InputStream in,
OutputStream out,
boolean closeOutput) |
static void |
copyFile(File source,
File target) |
protected File |
download(URL url,
File directory,
String message) |
protected File |
download(URL url,
File directory,
String fileName,
String message) |
protected void |
downloadAndVerify(String repositoryURL,
Coordinate dependency,
boolean quiet) |
protected void |
downloadAndVerify(String url,
File directory,
String message) |
protected void |
downloadAndVerify(String url,
File directory,
String fileName,
String message) |
void |
excludeFromMultiProjects(File directory) |
protected String |
exec(File gitDir,
String... args) |
MavenProject |
fakePOM(File target,
Coordinate dependency) |
protected static int |
firstNonDigit(String string) |
boolean |
getDownloadAutomatically() |
PrintStream |
getErr() |
protected String |
getImplementationBuild(File fileOrDirectory) |
protected static int |
hexNybble(int b) |
protected boolean |
isAggregatorPOM(File xml) |
protected boolean |
isAggregatorPOM(InputStream in) |
protected static boolean |
isInteractiveConsole() |
protected static boolean |
isSnapshotVersion(String version) |
protected static boolean |
isTimestampVersion(String version) |
MavenProject |
parse(File file) |
MavenProject |
parse(File file,
MavenProject parent) |
MavenProject |
parse(File file,
MavenProject parent,
String classifier) |
MavenProject |
parse(InputStream in,
File directory,
MavenProject parent,
String classifier) |
void |
parseMultiProjects() |
protected void |
print80(String string) |
protected void |
rename(File source,
File target) |
protected static void |
rmRF(File directory) |
void |
setDebug(boolean debug) |
void |
setVerbose(boolean verbose) |
public static final String IMAGEJ_APP_DIRECTORY
protected String endLine
protected boolean verbose
protected boolean debug
protected boolean downloadAutomatically
protected boolean offlineMode
protected boolean ignoreMavenRepositories
protected int updateInterval
protected PrintStream err
protected JavaCompiler javac
protected Map<String,MavenProject> localPOMCache
protected Map<File,MavenProject> file2pom
protected static final File mavenRepository
public BuildEnvironment(PrintStream err, boolean downloadAutomatically, boolean verbose, boolean debug)
public void setVerbose(boolean verbose)
public void setDebug(boolean debug)
public boolean getDownloadAutomatically()
protected static boolean isInteractiveConsole()
public PrintStream getErr()
protected void print80(String string)
public MavenProject parse(File file) throws IOException, ParserConfigurationException, SAXException
public MavenProject parse(File file, MavenProject parent) throws IOException, ParserConfigurationException, SAXException
public MavenProject parse(File file, MavenProject parent, String classifier) throws IOException, ParserConfigurationException, SAXException
public MavenProject parse(InputStream in, File directory, MavenProject parent, String classifier) throws SAXException, ParserConfigurationException, IOException
public MavenProject fakePOM(File target, Coordinate dependency)
public boolean containsProject(Coordinate coordinate)
public void addMultiProjectRoot(File root)
public void excludeFromMultiProjects(File directory)
public void parseMultiProjects() throws IOException, ParserConfigurationException, SAXException
protected void downloadAndVerify(String repositoryURL, Coordinate dependency, boolean quiet) throws MalformedURLException, IOException, NoSuchAlgorithmException, ParserConfigurationException, SAXException
protected void downloadAndVerify(String url, File directory, String message) throws IOException, NoSuchAlgorithmException
IOException
NoSuchAlgorithmException
protected void downloadAndVerify(String url, File directory, String fileName, String message) throws IOException, NoSuchAlgorithmException
IOException
NoSuchAlgorithmException
protected void rename(File source, File target) throws IOException
IOException
protected boolean isAggregatorPOM(File xml)
protected boolean isAggregatorPOM(InputStream in)
protected static int hexNybble(int b)
protected static void rmRF(File directory)
protected File download(URL url, File directory, String message) throws IOException
IOException
protected File download(URL url, File directory, String fileName, String message) throws IOException
IOException
public static void copyFile(File source, File target) throws IOException
IOException
public static void copy(InputStream in, File target) throws IOException
IOException
public static void copy(InputStream in, OutputStream out, boolean closeOutput) throws IOException
IOException
protected static boolean isSnapshotVersion(String version)
protected static boolean isTimestampVersion(String version)
protected static int firstNonDigit(String string)
Copyright © 2015–2022 SciJava. All rights reserved.