maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject maven-surefire and static-swamp
Date Mon, 30 May 2016 20:40:32 GMT
I was convinced maven-surefire-plugin classloader was mucked producing NoClassDefFoundError
 configed maven-surefire-plugin

useSystemClassLoader=true and useManifestOnlyJar=false.NoClassDefFoundError displayed..no
joy
<useSystemClassLoader>false</useSystemClassLoader>NoClassDefFoundError displayed..still
no joy

then i read this blog:http://javarevisited.blogspot.com/2011/06/noclassdeffounderror-exception-in.html
VM not initializing statics causes NCDFE ???

the original coder was obsessed with static singleton model
I ripped out all the statics and went with ctor and voila NoClassDefFoundError disappeared

environment:
Apache Maven 3.2.5
Java version: 1.8.0_40, vendor: Oracle CorporationJava home: /jdk1.8/jreDefault locale: en_US,
platform encoding: Cp1252
why adding static methods or static variables to a class called from maven-surefire-plugin
cause NoClassDefFoundError
?
Martin 

 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message