Skip to content

Commit

Permalink
o Added convenience option to remote debug mvn
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/maven/shared/trunk@1050255 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
bentmann committed Dec 17, 2010
1 parent d3067b1 commit 1ceedcb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,23 @@ class ForkedLauncher
private final String executable;

public ForkedLauncher( String mavenHome )
{
this( mavenHome, false );
}

public ForkedLauncher( String mavenHome, boolean debugJvm )
{
this.mavenHome = mavenHome;

String script = debugJvm ? "mvnDebug" : "mvn";

if ( mavenHome != null )
{
executable = new File( mavenHome, "bin/mvn" ).getPath();
executable = new File( mavenHome, "bin/" + script ).getPath();
}
else
{
executable = "mvn";
executable = script;
}
}

Expand Down
14 changes: 13 additions & 1 deletion maven-verifier/src/main/java/org/apache/maven/it/Verifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ public class Verifier

private String forkMode;

private boolean debugJvm = false;

private static MavenLauncher embeddedLauncher;

public Verifier( String basedir )
Expand Down Expand Up @@ -1361,7 +1363,7 @@ else if ( envVars.isEmpty() && "auto".equalsIgnoreCase( forkMode ) )
}
else
{
ForkedLauncher launcher = new ForkedLauncher( defaultMavenHome );
ForkedLauncher launcher = new ForkedLauncher( defaultMavenHome, debugJvm );

ret = launcher.run( cliArgs, envVars, getBasedir(), logFile );
}
Expand Down Expand Up @@ -2026,6 +2028,16 @@ public void setForkJvm( boolean forkJvm )
this.forkJvm = Boolean.valueOf( forkJvm );
}

public boolean isDebugJvm()
{
return debugJvm;
}

public void setDebugJvm( boolean debugJvm )
{
this.debugJvm = debugJvm;
}

public String getLocalRepoLayout()
{
return localRepoLayout;
Expand Down

0 comments on commit 1ceedcb

Please sign in to comment.