[jira] [Assigned] (IVY-1609) Removal of WARN deprecation when not valid

2019-10-10 Thread Jaikiran Pai (Jira)


 [ 
https://issues.apache.org/jira/browse/IVY-1609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jaikiran Pai reassigned IVY-1609:
-

Assignee: Jaikiran Pai

> Removal of WARN deprecation when not valid
> --
>
> Key: IVY-1609
> URL: https://issues.apache.org/jira/browse/IVY-1609
> Project: Ivy
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.0-rc1
>Reporter: Greg Perry
>Assignee: Jaikiran Pai
>Priority: Minor
>  Labels: easyfix
>
> "WARN:  symlinkmass option has been deprecated and will no longer be 
> supported"  gets fed back as a problem message, even when this option is not 
> set.
> I noticed this when trying to get integration to work with embedding ivy.  
> The program which utilizes ivy checks ResolveReport.getAllProblemMessages()  
> after a resolve/retrieve is done.  
> It assumes something did not go correctly.
> I don't think its appropriate to send this back in getAllProblemMessages when 
> the  symlinkmass is not set.
> This could be fixed simply by testing if symlinkmass is being set to true in 
> the option
> RetrieveOptions.java line 184
> https://github.com/apache/ant-ivy/blob/master/src/java/org/apache/ivy/core/retrieve/RetrieveOptions.java#L183-L188
> 
> @Deprecated
> public RetrieveOptions setMakeSymlinksInMass(boolean makeSymlinksInMass) {
> this.makeSymlinksInMass = makeSymlinksInMass;
> *if (makeSymlinksInMass) {*
>  Message.warn("symlinkmass option has been deprecated and will no 
> longer be supported");
>  *}*
> return this;
> }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IVY-1609) Removal of WARN deprecation when not valid

2019-10-10 Thread Jaikiran Pai (Jira)


[ 
https://issues.apache.org/jira/browse/IVY-1609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16949137#comment-16949137
 ] 

Jaikiran Pai commented on IVY-1609:
---

Hello Greg,

Are you saying that this message gets logged when the `makeSymlinksInMass` 
attribute isn't being used (irrespective of the value)? The reason we added 
that message is to prevent users from using that attribute or the setter 
(irrespective of the value), so that we can just get rid of that setter in a 
future version. This will give users a chance to be aware that this 
method/attribute isnt' supposed to be used.

> Removal of WARN deprecation when not valid
> --
>
> Key: IVY-1609
> URL: https://issues.apache.org/jira/browse/IVY-1609
> Project: Ivy
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.0-rc1
>Reporter: Greg Perry
>Priority: Minor
>  Labels: easyfix
>
> "WARN:  symlinkmass option has been deprecated and will no longer be 
> supported"  gets fed back as a problem message, even when this option is not 
> set.
> I noticed this when trying to get integration to work with embedding ivy.  
> The program which utilizes ivy checks ResolveReport.getAllProblemMessages()  
> after a resolve/retrieve is done.  
> It assumes something did not go correctly.
> I don't think its appropriate to send this back in getAllProblemMessages when 
> the  symlinkmass is not set.
> This could be fixed simply by testing if symlinkmass is being set to true in 
> the option
> RetrieveOptions.java line 184
> https://github.com/apache/ant-ivy/blob/master/src/java/org/apache/ivy/core/retrieve/RetrieveOptions.java#L183-L188
> 
> @Deprecated
> public RetrieveOptions setMakeSymlinksInMass(boolean makeSymlinksInMass) {
> this.makeSymlinksInMass = makeSymlinksInMass;
> *if (makeSymlinksInMass) {*
>  Message.warn("symlinkmass option has been deprecated and will no 
> longer be supported");
>  *}*
> return this;
> }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (IVY-1610) Invalid collision should not error retrieve

2019-10-10 Thread Jaikiran Pai (Jira)


 [ 
https://issues.apache.org/jira/browse/IVY-1610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jaikiran Pai reassigned IVY-1610:
-

Assignee: Jaikiran Pai

> Invalid collision should not error retrieve
> ---
>
> Key: IVY-1610
> URL: https://issues.apache.org/jira/browse/IVY-1610
> Project: Ivy
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.0-rc1
>Reporter: Greg Perry
>Assignee: Jaikiran Pai
>Priority: Major
>
> I get the following master branch:
> *Multiple artifacts of the module com.google.protobuf#protobuf-java;3.4.0 are 
> retrieved to the same file! Update the retrieve pattern  to fix this error*
> The retrieve pattern I am using is :
> *[originalname].[ext]*
> within my Ivy.xml file I'm not directly pulling in the dependency of 
> protobuf, so its coming in as a transitive (probably twice or even 3 times)
> I suspect 2 transitives are using the same library and the retrieve is upset 
> because it will be overwriting it.
> If 2 or more transitives have the same groupId, artifactId, and versionId, 
> they effectively "are" the same file - so retrieve should not error out.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (IVY-1610) Invalid collision should not error retrieve

2019-10-10 Thread Jaikiran Pai (Jira)


 [ 
https://issues.apache.org/jira/browse/IVY-1610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jaikiran Pai resolved IVY-1610.
---
Fix Version/s: master
   Resolution: Fixed

I think this is the same as what Sebastian mentioned in one of the comments in 
IVY-1586. I have pushed a fix for it as noted here 
https://issues.apache.org/jira/browse/IVY-1586?focusedCommentId=16949134=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16949134

> Invalid collision should not error retrieve
> ---
>
> Key: IVY-1610
> URL: https://issues.apache.org/jira/browse/IVY-1610
> Project: Ivy
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.0-rc1
>Reporter: Greg Perry
>Assignee: Jaikiran Pai
>Priority: Major
> Fix For: master
>
>
> I get the following master branch:
> *Multiple artifacts of the module com.google.protobuf#protobuf-java;3.4.0 are 
> retrieved to the same file! Update the retrieve pattern  to fix this error*
> The retrieve pattern I am using is :
> *[originalname].[ext]*
> within my Ivy.xml file I'm not directly pulling in the dependency of 
> protobuf, so its coming in as a transitive (probably twice or even 3 times)
> I suspect 2 transitives are using the same library and the retrieve is upset 
> because it will be overwriting it.
> If 2 or more transitives have the same groupId, artifactId, and versionId, 
> they effectively "are" the same file - so retrieve should not error out.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IVY-1586) Retrieves test-library instead of binary-library

2019-10-10 Thread Jaikiran Pai (Jira)


[ 
https://issues.apache.org/jira/browse/IVY-1586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16949134#comment-16949134
 ] 

Jaikiran Pai commented on IVY-1586:
---

[~snagel], I just pushed a fix which I believe should fix the "Multiple 
artifacts of the module .. are retrieved to the same file!". It was a genuine 
bug. Thank you for reporting it. As usual please try the latest nightly when 
you get a chance. I plan to release Ivy soon, so it would be good to have this 
verified.

> Retrieves test-library instead of binary-library
> 
>
> Key: IVY-1586
> URL: https://issues.apache.org/jira/browse/IVY-1586
> Project: Ivy
>  Issue Type: Bug
>  Components: Ant
>Affects Versions: 2.5.0-rc1
> Environment: Eclipse Photon 4.8.0 64bit
> Ant 1.10.3.v20180417-1627
> Apache IvyDE 2.2.0.final-201311091524-RELEASE
> Apache Ivy 2.5.0.cr1_20180412005306
>Reporter: Arni Schulze
>Assignee: Jaikiran Pai
>Priority: Blocker
> Fix For: master
>
> Attachments: Ant_1st_output.txt, Ant_2nd_output.txt, build.xml, 
> ivy-1586-test.zip, ivy.xml
>
>
> If I delete the local Ivy cache and run my Ant script to retrieve 
> "ch.quos.logback logback-classic 1.2.3" I get the correct library and its 
> dependencies (see Ant_1st_output).
> But if I run the Ant script again (now having a local Ivy cache) it retrieves 
> the test-library and the test-library of the dependencies instead of the 
> correct ones (see Ant_2nd_output).
> I added minimalistic ivy.xml and Ant script. Because of the different 
> behavior of the first and every other run, I think this is a bug in Ivy.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[ant-ivy] branch master updated: IVY-1586 IVY-1610 Make sure that empty value of "classifier" in pom.xml is considered the same as classifier not being specified

2019-10-10 Thread jaikiran
This is an automated email from the ASF dual-hosted git repository.

jaikiran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant-ivy.git


The following commit(s) were added to refs/heads/master by this push:
 new 400cb51  IVY-1586 IVY-1610 Make sure that empty value of "classifier" 
in pom.xml is considered the same as classifier not being specified
400cb51 is described below

commit 400cb51d07f867ff26bc8d367dbce22d883645e4
Author: Jaikiran Pai 
AuthorDate: Fri Oct 11 10:20:34 2019 +0530

IVY-1586 IVY-1610 Make sure that empty value of "classifier" in pom.xml is 
considered the same as classifier not being specified
---
 .../apache/ivy/plugins/parser/m2/PomReader.java| 22 +++---
 .../1580-foo-impl/1.2.3/1580-foo-impl-1.2.3.pom|  4 
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java 
b/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java
index fb15e23..88c9d70 100644
--- a/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java
+++ b/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java
@@ -510,23 +510,39 @@ public class PomReader {
 @Override
 public String getScope() {
 String val = getFirstChildText(depElement, SCOPE);
-return replaceProps(val);
+return emptyIsNull(replaceProps(val));
 }
 
 public String getClassifier() {
 String val = getFirstChildText(depElement, CLASSIFIER);
-return replaceProps(val);
+return emptyIsNull(replaceProps(val));
 }
 
 public String getType() {
 String val = getFirstChildText(depElement, TYPE);
-return replaceProps(val);
+return emptyIsNull(replaceProps(val));
 }
 
 public boolean isOptional() {
 return Boolean.parseBoolean(getFirstChildText(depElement, 
OPTIONAL));
 }
 
+/**
+ * We return null where certain elements within a pom don't have a 
value specified.
+ * For example, there are pom.xml out there which just use 
"" in the dependencies.
+ * (dependencies in org.seleniumhq.selenium:selenium-java:3.141.59 are 
one such example)
+ * We do this so that callers of such elements don't have to keep 
repeating checks for empty value.
+ * For us an empty value, for many of such elements, is really the 
same as that element not being specified
+ *
+ * @param val The value to check
+ * @return
+ */
+private String emptyIsNull(final String val) {
+if (val == null) {
+return null;
+}
+return val.equals("") ? null : val;
+}
 }
 
 public class PomProfileElement {
diff --git 
a/test/repositories/m2/org/apache/1580-foo-impl/1.2.3/1580-foo-impl-1.2.3.pom 
b/test/repositories/m2/org/apache/1580-foo-impl/1.2.3/1580-foo-impl-1.2.3.pom
index 9b2a7ea..4beff33 100644
--- 
a/test/repositories/m2/org/apache/1580-foo-impl/1.2.3/1580-foo-impl-1.2.3.pom
+++ 
b/test/repositories/m2/org/apache/1580-foo-impl/1.2.3/1580-foo-impl-1.2.3.pom
@@ -31,6 +31,10 @@
 org.apache
 1580-foo-api
 ${project.version}
+
+
 
 
 



[jira] [Commented] (IVY-1610) Invalid collision should not error retrieve

2019-10-10 Thread Jaikiran Pai (Jira)


[ 
https://issues.apache.org/jira/browse/IVY-1610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16949094#comment-16949094
 ] 

Jaikiran Pai commented on IVY-1610:
---

Hello Greg,

Is there a ivy.xml that you can attach which reproduces this?

> Invalid collision should not error retrieve
> ---
>
> Key: IVY-1610
> URL: https://issues.apache.org/jira/browse/IVY-1610
> Project: Ivy
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.0-rc1
>Reporter: Greg Perry
>Priority: Major
>
> I get the following master branch:
> *Multiple artifacts of the module com.google.protobuf#protobuf-java;3.4.0 are 
> retrieved to the same file! Update the retrieve pattern  to fix this error*
> The retrieve pattern I am using is :
> *[originalname].[ext]*
> within my Ivy.xml file I'm not directly pulling in the dependency of 
> protobuf, so its coming in as a transitive (probably twice or even 3 times)
> I suspect 2 transitives are using the same library and the retrieve is upset 
> because it will be overwriting it.
> If 2 or more transitives have the same groupId, artifactId, and versionId, 
> they effectively "are" the same file - so retrieve should not error out.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IVY-1611) Need embedded way of getting log messages

2019-10-10 Thread Jaikiran Pai (Jira)


[ 
https://issues.apache.org/jira/browse/IVY-1611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16949089#comment-16949089
 ] 

Jaikiran Pai commented on IVY-1611:
---

> In 2.4.x - this was possible :
> Main.setLogger(new IvyWrapperLogger(Message.MSG_INFO));

I don't see Main.setLogger being available in 2.4.x 
[https://github.com/apache/ant-ivy/blob/2.4.0/src/java/org/apache/ivy/Main.java.]
 Are you sure this Main class belongs to Ivy?

> Need embedded way of getting log messages
> -
>
> Key: IVY-1611
> URL: https://issues.apache.org/jira/browse/IVY-1611
> Project: Ivy
>  Issue Type: Bug
>Reporter: Greg Perry
>Priority: Major
>
> In 2.4.x - this was possible :
> Main.setLogger(new IvyWrapperLogger(Message.MSG_INFO));
> And allowed logging messages to be propagated to the host application.
> Now setLogger is either gone or private.
> I tried this in 2.5.x
> ivy.getLoggerEngine().pushLogger(new IvyWrapperLogger(Message.MSG_INFO));
> but I suspect it gets "popped" before 
> ResolveReport report = Main.run(cmd)is called



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


Jenkins build is back to stable : Ant-Build-Matrix-master-Linux » xenial,JDK 11 (latest) #1567

2019-10-10 Thread Apache Jenkins Server
See 




Jenkins build became unstable: Ant Master Compatibility Linux » xenial,JDK 1.8 (latest) #22

2019-10-10 Thread Apache Jenkins Server
See 




[ant] branch master updated: bz-63827 Minor change

2019-10-10 Thread jaikiran
This is an automated email from the ASF dual-hosted git repository.

jaikiran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git


The following commit(s) were added to refs/heads/master by this push:
 new a7a1906  bz-63827 Minor change
a7a1906 is described below

commit a7a19068069b58c1a63dcc26361cddb79b9da158
Author: Jaikiran Pai 
AuthorDate: Thu Oct 10 17:08:54 2019 +0530

bz-63827 Minor change
---
 .../ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
 
b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
index bf42199..13e552c 100644
--- 
a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
+++ 
b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
@@ -284,7 +284,7 @@ class LegacyXmlResultFormatter extends 
AbstractJUnitResultFormatter implements T
 }
 writer.writeAttribute(ATTR_TYPE, t.getClass().getName());
 // write out the stacktrace
-writer.writeCData(StringUtils.getStackTrace(cause.get()));
+writer.writeCData(StringUtils.getStackTrace(t));
 }
 writer.writeEndElement();
 }
@@ -303,7 +303,7 @@ class LegacyXmlResultFormatter extends 
AbstractJUnitResultFormatter implements T
 }
 writer.writeAttribute(ATTR_TYPE, t.getClass().getName());
 // write out the stacktrace
