Constructor and Description |
---|
Parameters(org.apache.maven.execution.MavenSession mavenSession,
org.eclipse.aether.RepositorySystem repositorySystem,
org.eclipse.aether.RepositorySystemSession repositorySystemSession,
String artifact,
String mainClass,
String arguments,
boolean runAsync,
String classPathFormat,
String javaPath,
String javaOptions,
String repositories,
boolean ignoreSystemRepositories,
String workingDirectory)
Constructor taking injected system objects and user arguments of
RunMojo . |
Modifier and Type | Method and Description |
---|---|
List<String> |
getArguments()
List of arguments for the to-be-executed application
Default: none
|
org.eclipse.aether.artifact.Artifact |
getArtifact()
Artifact to load
Required.
|
Optional<String> |
getClassPathFormat()
Formatter value that allows modifying the class path.
|
List<String> |
getJavaOptions()
List of options for the Java VM
Default: none
|
Optional<Path> |
getJavaPath()
Path to the Java executable
Default: path to the Java executable used by Maven
|
Optional<String> |
getMainClass()
Main class to execute
Default: the artifacts JARs main class
|
org.apache.maven.execution.MavenSession |
getMavenSession()
Maven Session
|
List<org.eclipse.aether.repository.RemoteRepository> |
getRepositories()
List of Maven repository URLs
User name and password can be inserted as URI user info, delimited by colon.
|
org.eclipse.aether.RepositorySystem |
getRepositorySystem()
Aether Repository System
|
org.eclipse.aether.RepositorySystemSession |
getRepositorySystemSession()
Aether Repository System Session
|
Optional<Path> |
getWorkingDirectory()
Working Directory for the to-be-executed application
Default: current working directory
|
boolean |
isIgnoreSystemRepositories()
Ignore system repositories
Default: false
|
boolean |
isRunAsync()
Run application asynchronously
If this argument equals "true" the JAR Runner instance stops right after
starting the application.
|
public Parameters(org.apache.maven.execution.MavenSession mavenSession, org.eclipse.aether.RepositorySystem repositorySystem, org.eclipse.aether.RepositorySystemSession repositorySystemSession, @Nullable String artifact, @Nullable String mainClass, @Nullable String arguments, boolean runAsync, @Nullable String classPathFormat, @Nullable String javaPath, @Nullable String javaOptions, @Nullable String repositories, boolean ignoreSystemRepositories, @Nullable String workingDirectory)
RunMojo
.
Arguments are validated and converted from Maven argument types to property types.
mavenSession
- Maven SessionrepositorySystem
- Aether Repository SystemrepositorySystemSession
- Aether Repository System Sessionartifact
- ArtifactmainClass
- Main Classarguments
- ArgumentsrunAsync
- Run application asynchronouslyclassPathFormat
- Class Path FormatjavaPath
- Java PathjavaOptions
- Java Optionsrepositories
- List of RepositoriesignoreSystemRepositories
- Ignore System RepositoriesworkingDirectory
- Working Directorypublic List<String> getArguments()
Default: none
public org.eclipse.aether.artifact.Artifact getArtifact()
Required.
public Optional<String> getClassPathFormat()
Default: "%s"
public boolean isIgnoreSystemRepositories()
Default: false
public Optional<Path> getJavaPath()
Default: path to the Java executable used by Maven
public List<String> getJavaOptions()
Default: none
public Optional<String> getMainClass()
Default: the artifacts JARs main class
public org.apache.maven.execution.MavenSession getMavenSession()
public List<org.eclipse.aether.repository.RemoteRepository> getRepositories()
User name and password can be inserted as URI user info, delimited by colon. Order is: user name, password converter (either base64 or plain), password. A repository ID can be set using the URI fragment.
Example: http://user:base64:cGFzc3dvcmQ=@repository.example.com/path#id
In case of multiple repositories with the same ID the first repository in order is used. Following repositories with the same ID are ignored. Repositories of user parameters are handled at first.
Repository layout and proxy cannot be set via user argument.
Default: none
public org.eclipse.aether.RepositorySystem getRepositorySystem()
public org.eclipse.aether.RepositorySystemSession getRepositorySystemSession()
public boolean isRunAsync()
If this argument equals "true" the JAR Runner instance stops right after starting the application. The applications stream will not be inherited.
Default: false
true
if the application shall run asynchronouslyCopyright © 2025. All rights reserved.