junichi11 commented on a change in pull request #1402: [NETBEANS-1763] 
Integrate maven failsafe output into test runner output
URL: https://github.com/apache/netbeans/pull/1402#discussion_r313818042
 
 

 ##########
 File path: 
java/maven.junit/src/org/netbeans/modules/maven/junit/JUnitOutputListenerProvider.java
 ##########
 @@ -244,42 +247,69 @@ static boolean isFullJavaId(String 
possibleNewRunningTestClass) {
 
     public @Override void sequenceStart(String sequenceId, OutputVisitor 
visitor) {
         session = null;
-       // Fix for #257563 / SUREFIRE-1158, where surefire 2.19.x
-       // removed the printing of the output directory. Get the directory from
-       // the configuration directly or fallback to the plugin standard
-       if (usingSurefire219(this.config.getMavenProject())) {
-           // 
http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#reportsDirectory
-           String reportsDirectory = 
PluginPropertyUtils.getPluginProperty(config.getMavenProject(),
-                   Constants.GROUP_APACHE_PLUGINS, Constants.PLUGIN_SUREFIRE, 
"reportsDirectory", "test", null); // NOI18N
-           if (null == reportsDirectory) {
-               // fallback to default value
-               try {
-                   Object defaultValue = 
PluginPropertyUtils.createEvaluator(config.getMavenProject())
-                           
.evaluate("${project.build.directory}/surefire-reports");
-                   if (defaultValue instanceof String) {
-                       reportsDirectory = (String) defaultValue;
-                   }
-               } catch (ExpressionEvaluationException ex) {
-                   // NOP could not resolved default value
-               }
-           }
-           if (null != reportsDirectory) {
-               File absoluteFile = new File(reportsDirectory);
-               // configuration might be "target/directory", which is relative
-               // to the maven project or an absolute path
-               File relativeFile = new 
File(this.config.getMavenProject().getBasedir(), reportsDirectory);
-               if (absoluteFile.exists() && absoluteFile.isDirectory()) {
-                   outputDir = absoluteFile;
-               } else {
-                   if (relativeFile.exists() && relativeFile.isDirectory()) {
-                       outputDir = relativeFile;
-                   }
-               }
-               if (null != outputDir) {
-                   createSession(outputDir);
-               }
-           }
-       }
+        reportNameSuffix = null;
+        testType = null;
+        String reportsDirectory = null;
+       if (("mojo-execute#surefire:test".equals(sequenceId))) {
 
 Review comment:
   Missing `NOI18N`s?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to