-writer.writeCData(StringUtils.getStackTrace(cause.get()));
+writer.writeCData(StringUtils.getStackTrace(t));
 }
 writer.writeEndElement();
 }



Jenkins build is back to stable : Ant-Build-Matrix-master-Linux » xenial,JDK 1.9 (latest) #1566

2019-10-10 Thread Apache Jenkins Server
See 




Jenkins build is back to stable : Ant Master Compatibility Linux » xenial,JDK 13 (latest) #21

2019-10-10 Thread Apache Jenkins Server
See 




Jenkins build is back to stable : Ant Master Compatibility Linux » xenial,JDK 1.9 (latest) #21

2019-10-10 Thread Apache Jenkins Server
See 




Jenkins build is back to stable : Ant Master Compatibility Linux » xenial,JDK 10 (latest) #21

2019-10-10 Thread Apache Jenkins Server
See 




Jenkins build became unstable: Ant-Build-Matrix-master-Linux » xenial,JDK 1.9 (latest) #1565

2019-10-10 Thread Apache Jenkins Server
See 




Jenkins build became unstable: Ant-Build-Matrix-master-Linux » xenial,JDK 11 (latest) #1565

2019-10-10 Thread Apache Jenkins Server
See 




Jenkins build became unstable: Ant Master Compatibility Linux » xenial,JDK 13 (latest) #20

