Class EclipseRunMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.eclipse.tycho.extras.eclipserun.EclipseRunMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="eclipse-run") public class EclipseRunMojo extends org.apache.maven.plugin.AbstractMojo
Launch an eclipse process with arbitrary commandline arguments. The eclipse installation is defined by the dependencies to bundles specified.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
addDefaultDependencies
Whether to add default dependencies to bundles org.eclipse.equinox.launcher, org.eclipse.osgi and org.eclipse.core.runtime.private java.lang.String
appArgLine
Deprecated.useapplicationsArgs
instead.private java.util.List<java.lang.String>
applicationsArgs
List of applications arguments set on the command line.private java.lang.String
argLine
Deprecated.usejvmArgs
instead.private java.util.List<org.apache.maven.model.Dependency>
dependencies
Dependencies which will be resolved transitively to make up the eclipse runtime.private java.util.Map<java.lang.String,java.lang.String>
environmentVariables
Additional environments to set for the forked JVM.private EquinoxServiceFactory
equinox
private java.lang.String
executionEnvironment
Execution environment profile name used to resolve dependencies.private int
forkedProcessTimeoutInSeconds
Kill the forked process after a certain number of seconds.private EquinoxInstallationFactory
installationFactory
private java.util.List<java.lang.String>
jvmArgs
List of JVM arguments set on the command line.private EquinoxLauncher
launcher
private org.codehaus.plexus.logging.Logger
logger
private org.apache.maven.project.MavenProject
project
private java.util.List<Repository>
repositories
p2 repositories which will be used to resolve dependencies.private org.apache.maven.execution.MavenSession
session
private boolean
skip
Whether to skip mojo execution.private org.apache.maven.toolchain.ToolchainManager
toolchainManager
private ToolchainProvider
toolchainProvider
private java.io.File
work
Work area.
-
Constructor Summary
Constructors Constructor Description EclipseRunMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addDefaultDependencies(P2Resolver resolver)
private void
addDefaultDependency(P2Resolver resolver, java.lang.String bundleId)
private void
addProgramArgs(EquinoxLaunchConfiguration cli, java.lang.String... arguments)
(package private) LaunchConfiguration
createCommandLine(EquinoxInstallation runtime)
private EquinoxInstallation
createEclipseInstallation()
void
execute()
private org.apache.maven.toolchain.Toolchain
getToolchain()
(package private) void
runEclipse(EquinoxInstallation runtime)
private java.lang.String[]
splitArgLine(java.lang.String argumentLine)
-
-
-
Field Detail
-
work
@Parameter(defaultValue="${project.build.directory}/eclipserun-work") private java.io.File work
Work area. This includes:- <work>/configuration: The configuration area (-configuration)
- <work>/data: The data ('workspace') area (-data)
-
project
@Parameter(property="project") private org.apache.maven.project.MavenProject project
-
dependencies
@Parameter private java.util.List<org.apache.maven.model.Dependency> dependencies
Dependencies which will be resolved transitively to make up the eclipse runtime. Example:<dependencies> <dependency> <artifactId>org.eclipse.ant.core</artifactId> <type>eclipse-plugin</type> </dependency> </dependencies>
-
addDefaultDependencies
@Parameter(defaultValue="true") private boolean addDefaultDependencies
Whether to add default dependencies to bundles org.eclipse.equinox.launcher, org.eclipse.osgi and org.eclipse.core.runtime.
-
executionEnvironment
@Parameter(defaultValue="JavaSE-11") private java.lang.String executionEnvironment
Execution environment profile name used to resolve dependencies.
-
repositories
@Parameter(required=true) private java.util.List<Repository> repositories
p2 repositories which will be used to resolve dependencies. Example:<repositories> <repository> <id>juno</id> <layout>p2</layout> <url>https://download.eclipse.org/releases/juno</url> </repository> </repositories>
-
session
@Parameter(property="session", readonly=true, required=true) private org.apache.maven.execution.MavenSession session
-
argLine
@Parameter private java.lang.String argLine
Deprecated.usejvmArgs
instead.Arbitrary JVM options to set on the command line.
-
jvmArgs
@Parameter private java.util.List<java.lang.String> jvmArgs
List of JVM arguments set on the command line. Example:<jvmArgs> <args>-Xdebug</args> <args>-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044</args> </jvmArgs>
- Since:
- 0.25.0
-
skip
@Parameter(property="eclipserun.skip", defaultValue="false") private boolean skip
Whether to skip mojo execution.
-
appArgLine
@Parameter private java.lang.String appArgLine
Deprecated.useapplicationsArgs
instead.Arbitrary applications arguments to set on the command line.
-
applicationsArgs
@Parameter private java.util.List<java.lang.String> applicationsArgs
List of applications arguments set on the command line. Example:<applicationsArgs> <args>-buildfile</args> <args>build-test.xml</args> </applicationsArgs>
- Since:
- 0.24.0
-
forkedProcessTimeoutInSeconds
@Parameter(property="eclipserun.timeout") private int forkedProcessTimeoutInSeconds
Kill the forked process after a certain number of seconds. If set to 0, wait forever for the process, never timing out.
-
environmentVariables
@Parameter private java.util.Map<java.lang.String,java.lang.String> environmentVariables
Additional environments to set for the forked JVM.
-
installationFactory
@Component private EquinoxInstallationFactory installationFactory
-
launcher
@Component private EquinoxLauncher launcher
-
toolchainProvider
@Component private ToolchainProvider toolchainProvider
-
equinox
@Component private EquinoxServiceFactory equinox
-
logger
@Component private org.codehaus.plexus.logging.Logger logger
-
toolchainManager
@Component private org.apache.maven.toolchain.ToolchainManager toolchainManager
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
addDefaultDependency
private void addDefaultDependency(P2Resolver resolver, java.lang.String bundleId)
-
addDefaultDependencies
private void addDefaultDependencies(P2Resolver resolver)
-
createEclipseInstallation
private EquinoxInstallation createEclipseInstallation() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
runEclipse
void runEclipse(EquinoxInstallation runtime) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
createCommandLine
LaunchConfiguration createCommandLine(EquinoxInstallation runtime) throws java.net.MalformedURLException, org.apache.maven.plugin.MojoExecutionException
- Throws:
java.net.MalformedURLException
org.apache.maven.plugin.MojoExecutionException
-
splitArgLine
private java.lang.String[] splitArgLine(java.lang.String argumentLine) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
addProgramArgs
private void addProgramArgs(EquinoxLaunchConfiguration cli, java.lang.String... arguments)
-
getToolchain
private org.apache.maven.toolchain.Toolchain getToolchain() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-