public abstract class AbstractScriptWriter extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
appendToMavenCommands |
protected String |
betweenEachCommand |
protected List<String> |
commands |
protected File |
directory |
protected String |
extraCli |
protected String |
filename |
protected FileWriter |
fileWriter |
protected String |
newLine |
protected List<String> |
preliminaryLines |
| Constructor and Description |
|---|
AbstractScriptWriter(File directory,
String filename,
boolean withTests) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addCommand(String command,
boolean isMaven,
boolean takesExtraCli)
Adds a command without any arguments
|
abstract void |
addCommand(String command,
String arguments,
boolean isMaven,
boolean takesExtraCli)
Adds a command with arguments
|
abstract void |
addCurrentDirToPath()
Adds a command to put the current directory in the system path
|
abstract void |
addLocalRepoLine(String localRepoFilename)
Adds "-Dmaven.repo.local=localRepoFilename" to all maven commands
|
abstract void |
addOtherPreliminaryLine(String line)
Allows adding of extra commands before the main project commands
|
abstract void |
addSettingsLine(String settingsFilename)
Adds a "-s settingsFilename" to all maven commands
|
protected void |
addToMavenCommands(String extraArgs) |
void |
includeSettingsFile(String sourceFilename,
String destFilename)
Copies a maven settings file for inclusion in the source distribution.
|
abstract void |
useErrorMode()
Makes the script halt on the first error rather than plowing on
|
void |
writeScript()
Writes the stored script info out to file
|
protected String filename
protected File directory
protected FileWriter fileWriter
protected String betweenEachCommand
protected String newLine
protected String appendToMavenCommands
protected String extraCli
public void writeScript()
throws IOException
IOExceptionprotected void addToMavenCommands(String extraArgs)
public void includeSettingsFile(String sourceFilename, String destFilename) throws IOException
sourceFilename - destFilename - IOExceptionpublic abstract void addSettingsLine(String settingsFilename)
settingsFilename - public abstract void addLocalRepoLine(String localRepoFilename)
public abstract void addCurrentDirToPath()
public abstract void useErrorMode()
public abstract void addOtherPreliminaryLine(String line)
line - public abstract void addCommand(String command, boolean isMaven, boolean takesExtraCli)
command - isMaven - takesExtraCli - Copyright © 2021 Atlassian. All rights reserved.