A small think appeared to me today, regarding Netbeans.
I noticed that when I run a test for a single file (Right-click on the file, then Test):
The first time the test was running ok, but the second time, I had a strange error from Datanucleus, telling me my classes are wrong….
That was really annoying, so I checked a little bit further this and set debugging option to Maven and to Ant in the settings dialog.
The first time I test the file, I get this:
1 2 3 4 | NetBeans: Executing '/mnt/local/files/apache-maven-2.2.1/bin/mvn -Dtest=BasicTest -Dnetbeans.execution=true -debug test-compile surefire:test' NetBeans: JAVA_HOME=/mnt/local/files/jdk16+ Error stacktraces are turned on.Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)Java version: 1.6.0_17Java home: /mnt/local/files/jdk1.6.0_17/jreDefault locale: fr_FR, platform encoding: UTF-8OS name: "linux" version: "2.6.32.8-1-jolicloud" arch: "i386" Family: "unix" [DEBUG]Building Maven user-level plugin registry from: '/home/gerard/.m2/plugin-registry.xml'[DEBUG]Building Maven global-level plugin registry from: '/mnt/local/files/apache-maven-2.2.1/conf/plugin-registry.xml' Scanning for projects... |
Typicall maven stuff.
Now, the second time:
1 2 3 4 5 6 7 | Adding reference: ant.PropertyHelper Detected Java version: 1.6 in: /mnt/local/files/jdk1.6.0_17/jre Detected OS: Linux Adding reference: ant.ComponentHelper Trying to override old definition of task java +Datatype java org.apache.tools.ant.module.bridge.impl.ForkedJavaOverride parsing buildfile jar:file:/mnt/local/files/netbeans-6.8/java3/ant/nblib/org-netbeans-modules-ant-browsetask.jar!/org/netbeans/modules/ant/browsetask/antlib.xml with URI = jar:file:/mnt/local/files/netbeans-6.8/java3/ant/nblib/org-netbeans-modules-ant-browsetask.jar!/org/netbeans/modules/ant/browsetask/antlib.xml |
I don’t know why, but the second time Netbeans is running the unit test with Ant, and no more Maven. How can it be possible ?
What’s the point ? I wouldn’t care less if that didn’t make my test fail….
















Nice isn’t it ? 









Remember this game now ?

