[ 
https://jira.codehaus.org/browse/SUREFIRE-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=282884#comment-282884
 ] 

lisak commented on SUREFIRE-784:
--------------------------------

My apologies, I used a different version of surefire plugin as dependency 
(source for debugging). So that it probably missed the breakpoints. So 
debugging Mojo works.

As to the other thing, I figured that I have to 
{noformat}useManifestOnlyJar=false{noformat}

from here :
{code:title=ForkConfiguration.java|borderStyle=solid}
  if ( useJar )
    {
     File jarFile;
     try
    {
      jarFile = createJar( classPath );
    }
    catch ( IOException e )
    {
    throw new SurefireBooterForkException( "Error creating archive file", e );
    }

    cli.createArg().setValue( "-jar" );
    cli.createArg().setValue( jarFile.getAbsolutePath() );
 }
 else
 {
    cli.addEnvironment( "CLASSPATH", StringUtils.join( classPath.iterator(), 
File.pathSeparator ) );
    final String forkedBooter = ForkedBooter.class.getName();

    cli.createArg().setValue( shadefire ? new Relocator().relocate( 
forkedBooter ) : forkedBooter );
 }
{code}

But you know what ? The test(s) is not run at all if useManifestOnlyJar=false, 
wtf ?
{noformat}
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running cz.instance.transl.tests.workflow.RevolutionTest
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.263 sec

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
{noformat}


What am I doing wrong ? Why the test is not executed ? and it silently quits ?

> Surefire plugin cannot be debugged remotely by eclipse
> ------------------------------------------------------
>
>                 Key: SUREFIRE-784
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-784
>             Project: Maven Surefire
>          Issue Type: Story
>          Components: process forking
>    Affects Versions: 2.10
>         Environment: Eclipse indigo 20110916-0149
> jdk1.6.0_27
> Apache Maven 3.0.3 r1075438
>            Reporter: lisak
>
> I'm talking about debugging the plugin/mojo, not tests.
> Running maven with 
> {noformat}-Xdebug -Xnoagent 
> -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000{noformat}
> allows eclipse debugger to connect to the process of all maven plugins I 
> tried, except for surefire-plugin.
> The breakpoint in AbstractSurefireMojo just isn't triggered.
> I tried everything possible
> -DforkMode=once
> -DforkMode=never
> mvnDebug
> etc.
> Any idea how to deal with this ?
> I would need to add 200 jars on classpath to boot up Liferay portal :
> {noformat}
> <additionalClasspathElements>
>       <additionalClasspathElement>
>               /opt/liferay/portal/lib/development/*
>       </additionalClasspathElement>
>       <additionalClasspathElement>
>               /opt/liferay/portal/lib/global/*
>       </additionalClasspathElement>
>       <additionalClasspathElement>
>               /opt/liferay/portal/lib/portal/*
>       </additionalClasspathElement>
> </additionalClasspathElements>
> {noformat}
> but it doesn't work. Neither *.jar wildcard ... Although 
> {noformat}/opt/liferay/portal/lib/portal/c3p0.jar{noformat}
> works.
> It is hard to figure out what is going on without debugging it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to