Any attempt to use <junitreport> (in the default "frames" mode) inside the IDE
running JDK 7 fails:
Errors while applying transformations:
javax.xml.transform.TransformerException: java.lang.RuntimeException: Use of
the extension element 'redirect' is not allowed when the secure processing
feature is set to true.
at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:720)
at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:317)
at
org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:194)
at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:852)
at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:388)
at
org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer.transform(AggregateTransformer.java:264)
at
org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator.execute(XMLResultAggregator.java:158)
The same works outside the IDE using JDK 7, or inside the IDE using JDK 6.
=============================================================
This error still present and is a real issue, the problem occurs when use ANT
1.8.2(Netbeans's default lib) and JDK7 and you try to transform the XML file
using Ant file.
Expected Result: The must recently ANT lib should be contained in Netbeans.
Work Around: use apache-ant-1.8.3 with JDK-7 or use apache-ant-1.8.2 with JDK-6
==============================================================
如果现在使用的Eclipse的Ant版本低于1.8.3,那么可以手动更新Eclipse中的Ant版本,更新办法见http://zorro.blog.51cto.com/2139862/839046
转载于:https://blog.51cto.com/zorro/839041
使用JDK7及Ant 1.8.2在IDE内尝试运行<junitreport>时出现错误,提示secure processing特性开启下不允许使用'redirect'扩展元素。此问题在JDK6或IDE外则不会出现。解决方法为升级Ant到1.8.3版本或回退JDK到6版本。
1万+

被折叠的 条评论
为什么被折叠?