2019-10-10 Thread Apache Jenkins Server
See 




[Bug 63827] LegacyXmlResultFormatter of JUnitLauncher Task does not write StackTrace of failure

2019-10-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63827

--- Comment #4 from Jaikiran Pai  ---
> Just one question, why using "cause.get()" when "t" is already a final 
> variable (of "cause.get()")?

Because working on too many unrelated things and not focusing enough for a
"simple fix" :) You are right though, we can just use "t" there. I'll probably
get to it later.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Jenkins build became unstable: Ant Master Compatibility Linux » xenial,JDK 1.9 (latest) #20

2019-10-10 Thread Apache Jenkins Server
See 




[Bug 63827] LegacyXmlResultFormatter of JUnitLauncher Task does not write StackTrace of failure

2019-10-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63827

--- Comment #3 from mse...@guh-software.de ---
Great :)

Just one question, why using "cause.get()" when "t" is already a final variable
(of "cause.get()")?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Jenkins build is back to stable : Ant Master Compatibility Linux » xenial,JDK 12 (latest) #20

2019-10-10 Thread Apache Jenkins Server
See 




[Bug 63827] LegacyXmlResultFormatter of JUnitLauncher Task does not write StackTrace of failure

2019-10-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63827

Jaikiran Pai  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED
   Target Milestone|--- |1.10.8
 OS||All

