Skip to content

Commit b20967d

Browse files
committed
Make a context project optional for EclipseRunMojo
1 parent ffcd130 commit b20967d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tycho-eclipse-plugin/src/main/java/org/eclipse/tycho/eclipserun/EclipseRunMojo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
* Launch an eclipse process with arbitrary commandline arguments. The eclipse
6868
* installation is defined by the dependencies to bundles specified.
6969
*/
70-
@Mojo(name = "eclipse-run", threadSafe = true)
70+
@Mojo(name = "eclipse-run", threadSafe = true, requiresProject = false)
7171
public class EclipseRunMojo extends AbstractMojo {
7272

7373
/**
@@ -446,7 +446,7 @@ public LaunchConfiguration createCommandLine(EquinoxInstallation runtime) throws
446446
+ ". Current Java runtime will be used");
447447
}
448448
cli.setJvmExecutable(executable);
449-
cli.setWorkingDirectory(project.getBasedir());
449+
cli.setWorkingDirectory(project.getBasedir() != null ? project.getBasedir() : new File("").getAbsoluteFile());
450450

451451
cli.addVMArguments(splitArgLine(argLine));
452452
if (jvmArgs != null) {

tycho-p2-repository-plugin/src/main/java/org/eclipse/tycho/plugins/p2/repository/Repo2RunnableMojo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* Mojo that provides the "repo2runnable" functionality described
2020
* <a href="https://wiki.eclipse.org/Equinox/p2/Ant_Tasks#Repo2Runnable">here</a>.
2121
*/
22-
@Mojo(name = "repo-to-runnable")
22+
@Mojo(name = "repo-to-runnable", requiresProject = false)
2323
public class Repo2RunnableMojo extends AbstractMojo {
2424

2525
@Component
@@ -60,7 +60,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
6060
try {
6161
repo2Runnable.run(null);
6262
} catch (ProvisionException e) {
63-
throw new MojoFailureException(e);
63+
throw new MojoExecutionException(e);
6464
}
6565
}
6666

0 commit comments

Comments
 (0)