Hi all,
today I tried to build synapse and got the following error during test
execution:
org.apache.maven.surefire.booter.SurefireExecutionException: Unable to instantia
te POJO 'class org.apache.synapse.transport.mail.TestFolder'; nested exception i
s java.lang.InstantiationException: org.apache.synapse.transport.mail.TestFolder
; nested exception is org.apache.maven.surefire.testset.TestSetFailedException:
Unable to instantiate POJO 'class org.apache.synapse.transport.mail.TestFolder';
nested exception is java.lang.InstantiationException: org.apache.synapse.transp
ort.mail.TestFolder
org.apache.maven.surefire.testset.TestSetFailedException: Unable to instantiate
POJO 'class org.apache.synapse.transport.mail.TestFolder'; nested exception is j
ava.lang.InstantiationException: org.apache.synapse.transport.mail.TestFolder
java.lang.InstantiationException: org.apache.synapse.transport.mail.TestFolder
at java.lang.Class.newInstance0(Class.java:340)
It seems as if the "not so clever" maven surefire-plugin tries to instantiate a
test class which in fact is no test class at all. Surefire blindly follows the
"Test*"-naming pattern. At least this applies to the surefire plugin version
2.3 which I use. If I remember correctly someone told me that this is fixed in
2.4 or 2.5. Not sure about that.
What version do you guys use? I was using vanilla Maven 2.0.9. I guess a few
people out there should have the same trouble. Wouldn't it be better to rename
this file?
For now I used -DskipTests, which was sufficient for me. Just wanted to let you
guys know about it.
Regards,
Eric