--- Comment #2 from Jaikiran Pai  ---
Hello mseele, I actually pushed a commit a few minutes before I saw you upload
this patch. I see that I missed the "aborted" section. I have now pushed
another commit to fix that too. Thank you for reporting this issue as well as
taking time to create a patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[ant] branch master updated: bz-63827 Print out stacktrace in "legacy-xml" when the test is aborted too

2019-10-10 Thread jaikiran
This is an automated email from the ASF dual-hosted git repository.

jaikiran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git


The following commit(s) were added to refs/heads/master by this push:
 new 02ffb25  bz-63827 Print out stacktrace in "legacy-xml" when the test 
is aborted too
02ffb25 is described below

commit 02ffb258c880a40c06048f33decf17bd63094ec4
Author: Jaikiran Pai 
AuthorDate: Thu Oct 10 14:18:59 2019 +0530

bz-63827 Print out stacktrace in "legacy-xml" when the test is aborted too
---
 .../ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java   | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
 
b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
index 6ea6e7b..bf42199 100644
--- 
a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
+++ 
b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
@@ -302,6 +302,8 @@ class LegacyXmlResultFormatter extends 
AbstractJUnitResultFormatter implements T
 writer.writeAttribute(ATTR_MESSAGE, message);
 }
 writer.writeAttribute(ATTR_TYPE, t.getClass().getName());
