NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
Jonathan Share Posted via mailing list.
|
Posted: Tue Oct 20, 2009 11:12 am Post subject: Problem running individual test case via maven |
|
|
Hi,
I have created a maven based tellurium project using their provided
archetype as documented here
http://code.google.com/p/aost/wiki/MavenHowTo#Create_a_New_Tellurium_Test_Project_using_Tellurium_Maven_Archet
Running both "mvn test" and "mvn test
-Dtest=test.GoogleSearchTestCase" from the command line works fine.
When I try and run the same goals in the NetBeans 6.7.1 IDE, right
clicking the project and choosing "Clean and build" works fine and
runs all tests correctly however if I choose "Test" or right click the
test file and choose "Test File" I get the following error:
java.lang.ExceptionInInitializerError
....
Caused by: java.lang.RuntimeException: Uncompilable source code -
module.GoogleSearchModule is not abstract and does not override
abstract method setMetaClass(groovy.lang.MetaClass) in
groovy.lang.GroovyObject
Is NetBeans trying to do something "clever" when running the tests and
how can I stop it?
It may also be relevant that I get the following warning at the top of
the test output:
WARNING: multiple versions of ant detected in path for junit
jar:file:/C:/Program%20Files/NetBeans%206.7.1/java2/ant/lib/ant.jar!/org/apache/tools/ant/Project.class
and jar:file:/C:/Documents%20and%20Settings/ext220/.m2/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.jar!/org/apache/tools/ant/Project.class
Thanks in advance for any help you can provide resolving this.
Regards,
Jonathan |
|
| Back to top |
|
 |
mkleint Posted via mailing list.
|
Posted: Tue Oct 20, 2009 11:22 am Post subject: Problem running individual test case via maven |
|
|
the maven projects have by default "compile On Save" enabled by default.
If you have problems with that setup, just disable it and do all
execution via maven.
Chech the project properties dialog, Compile panel
Milos
Jonathan Share wrote:
| Quote: | Hi,
I have created a maven based tellurium project using their provided
archetype as documented here
http://code.google.com/p/aost/wiki/MavenHowTo#Create_a_New_Tellurium_Test_Project_using_Tellurium_Maven_Archet
Running both "mvn test" and "mvn test
-Dtest=test.GoogleSearchTestCase" from the command line works fine.
When I try and run the same goals in the NetBeans 6.7.1 IDE, right
clicking the project and choosing "Clean and build" works fine and
runs all tests correctly however if I choose "Test" or right click the
test file and choose "Test File" I get the following error:
java.lang.ExceptionInInitializerError
....
Caused by: java.lang.RuntimeException: Uncompilable source code -
module.GoogleSearchModule is not abstract and does not override
abstract method setMetaClass(groovy.lang.MetaClass) in
groovy.lang.GroovyObject
Is NetBeans trying to do something "clever" when running the tests and
how can I stop it?
It may also be relevant that I get the following warning at the top of
the test output:
WARNING: multiple versions of ant detected in path for junit
jar:file:/C:/Program%20Files/NetBeans%206.7.1/java2/ant/lib/ant.jar!/org/apache/tools/ant/Project.class
and jar:file:/C:/Documents%20and%20Settings/ext220/.m2/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.jar!/org/apache/tools/ant/Project.class
Thanks in advance for any help you can provide resolving this.
Regards,
Jonathan
|
|
|
| Back to top |
|
 |
Jonathan Share Posted via mailing list.
|
Posted: Tue Oct 20, 2009 11:53 am Post subject: Problem running individual test case via maven |
|
|
2009/10/20 mkleint <address-removed>:
| Quote: | the maven projects have by default "compile On Save" enabled by default. If
you have problems with that setup, just disable it and do all execution via
maven.
Chech the project properties dialog, Compile panel
|
Thanks for the tip, that fixes the Test goal but not the Test File
goal. NetBeans tries to run mvn with an empty test argument....
NetBeans: Executing 'C:\Opt\apache-maven-2.2.1\bin\mvn.bat -Dtest=
-Dnetbeans.execution=true test-compile surefire:test'
Regards,
Jonathan |
|
| Back to top |
|
 |
mkleint Posted via mailing list.
|
Posted: Tue Oct 20, 2009 12:06 pm Post subject: Problem running individual test case via maven |
|
|
file it as a bug, along with a testcase sample project.
thanks
Milos
Jonathan Share wrote:
| Quote: | 2009/10/20 mkleint <address-removed>:
| Quote: | the maven projects have by default "compile On Save" enabled by default. If
you have problems with that setup, just disable it and do all execution via
maven.
Chech the project properties dialog, Compile panel
|
Thanks for the tip, that fixes the Test goal but not the Test File
goal. NetBeans tries to run mvn with an empty test argument....
NetBeans: Executing 'C:\Opt\apache-maven-2.2.1\bin\mvn.bat -Dtest=
-Dnetbeans.execution=true test-compile surefire:test'
Regards,
Jonathan
|
|
|
| Back to top |
|
 |
clebaudy
Joined: 06 Oct 2009 Posts: 34
|
Posted: Tue Mar 23, 2010 8:19 am Post subject: |
|
|
wow I experienced the same problem with 6.8, when compile on save is enable it tries to compile another projects class and it fails with this "uncompilable code error".
It is hard to see what kind of service this feature does but if it could be disabled by default in all maven projects it would be great (orelse I have to uncheck it in all projects)
it is named: compile on save but when I run the test it always save and compiles so I really don't see why there is another action named: compile on save. If its purpose is to compile all on the fly at real time then it is the kind of feature (always compile every byte, Eclipse inspirated feature) that I will always try to avoid. NetbeansNOTeclipse  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|