[committed] jme2 trunk does not build with maven due to test error


maven encountered DiskAngleTest.java and TubeAngleTest.java during testing and failed. Reason is that these are not junit-tests but meant as entry points for humans (much like the other Test* files within jmetest). To me it seems more appropriate to rename the files to TestDiskAngle, but since I encountered several exclusions of jmetest-files named *Test within the root pom, I just went this way and added the files ablove as exclusions too:

Index: pom.xml
--- pom.xml     (revision 4854)
+++ pom.xml     (working copy)
@@ -176,6 +176,8 @@
+                        <exclude>**/DiskAngleTest.java</exclude>
+                        <exclude>**/TubeAngleTest.java</exclude>

Would be really nice if either the files were renamed to Test* or these exclusions were added to the root pom; as currently the maven build is broken  :D


Hm, dont know about the maven script, but if it tries to set up JUnit tests something is wrong, jme2 has none of these afaik. So any JUnit stuff should be removed from the script anyway…

Had a closer look at the test setup.

  • There is a folder "junit" where all tests except those two offending ones from my first post are located.
  • The maven config also specifies the junit folder as test folder – good so far
  • Later, the src folder is also configured to be a test folder only to exclude everything therein that could be a test later on. This is  :?

    => So, a better fix would be to not register "src" as a test folder at all (and remove the now unneeded exclusions).

    By this, no tests are missing during maven build and the build won't break either!

Index: pom.xml
--- pom.xml   (revision 4854)
+++ pom.xml   (working copy)
@@ -147,36 +147,10 @@
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>add-test-source</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>add-test-source</goal>
-                        </goals>
-                        <configuration>
-                            <sources>
-                                <source>src</source>
-                            </sources>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                    <excludes>
-                        <exclude>jmetest/**/Test*.java</exclude>
-                        <exclude>**/JMESwingTest.java</exclude>
-                        <exclude>**/JMESWTTest.java</exclude>
-                        <exclude>**/JMEAppletTest.java</exclude>
-                        <exclude>**/JMEJOGLAWTTest.java</exclude>
-                        <exclude>**/JMEJOGLAWTInputTest.java</exclude>
-                    </excludes>

sounds good to me, there are only very few junit tests, and i think its not needed that they are run during a build.

The unit tests (all of em) will still be executed during build, as they lie in the "junit" folder.

Just the src folder should no longer be registered with maven as a folder for unit tests, as the classes that are called Test* or *Test are no real junit tests but howtos for humans (btw. really helpful ones!), but due to this naming scheme maven / junit thinks they are unit tests and fails by trying execute em.

ah, right :slight_smile:

do you commit normen ?

committed, also added 64 bit swt.jar