1 Reply Latest reply on Jan 25, 2006 6:38 PM by scurd

    Error when building from source

    scurd

      I was going to make some modifications to the UserPortlet as a test but can not get the project to build. This is the error I'm getting.

      BUILD FAILED
      C:\jboss-portal-2.2.1RC1-src\tools\etc\buildfragments\tools.ent:157: taskdef A class needed by class org.apache.cactus.integration.ant.CactusTask cannot be found: junit/framework/Test


      It seems like it is a classloader issue since I've confirmed the junit.jar is readable and accessible and contains the class. However, there are a lot of other modules included in the build.xml that seem to have their own version of the junit.jar.

      Any idea what I can do to get this thing to build. I'm using the JBoss IDE if that helps any. I've tried building using the ant script from within JBoss IDE/Eclipse and at the command line in both cygwin and DOS and I get the same error in all cases.

      Thanks,

      Steve

        • 1. Re: Error when building from source
          scurd

          I found the problem myself. To do the build from source, you need to add junit.jar to Ant's lib directory. Go to ANT_HOME/lib and copy junit.jar to it. Hope someone else finds this information useful.

          I think the reason it has to be there is because the CactusTask extends an AntTask and in order for Ant to compile a new task, it uses its own classpath to do so. That is why defining the location of junit.jar in the build.xml did not help. That's my best guess anyway.