Could not create declaration for annotation

Anonymous
2011-10-09
2013-04-29

  • Anonymous
    2011-10-09

    Hello Everyone,
      I am having a problem getting my project to build after creating a unit test.  The exact errors are

    {      
          [apt] error: Could not create declaration for annotation type Before
          [apt] error: Could not create declaration for annotation type After
          [apt] error: Could not create declaration for annotation type Test
          [apt] error: Could not create declaration for annotation type BeforeClass
          [apt] error: Could not create declaration for annotation type RunWith
          [apt] error: Could not create declaration for annotation type AfterClass
    }
    

    The unit test runs fine, but when I go to build it chokes.  My unit test is in a directory adjacent to the services directory, so something like this com.blah.services.test.  Any help on where my unit test should be or how to get it to compile is greatly appreciated.

     

  • Anonymous
    2011-10-09

    Nevermind folks.  Digging through the build.xml file, it turns out that I had to put a copy of the junit jar in the /WEB-INF/lib directory.