Issue Type: Bug Bug
Affects Versions: current
Assignee: Richard Mortimer
Components: maven2
Created: 12/Feb/13 1:20 PM
Description:

Recent Jenkins releases have stopped detecting the test results produced by android-maven-plugin. This seems to be due to the refactoring done as part of the fix for JENKINS-8334.

After digging into the failure the problem is due to the reportsDir fallback code that gets executed if the mojo does not support a reportsDirectory config value.

Specifically (from SurefireArchiver.java and now TestMojo.java)

if (reportsDir == null) {
   // if test mojo doesn't have such config value, still almost all
   // default to target/surefire-reports
   reportsDir = new File(pom.getBasedir(),
         pom.getBuild().getDirectory()+File.separator+"surefire-reports");
   return true;
}

The code was moved between files during the fix but was not altered. It looks like the maven-android-plugin code is now falling through to that
and exposing a bug in the old code.

Basically pom.getBuild().getDirectory() returns a full path to the build directory and not just the bare directory name (usually "target").
See http://stackoverflow.com/questions/9318935/get-project-build-directory-from-mavenproject

I have tested a proposed fix (pull request coming soon) and it works in my environment.

Environment: Ubuntu 12.04 Jenkins 1.500
Project: Jenkins
Priority: Major Major
Reporter: Richard Mortimer
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to