+// write out the stacktrace
+writer.writeCData(StringUtils.getStackTrace(cause.get()));
 }
 writer.writeEndElement();
 }



Jenkins build became unstable: Ant Master Compatibility Linux » xenial,JDK 10 (latest) #20

2019-10-10 Thread Apache Jenkins Server
See 




[Bug 63827] LegacyXmlResultFormatter of JUnitLauncher Task does not write StackTrace of failure

2019-10-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63827

--- Comment #1 from mse...@guh-software.de ---
Created attachment 36816
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36816=edit
Patch which adds Stacktrace to failures & abortions (without filtering the
stacktrace)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[ant] branch master updated: bz-63827 Print out the stacktrace when writing out the XML from "legacy-xml" formatter of junitlauncher

2019-10-10 Thread jaikiran
This is an automated email from the ASF dual-hosted git repository.

jaikiran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git


The following commit(s) were added to refs/heads/master by this push:
 new 23a3665  bz-63827 Print out the stacktrace when writing out the XML 
from "legacy-xml" formatter of junitlauncher
23a3665 is described below

commit 23a3665c3ee78c6b7eeaddee4cde72f72270
Author: Jaikiran Pai 
AuthorDate: Thu Oct 10 13:53:00 2019 +0530

bz-63827 Print out the stacktrace when writing out the XML from 
"legacy-xml" formatter of junitlauncher
---
 WHATSNEW   | 7 +++
 .../taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java  | 3 +++
 2 files changed, 10 insertions(+)

