Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Solaris 9, maven 1.0, sun jdk 1.4.2_03
-
Number of attachments :
Description
when running a sub level project the test:compile somehow gets confused and doesn't include the <unitTest><includes>. hence, the test fails with a class not found on the Test class itself. the exact same project.xml file works fine in rc2. the debug output from 1.0:
—
test:compile:
[available] [DEBUG] class "X" was not found
[available] [VERBOSE] Unable to load class X to set property classPresent
[javac] [DEBUG] fileset: Setup scanner in dir /home/dflesner/ct/dev/ims/components/authn/components/authn-cmd/test/java with patternSet{ includes: [**/*Command.java] excludes: [**/package.html] }
--the same output from rc2--
test:compile:
[javac] [DEBUG] fileset: Setup scanner in dir /home/dflesner/ct/dev/ims/components/authn/components/authn-cmd/test/java with patternSet{ includes: [] excludes: [**/package.html] }
[javac] [VERBOSE] com/rsa/authn/LoginCommandTest.java added as com/rsa/authn/LoginCommandTest.class doesn't exist.
[javac] [VERBOSE] com/rsa/authn/LogoutCommandTest.java added as com/rsa/authn/LogoutCommandTest.class doesn't exist.
[javac] Compiling 2 source files to /home/dflesner/ct/dev/ims/components/authn/components/authn-cmd/target/test-classes
—
notice the includes is different. the includes is actually the src modifications not the test includes?
my project.xml excerpt
—
<build>
<sourceDirectory>../../src/java</sourceDirectory>
<resources>
<resource>
<directory>src/java/</directory>
<includes>
<include>*/.properties</include>
</includes>
</resource>
</resources>
<sourceModifications>
<sourceModification>
<className>X</className>
<includes>
<include>**/*Command.java</include>
</includes>
</sourceModification>
</sourceModifications>
<unitTestSourceDirectory>test/java</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
</unitTest>
</build>
---the actual error in the test log
Null Test: Caused an ERROR
com.rsa.authn.LoginCommandTest
java.lang.ClassNotFoundException: com.rsa.authn.LoginCommandTest
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
debug output