Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7162187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:41:37+00:00 2026-05-28T13:41:37+00:00

My junit tests run via ant 1.7 from within my Eclipse environment but the

  • 0

My junit tests run via ant 1.7 from within my Eclipse environment but the build failes when the junitreport task is performed:

BUILD FAILED
…/build.xml:222: Errors while applying transformations:
javax.xml.transform.TransformerException: java.lang.RuntimeException:
Use of the extension function ‘xalan://org.apache.tools.ant.util.StringUtils:replace’
is not allowed when the secure processing feature is set to true.

I tried to figure out how to make the junitreport task disable the secure processing feature (which I don’t need and is only in my way at this point) but I have no clue how since the task doesn’t have an attribute to disable it. Or should I do something else to make this work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:41:38+00:00Added an answer on May 28, 2026 at 1:41 pm

    This may be related to a very similar known bug in Ant 1.8.2.

    The bugfix for Ant 1.8.3 has been committed, but Apache Ant 1.8.3 has yet to be released as of Jan 25 2012. The WHATSNEW description for this bugfix is:

    <junitreport> did not work in embedded environments on JDK 7.
    Bugzilla Report 51668.
    

    Once Ant 1.8.3 is released and is incorporated into the Eclipse Ant plugin, this issue should be resolved.

    In the meantime, you can edit your build script so it only runs the JUnitReport target if running Ant from a command line, rather than from within Eclipse. To make this determination, look for a file present in your regular %ANT_HOME%/lib folder that is not present in your Eclipse Ant plugin folder (or create a file there), then set a property if the file is detected. E.G.

    Just before the end of your JUnit target:

    <available file="${ant.home}/lib/ant.pom" property="full.ant"/>
    

    At the beginning of your JUnitReport target:

      <target name="junitreport" description="Create a consolidated test results report" if="full.ant">
    

    The above Ant fragments work because ant.home is set to the Eclipse Ant Plugin folder only when Ant is run from within Eclipse. When Ant is run from a command line, ant.home will match your ANT_HOME environment variable. There is also supposed to be an eclipse.running Ant property, but I could not detect this property.

    Another interim option is to download the newest JAR files of Ant nightly builds from this link on the Apach Ant project page, then placing those JAR files within the corresponding Eclipse Ant plugin sub-folder. No guarantees this will work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From Eclipse I can easily run all the JUnit tests in my application. I
Is there a way to run JUnit-Tests from several projects conveniently fast in Eclipse?
I can't get my Junit tests to run from my build.xml script. I feel
root@ubuntu:/home/dj/workspace/TestProject# ant test Buildfile: /home/dj/workspace/TestProject/build.xml test: [junit] Testsuite: TestProject [junit] Tests run: 1, Failures:
Is it possible to run JUnit tests from inside my Java application? Are there
I'm trying to run my junit tests using ant. The tests are kicked off
I am configuring JUnit in Ant so that unit tests will be run on
I'm trying to execute JUnit-tests through a headless Eclipse in our build process. The
I am trying to use ant to run junit tests and generate reports. I
I would like to pass arguments to my JUnit tests from run configurations. How

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.