diff --git a/WHATSNEW b/WHATSNEW
index a26a9f3..ab9d210 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -1,6 +1,13 @@
 Changes from Ant 1.10.7 TO Ant 1.10.8
 =
 
+Fixed bugs:
+---
+
+ * "legacy-xml" formatter of junitlauncher task wasn't writing out
+   the stacktrace for failures. This is now fixed.
+   Bugzilla Report 63827
+
 Other changes:
 --
 
diff --git 
a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
 
b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
index 91caca6..6ea6e7b 100644
--- 
a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
+++ 
b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
@@ -19,6 +19,7 @@ package org.apache.tools.ant.taskdefs.optional.junitlauncher;
 
 import org.apache.tools.ant.util.DOMElementWriter;
 import org.apache.tools.ant.util.DateUtils;
+import org.apache.tools.ant.util.StringUtils;
 import org.junit.platform.engine.TestExecutionResult;
 import org.junit.platform.engine.TestSource;
 import org.junit.platform.engine.reporting.ReportEntry;
@@ -282,6 +283,8 @@ class LegacyXmlResultFormatter extends 
AbstractJUnitResultFormatter implements T
 writer.writeAttribute(ATTR_MESSAGE, message);
 }
 writer.writeAttribute(ATTR_TYPE, t.getClass().getName());
+// write out the stacktrace
+writer.writeCData(StringUtils.getStackTrace(cause.get()));
 }
 writer.writeEndElement();
 }



[Bug 63827] New: LegacyXmlResultFormatter of JUnitLauncher Task does not write StackTrace of failure

2019-10-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63827

Bug ID: 63827
   Summary: LegacyXmlResultFormatter of JUnitLauncher Task does
not write StackTrace of failure
   Product: Ant
   Version: 1.10.7
  Hardware: PC
Status: NEW
  Severity: major
  Priority: P2
 Component: Optional Tasks
  Assignee: notifications@ant.apache.org
  Reporter: mse...@guh-software.de
  Target Milestone: ---

Switching from JUnit 4 to JUnit 5 we detected that LegacyXmlResultFormatter
does not write the StackTrace of a failure into the xml. Only the message is
stored.
Which makes troubleshooting very hard on failed tests.

Please see JUnit 5 code here:
https://github.com/apache/ant/blob/26b8a01e6421d22a2ca4393ab1420444b07a0bfd/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java#L279

This is how the JUnit 4 code does it:
https://github.com/apache/ant/blob/3a4980e3c4be56745964442abc01360b618e3a85/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java#L316

final String strace = JUnitTestRunner.getFilteredTrace(t);
final Text trace = doc.createTextNode(strace);
nested.appendChild(trace);

These tree lines are missing in LegacyXmlResultFormatter for JUnit5.

I can add a patch for this if desired!?

-- 
You are receiving this mail because:
You are the assignee for the bug.