Don't use the borked j2ee.jar from the java.net or java.net2 maven
repositories.

I had the same problem.  Basically, the j2ee.jar on the java.net repos is
not a real jar, just stripped classes that have no method bodies, but just
the method definitions.

The borked jar is only good for compiling. I had an argument with the guy
who posted it where I pointed out
"why-the-f*ck-would-you-want-a-jar-that-you-cannot-run-unit-tests-against-in-a-maven-repository"
and he seemed to think that not running unit tests was a perfectly valid use
case and sure nobody using maven runs unit tests all the time, and sure
could they not just compile and package the jar...

He did not seem to get the whole lifecycle thing about maven2 at all

On Jan 23, 2008 11:27 PM, Derry Cannon <[EMAIL PROTECTED]> wrote:

> Hey, there!
>
> I've got a JUnit 4.2 test that tests a simple little email address
> validator.  The validator uses javax.mail.internet.InternetAddress.
> Everything works fine in Eclipse when I run it as a JUnit Test.  However,
> when I try to install the project containing the JUnit test, it fails on
> the
> surefire:test with the following:
>
> java.lang.ClassFormatError: Absent Code attribute in method that is not
> native or abstract in class file javax/mail/internet/AddressException.
>
> Can anyone suggest what to do differently to make the JUnit test run
> properly during the surefire:test?
>
> Thanks much!
> Derry
>

Reply via email to