- java.lang.Object
-
- org.wildfly.core.launcher.JBossModulesCommandBuilder
-
- org.wildfly.core.launcher.StandaloneCommandBuilder
-
- All Implemented Interfaces:
CommandBuilder
public class StandaloneCommandBuilder extends JBossModulesCommandBuilder implements CommandBuilder
Builds a list of commands used to launch a standalone instance of WildFly. This builder is not thread safe and the same instance should not be used in multiple threads.- Author:
- James R. Perkins
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StandaloneCommandBuilderaddJavaOption(String jvmArg)Adds a JVM argument to the command ignoringnullarguments.StandaloneCommandBuilderaddJavaOptions(Iterable<String> javaOpts)Adds the collection of JVM arguments to the command.StandaloneCommandBuilderaddJavaOptions(String... javaOpts)Adds the array of JVM arguments to the command.TaddModuleDir(String moduleDir)Adds a directory to the collection of module paths.TaddModuleDirs(Iterable<String> moduleDirs)Adds all the module directories to the collection of module paths.TaddModuleDirs(String... moduleDirs)Adds all the module directories to the collection of module paths.StandaloneCommandBuilderaddModuleOption(String arg)Adds an option which will be passed to JBoss Modules.StandaloneCommandBuilderaddModuleOptions(Iterable<String> args)Adds the options which will be passed to JBoss Modules.StandaloneCommandBuilderaddModuleOptions(String... args)Adds the options which will be passed to JBoss Modules.TaddPropertiesFile(String file)Adds a properties file to be passed to the server.TaddPropertiesFile(Path file)Adds a properties file to be passed to the server.StandaloneCommandBuilderaddSecurityProperties(Map<String,String> properties)Adds all the security properties to be passed to the server.StandaloneCommandBuilderaddSecurityProperty(String key)Adds a security property to be passed to the server with anullvalue.StandaloneCommandBuilderaddSecurityProperty(String key, String value)Adds a security property to be passed to the server.TaddServerArgument(String arg)Adds an argument to be passed to the server ignore the argument ifnull.TaddServerArguments(Iterable<String> args)Adds the arguments to the collection of arguments that will be passed to the server ignoring anynullarguments.TaddServerArguments(String... args)Adds the arguments to the collection of arguments that will be passed to the server ignoring anynullarguments.protected static voidaddSystemPropertyArg(List<String> cmd, String key, Object value)List<String>buildArguments()A list of command arguments required to launch WildFly instance.PathgetBaseDirectory()Returns the base directory for the server.protected StringgetBootLogArgument(String fileName)Returns the command line argument that specifies the path the log file that should be used.PathgetConfigurationDirectory()Returns the configuration directory for the server.PathgetJavaHome()Returns the Java home directory where the java executable command can be found.List<String>getJavaOptions()Returns the JVM arguments.PathgetLogDirectory()Returns the log directory for the server.protected StringgetLoggingPropertiesArgument(String fileName)Returns the command line argument that specifies the logging configuration.StringgetReadOnlyServerConfiguration()Returns the configuration filesetornullif one was not set.StringgetServerConfiguration()Returns the configuration filesetornullif one was not set.protected StandaloneCommandBuildergetThis()Returns the concrete builder.protected PathnormalizePath(String path)Resolves the path to the path relative to the WildFly home directory.protected PathnormalizePath(Path parent, String path)Resolves the path relative to the parent and normalizes it.static StandaloneCommandBuilderof(String wildflyHome)Creates a command builder for a standalone instance of WildFly.static StandaloneCommandBuilderof(Path wildflyHome)Creates a command builder for a standalone instance of WildFly.TsetAdminOnly()Sets the server argument--admin-only.StandaloneCommandBuildersetBaseDirectory(String baseDir)Sets the base directory to use.StandaloneCommandBuildersetBaseDirectory(Path baseDir)Sets the base directory to use.TsetBindAddressHint(String address)Sets the system propertyjboss.bind.addressto the address given.TsetBindAddressHint(String interfaceName, String address)Sets the system propertyjboss.bind.address.$INTERFACEto the address given where$INTERFACEis theinterfaceNameparameter.TsetConfigurationDirectory(String path)Sets the configuration directory to be used for configuration files.TsetConfigurationDirectory(Path path)Sets the configuration directory to be used for configuration files.StandaloneCommandBuildersetDebug()Sets the debug argument for the JVM with a default port of8787.StandaloneCommandBuildersetDebug(boolean suspend, int port)Sets the debug JPDA remote socket debugging argument.StandaloneCommandBuildersetDebug(int port)Sets the debug argument for the JVM.StandaloneCommandBuildersetGitRepository(String gitRepository, String gitBranch, String gitAuthentication)Configures the git repository for the standalone server.StandaloneCommandBuildersetJavaHome(String javaHome)Sets the Java home where the Java executable can be found.StandaloneCommandBuildersetJavaHome(Path javaHome)Sets the Java home where the Java executable can be found.StandaloneCommandBuildersetJavaOptions(Iterable<String> javaOpts)Sets the JVM arguments to use.StandaloneCommandBuildersetJavaOptions(String... javaOpts)Sets the JVM arguments to use.TsetLogDirectory(String path)Sets the log directory to be used for log files.TsetLogDirectory(Path path)Sets the log directory to be used for log files.TsetModuleDirs(Iterable<String> moduleDirs)Replaces any previously set module directories with the collection of module directories.TsetModuleDirs(String... moduleDirs)Replaces any previously set module directories with the array of module directories.StandaloneCommandBuildersetModuleOptions(Iterable<String> args)Clears the current module options and adds the options which will be passed to JBoss Modules.StandaloneCommandBuildersetModuleOptions(String... args)Clears the current module options and adds the options which will be passed to JBoss Modules.StandaloneCommandBuildersetModulesLockless(boolean b)Set totrueto use JBoss Modules lockless mode.StandaloneCommandBuildersetModulesMetrics(boolean b)Set totrueto gather metrics for JBoss Modules.TsetMulticastAddressHint(String address)Sets the system propertyjboss.default.multicast.addressto the address given.TsetPropertiesFile(String file)Sets the properties file to use for the server ornullto remove the file.TsetPropertiesFile(Path file)Sets the properties file to use for the server ornullto remove the file.StandaloneCommandBuildersetServerConfiguration(String configFile)Sets the configuration file for the server.StandaloneCommandBuildersetServerReadOnlyConfiguration(String configFile)Sets the configuration file for the server.StandaloneCommandBuildersetStability(String stability)Sets the stability level of the domain controller process.TsetStartSuspended()Sets the server argument--start-mode=suspend.TsetUseSecurityManager(boolean useSecMgr)Sets whether or not the security manager option,-secmgr, should be used.StandaloneCommandBuildersetYamlFiles(Path... yamlFiles)Adds the YAML configuration file argument with the given YAML configuration files.StandaloneCommandBuildersetYamlFiles(Collection<Path> yamlFiles)Adds the YAML configuration file argument with the given YAML configuration files.-
Methods inherited from class org.wildfly.core.launcher.JBossModulesCommandBuilder
addServerArg, build, getModulePaths, getModulesJarName, getServerArg, getServerArguments, getWildFlyHome, of, of, setSingleServerArg, useSecurityManager
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.core.launcher.CommandBuilder
build
-
-
-
-
Method Detail
-
of
public static StandaloneCommandBuilder of(Path wildflyHome)
Creates a command builder for a standalone instance of WildFly.- Parameters:
wildflyHome- the path to the WildFly home directory- Returns:
- a new builder
-
of
public static StandaloneCommandBuilder of(String wildflyHome)
Creates a command builder for a standalone instance of WildFly.- Parameters:
wildflyHome- the path to the WildFly home directory- Returns:
- a new builder
-
addJavaOption
public StandaloneCommandBuilder addJavaOption(String jvmArg)
Adds a JVM argument to the command ignoringnullarguments.- Overrides:
addJavaOptionin classJBossModulesCommandBuilder- Parameters:
jvmArg- the JVM argument to add- Returns:
- the builder
-
addJavaOptions
public StandaloneCommandBuilder addJavaOptions(String... javaOpts)
Adds the array of JVM arguments to the command.- Overrides:
addJavaOptionsin classJBossModulesCommandBuilder- Parameters:
javaOpts- the array of JVM arguments to add,nullarguments are ignored- Returns:
- the builder
-
addJavaOptions
public StandaloneCommandBuilder addJavaOptions(Iterable<String> javaOpts)
Adds the collection of JVM arguments to the command.- Overrides:
addJavaOptionsin classJBossModulesCommandBuilder- Parameters:
javaOpts- the collection of JVM arguments to add,nullarguments are ignored- Returns:
- the builder
-
setJavaOptions
public StandaloneCommandBuilder setJavaOptions(Iterable<String> javaOpts)
Sets the JVM arguments to use. This overrides any default JVM arguments that would normally be added and ignoresnullvalues in the collection. If the collection isnullthe JVM arguments will be cleared and no new arguments will be added.- Overrides:
setJavaOptionsin classJBossModulesCommandBuilder- Parameters:
javaOpts- the JVM arguments to use- Returns:
- the builder
-
setJavaOptions
public StandaloneCommandBuilder setJavaOptions(String... javaOpts)
Sets the JVM arguments to use. This overrides any default JVM arguments that would normally be added and ignoresnullvalues in the array. If the array isnullthe JVM arguments will be cleared and no new arguments will be added.- Overrides:
setJavaOptionsin classJBossModulesCommandBuilder- Parameters:
javaOpts- the JVM arguments to use- Returns:
- the builder
-
getJavaOptions
public List<String> getJavaOptions()
Returns the JVM arguments.- Overrides:
getJavaOptionsin classJBossModulesCommandBuilder- Returns:
- the JVM arguments
-
addModuleOption
public StandaloneCommandBuilder addModuleOption(String arg)
Adds an option which will be passed to JBoss Modules.Note that
-mpor--modulepathis not supported. UseJBossModulesCommandBuilder.addModuleDir(String)to add a module directory.- Overrides:
addModuleOptionin classJBossModulesCommandBuilder- Parameters:
arg- the argument to add- Returns:
- the builder
-
addModuleOptions
public StandaloneCommandBuilder addModuleOptions(String... args)
Adds the options which will be passed to JBoss Modules.Note that
-mpor--modulepathis not supported. UseJBossModulesCommandBuilder.addModuleDirs(String...)to add a module directory.- Overrides:
addModuleOptionsin classJBossModulesCommandBuilder- Parameters:
args- the argument to add- Returns:
- the builder
-
addModuleOptions
public StandaloneCommandBuilder addModuleOptions(Iterable<String> args)
Adds the options which will be passed to JBoss Modules.Note that
-mpor--modulepathis not supported. UseJBossModulesCommandBuilder.addModuleDirs(Iterable)to add a module directory.- Overrides:
addModuleOptionsin classJBossModulesCommandBuilder- Parameters:
args- the argument to add- Returns:
- the builder
-
setModuleOptions
public StandaloneCommandBuilder setModuleOptions(String... args)
Clears the current module options and adds the options which will be passed to JBoss Modules.Note that
-mpor--modulepathis not supported. UseJBossModulesCommandBuilder.addModuleDirs(String...)to add a module directory.- Overrides:
setModuleOptionsin classJBossModulesCommandBuilder- Parameters:
args- the argument to use- Returns:
- the builder
-
setModuleOptions
public StandaloneCommandBuilder setModuleOptions(Iterable<String> args)
Clears the current module options and adds the options which will be passed to JBoss Modules.Note that
-mpor--modulepathis not supported. UseJBossModulesCommandBuilder.addModuleDirs(Iterable)to add a module directory.- Overrides:
setModuleOptionsin classJBossModulesCommandBuilder- Parameters:
args- the argument to use- Returns:
- the builder
-
setDebug
public StandaloneCommandBuilder setDebug()
Sets the debug argument for the JVM with a default port of8787.- Returns:
- the builder
-
setDebug
public StandaloneCommandBuilder setDebug(int port)
Sets the debug argument for the JVM.- Parameters:
port- the port to listen on- Returns:
- the builder
-
setDebug
public StandaloneCommandBuilder setDebug(boolean suspend, int port)
Sets the debug JPDA remote socket debugging argument.- Parameters:
suspend-trueto suspend otherwisefalseport- the port to listen on- Returns:
- the builder
-
setBaseDirectory
public StandaloneCommandBuilder setBaseDirectory(String baseDir)
Sets the base directory to use. The default is$JBOSS_HOME/standalone.- Parameters:
baseDir- the base directory ornullto resolve the base directory- Returns:
- the builder
-
setBaseDirectory
public StandaloneCommandBuilder setBaseDirectory(Path baseDir)
Sets the base directory to use. The default is$JBOSS_HOME/standalone.- Parameters:
baseDir- the base directory ornullto resolve the base directory- Returns:
- the builder
-
setJavaHome
public StandaloneCommandBuilder setJavaHome(String javaHome)
Sets the Java home where the Java executable can be found.- Overrides:
setJavaHomein classJBossModulesCommandBuilder- Parameters:
javaHome- the Java home ornullto use te system propertyjava.home- Returns:
- the builder
-
setJavaHome
public StandaloneCommandBuilder setJavaHome(Path javaHome)
Sets the Java home where the Java executable can be found.- Overrides:
setJavaHomein classJBossModulesCommandBuilder- Parameters:
javaHome- the Java home ornullto use te system propertyjava.home- Returns:
- the builder
-
setModulesLockless
public StandaloneCommandBuilder setModulesLockless(boolean b)
Set totrueto use JBoss Modules lockless mode.- Overrides:
setModulesLocklessin classJBossModulesCommandBuilder- Parameters:
b-trueto use lockless mode- Returns:
- the builder
-
setModulesMetrics
public StandaloneCommandBuilder setModulesMetrics(boolean b)
Set totrueto gather metrics for JBoss Modules.- Overrides:
setModulesMetricsin classJBossModulesCommandBuilder- Parameters:
b-trueto gather metrics for JBoss Modules.- Returns:
- this builder
-
setServerConfiguration
public StandaloneCommandBuilder setServerConfiguration(String configFile)
Sets the configuration file for the server. The file must be in theconfigurationdirectory. A value ofnullwill remove the configuration file. This will override any previous value set viaJBossModulesCommandBuilder.addServerArgument(String).- Parameters:
configFile- the configuration file name ornullto remove the configuration file- Returns:
- the builder
-
getServerConfiguration
public String getServerConfiguration()
Returns the configuration filesetornullif one was not set.- Returns:
- the configuration file set or
nullif not set
-
setServerReadOnlyConfiguration
public StandaloneCommandBuilder setServerReadOnlyConfiguration(String configFile)
Sets the configuration file for the server. The file must be in theconfigurationdirectory. A value ofnullwill remove the configuration file. This will override any previous value set viaJBossModulesCommandBuilder.addServerArgument(String).- Parameters:
configFile- the configuration file name ornullto remove the configuration file- Returns:
- the builder
-
getReadOnlyServerConfiguration
public String getReadOnlyServerConfiguration()
Returns the configuration filesetornullif one was not set.- Returns:
- the configuration file set or
nullif not set
-
addSecurityProperty
public StandaloneCommandBuilder addSecurityProperty(String key)
Adds a security property to be passed to the server with anullvalue.- Parameters:
key- the property key- Returns:
- the builder
-
addSecurityProperty
public StandaloneCommandBuilder addSecurityProperty(String key, String value)
Adds a security property to be passed to the server.- Parameters:
key- the property keyvalue- the property value- Returns:
- the builder
-
addSecurityProperties
public StandaloneCommandBuilder addSecurityProperties(Map<String,String> properties)
Adds all the security properties to be passed to the server.- Parameters:
properties- a map of the properties to add,nullvalues are allowed in the map- Returns:
- the builder
-
setGitRepository
public StandaloneCommandBuilder setGitRepository(String gitRepository, String gitBranch, String gitAuthentication)
Configures the git repository for the standalone server.- Parameters:
gitRepository- the git repository to clone to get the server configuration fromgitBranch- the branch to use to get the server configurationgitAuthentication- the Elytron configuration file for managing git credentials- Returns:
- the builder
-
setYamlFiles
public StandaloneCommandBuilder setYamlFiles(Collection<Path> yamlFiles)
Adds the YAML configuration file argument with the given YAML configuration files.- Parameters:
yamlFiles- the files to add- Returns:
- the builder
-
setYamlFiles
public StandaloneCommandBuilder setYamlFiles(Path... yamlFiles)
Adds the YAML configuration file argument with the given YAML configuration files.- Parameters:
yamlFiles- the files to add- Returns:
- the builder
-
setStability
public StandaloneCommandBuilder setStability(String stability)
Sets the stability level of the domain controller process.- Parameters:
stability- a stability level- Returns:
- a reference to this builder
-
buildArguments
public List<String> buildArguments()
Description copied from interface:CommandBuilderA list of command arguments required to launch WildFly instance. These are the arguments the follow ajavaexecutable command.- Specified by:
buildArgumentsin interfaceCommandBuilder- Overrides:
buildArgumentsin classJBossModulesCommandBuilder- Returns:
- the list of arguments required to launch WildFly
-
getJavaHome
public Path getJavaHome()
Returns the Java home directory where the java executable command can be found. If the directory was not set the system property value,java.home, should be used.- Returns:
- the path to the Java home directory
-
getBaseDirectory
public Path getBaseDirectory()
Returns the base directory for the server. Example: For standalone the base directory would be$JBOSS_HOME/standalone.- Returns:
- the base directory
-
getThis
protected StandaloneCommandBuilder getThis()
Returns the concrete builder.- Returns:
- the concrete builder
-
setUseSecurityManager
public T setUseSecurityManager(boolean useSecMgr)
Description copied from class:JBossModulesCommandBuilderSets whether or not the security manager option,-secmgr, should be used.- Overrides:
setUseSecurityManagerin classJBossModulesCommandBuilder- Parameters:
useSecMgr-trueto use the a security manager, otherwisefalse- Returns:
- the builder
-
addModuleDir
public T addModuleDir(String moduleDir)
Description copied from class:JBossModulesCommandBuilderAdds a directory to the collection of module paths.- Overrides:
addModuleDirin classJBossModulesCommandBuilder- Parameters:
moduleDir- the module directory to add- Returns:
- the builder
-
addModuleDirs
public T addModuleDirs(String... moduleDirs)
Description copied from class:JBossModulesCommandBuilderAdds all the module directories to the collection of module paths.- Overrides:
addModuleDirsin classJBossModulesCommandBuilder- Parameters:
moduleDirs- an array of module paths to add- Returns:
- the builder
-
addModuleDirs
public T addModuleDirs(Iterable<String> moduleDirs)
Description copied from class:JBossModulesCommandBuilderAdds all the module directories to the collection of module paths.- Overrides:
addModuleDirsin classJBossModulesCommandBuilder- Parameters:
moduleDirs- a collection of module paths to add- Returns:
- the builder
-
setModuleDirs
public T setModuleDirs(Iterable<String> moduleDirs)
Description copied from class:JBossModulesCommandBuilderReplaces any previously set module directories with the collection of module directories. The default module directory will NOT be used if this method is invoked.- Overrides:
setModuleDirsin classJBossModulesCommandBuilder- Parameters:
moduleDirs- the collection of module directories to use- Returns:
- the builder
-
setModuleDirs
public T setModuleDirs(String... moduleDirs)
Description copied from class:JBossModulesCommandBuilderReplaces any previously set module directories with the array of module directories. The default module directory will NOT be used if this method is invoked.- Overrides:
setModuleDirsin classJBossModulesCommandBuilder- Parameters:
moduleDirs- the array of module directories to use- Returns:
- the builder
-
getLogDirectory
public Path getLogDirectory()
Returns the log directory for the server.- Returns:
- the log directory
-
setLogDirectory
public T setLogDirectory(String path)
Sets the log directory to be used for log files. If set tonull, the default, the log directory will be resolved.- Parameters:
path- the path to the log directory ornullto have the log directory resolved- Returns:
- the builder
- Throws:
IllegalArgumentException- if the directory is not a valid directory
-
setLogDirectory
public T setLogDirectory(Path path)
Sets the log directory to be used for log files. If set tonull, the default, the log directory will be resolved.- Parameters:
path- the path to the log directory ornullto have the log directory resolved- Returns:
- the builder
- Throws:
IllegalArgumentException- if the directory is not a valid directory
-
getConfigurationDirectory
public Path getConfigurationDirectory()
Returns the configuration directory for the server.- Returns:
- the configuration directory
-
setConfigurationDirectory
public T setConfigurationDirectory(String path)
Sets the configuration directory to be used for configuration files. If set tonull, the default, the configuration directory will be resolved.- Parameters:
path- the path to the configuration directory ornullto have the configuration directory resolved- Returns:
- the builder
- Throws:
IllegalArgumentException- if the directory is not a valid directory
-
setConfigurationDirectory
public T setConfigurationDirectory(Path path)
Sets the configuration directory to be used for configuration files. If set tonull, the default, the configuration directory will be resolved.- Parameters:
path- the path to the configuration directory ornullto have the configuration directory resolved- Returns:
- the builder
- Throws:
IllegalArgumentException- if the directory is not a valid directory
-
addServerArgument
public T addServerArgument(String arg)
Description copied from class:JBossModulesCommandBuilderAdds an argument to be passed to the server ignore the argument ifnull.- Overrides:
addServerArgumentin classJBossModulesCommandBuilder- Parameters:
arg- the argument to pass- Returns:
- the builder
-
addServerArguments
public T addServerArguments(String... args)
Description copied from class:JBossModulesCommandBuilderAdds the arguments to the collection of arguments that will be passed to the server ignoring anynullarguments.- Overrides:
addServerArgumentsin classJBossModulesCommandBuilder- Parameters:
args- the arguments to add- Returns:
- the builder
-
addServerArguments
public T addServerArguments(Iterable<String> args)
Description copied from class:JBossModulesCommandBuilderAdds the arguments to the collection of arguments that will be passed to the server ignoring anynullarguments.- Overrides:
addServerArgumentsin classJBossModulesCommandBuilder- Parameters:
args- the arguments to add- Returns:
- the builder
-
setAdminOnly
public T setAdminOnly()
Sets the server argument--admin-only.- Returns:
- the builder
-
setStartSuspended
public T setStartSuspended()
Sets the server argument--start-mode=suspend.- Returns:
- the builder
-
setBindAddressHint
public T setBindAddressHint(String address)
Sets the system propertyjboss.bind.addressto the address given. This will override any previous value set viaJBossModulesCommandBuilder.addServerArgument(String). Note: This option only works if the standard system property has not been removed from the interface. If the system property was removed the address provided has no effect.- Parameters:
address- the address to set the bind address to- Returns:
- the builder
-
setBindAddressHint
public T setBindAddressHint(String interfaceName, String address)
Sets the system propertyjboss.bind.address.$INTERFACEto the address given where$INTERFACEis theinterfaceNameparameter. For example in the default configuration passingmanagementfor theinterfaceNameparameter would result in the system propertyjboss.bind.address.managementbeing set to the address provided. This will override any previous value set viaJBossModulesCommandBuilder.addServerArgument(String). Note: This option only works if the standard system property has not been removed from the interface. If the system property was removed the address provided has no effect.- Parameters:
interfaceName- the name of the interface of the binding addressaddress- the address to bind the management interface to- Returns:
- the builder
-
setMulticastAddressHint
public T setMulticastAddressHint(String address)
Sets the system propertyjboss.default.multicast.addressto the address given. This will override any previous value set viaJBossModulesCommandBuilder.addServerArgument(String). Note: This option only works if the standard system property has not been removed from the interface. If the system property was removed the address provided has no effect.- Parameters:
address- the address to set the multicast system property to- Returns:
- the builder
-
addPropertiesFile
public T addPropertiesFile(String file)
Adds a properties file to be passed to the server. Note that the file must exist.- Parameters:
file- the file to add- Returns:
- the builder
- Throws:
IllegalArgumentException- if the file does not exist or is not a regular file
-
addPropertiesFile
public T addPropertiesFile(Path file)
Adds a properties file to be passed to the server. Note that the file must exist.- Parameters:
file- the file to add- Returns:
- the builder
- Throws:
IllegalArgumentException- if the file does not exist or is not a regular file
-
setPropertiesFile
public T setPropertiesFile(String file)
Sets the properties file to use for the server ornullto remove the file. Note that the file must exist.This will override any previous values set.
- Parameters:
file- the properties file to use ornull- Returns:
- the builder
- Throws:
IllegalArgumentException- if the file does not exist or is not a regular file
-
setPropertiesFile
public T setPropertiesFile(Path file)
Sets the properties file to use for the server ornullto remove the file. Note that the file must exist.This will override any previous values set.
- Parameters:
file- the properties file to use ornull- Returns:
- the builder
- Throws:
IllegalArgumentException- if the file does not exist or is not a regular file
-
getLoggingPropertiesArgument
protected String getLoggingPropertiesArgument(String fileName)
Returns the command line argument that specifies the logging configuration.- Parameters:
fileName- the name of the configuration file- Returns:
- the command line argument
-
getBootLogArgument
protected String getBootLogArgument(String fileName)
Returns the command line argument that specifies the path the log file that should be used. This is generally only used on the initial boot of the server in standalone. The server will rewrite the configuration file with hard-coded values.- Parameters:
fileName- the name of the file- Returns:
- the command line argument
-
normalizePath
protected Path normalizePath(String path)
Resolves the path to the path relative to the WildFly home directory.- Parameters:
path- the name of the relative path- Returns:
- the normalized path
-
normalizePath
protected Path normalizePath(Path parent, String path)
Resolves the path relative to the parent and normalizes it.- Parameters:
parent- the parent pathpath- the path- Returns:
- the normalized path
-
-