Hi Jo,

The ReloadableClassLoader was copied into the test sources. That's why
there is no dependency for that one.

The class it could not find was not ReloadableClassLoader, but the class
I want to load. This is actually the class under test. 

        313 [main] ERROR nl.xup.prefs.memoryprefs.PreferencesTestBase -
Faild reloading nl.xup.prefs.memoryprefs.MemoryPreferencesFactory
        java.lang.ClassNotFoundException:
nl.xup.prefs.memoryprefs.MemoryPreferencesFactory 
        ...

Some more detailed output can be found below.

BTW, thanks for the quick responses :-)

Regards,

Minto


Snippet of the "mvn test -X" ouput:
==================================
<snip>
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[DEBUG] nl.xup.prefs:memoryprefs:jar:1.0-SNAPSHOT (selected for null)
[DEBUG]   org.slf4j:slf4j-api:jar:1.4.0:compile (selected for compile)
[DEBUG]   junit:junit:jar:4.3.1:test (selected for test)
[DEBUG]   org.slf4j:slf4j-simple:jar:1.4.0:test (selected for test)
[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-compiler-plugin:2.0:testCompile' -->
[DEBUG]   (f) basedir = K:\Sources\Prefs\memoryprefs
[DEBUG]   (f) buildDirectory = K:\Sources\Prefs\memoryprefs\target
[DEBUG]   (f) classpathElements =
[K:\Sources\Prefs\memoryprefs\target\classes,
K:\Sources\Prefs\memoryprefs\target\test-classes,
K:\Repositories\maven2\.m2\repository\junit\junit\4.3.1\junit-4.3.1.jar,
K:\Repositories\maven2\.m2\repository\org\slf4j\slf4j-simple\1.4.0\slf4j
-simple-1.4.0.jar,
K:\Repositories\maven2\.m2\repository\org\slf4j\slf4j-api\1.4.0\slf4j-ap
i-1.4.0.jar]
[DEBUG]   (f) compileSourceRoots =
[K:\Sources\Prefs\memoryprefs\src\test\java]
[DEBUG]   (f) compilerId = javac
[DEBUG]   (f) debug = true
[DEBUG]   (f) fork = false
[DEBUG]   (f) optimize = false
[DEBUG]   (f) outputDirectory =
K:\Sources\Prefs\memoryprefs\target\test-classes
[DEBUG]   (f) outputFileName = memoryprefs-1.0-SNAPSHOT
[DEBUG]   (f) source = 1.4
[DEBUG]   (f) staleMillis = 0
[DEBUG]   (f) target = 1.4
[DEBUG]   (f) verbose = false
[DEBUG] -- end configuration --
[INFO] [compiler:testCompile]
[DEBUG] Using compiler 'javac'.
[DEBUG] Source directories: [K:\Sources\Prefs\memoryprefs\src\test\java]
[DEBUG] Classpath: [K:\Sources\Prefs\memoryprefs\target\classes
 K:\Sources\Prefs\memoryprefs\target\test-classes
 K:\Repositories\maven2\.m2\repository\junit\junit\4.3.1\junit-4.3.1.jar
 
K:\Repositories\maven2\.m2\repository\org\slf4j\slf4j-simple\1.4.0\slf4j
-simple-1.4.0.jar
 
K:\Repositories\maven2\.m2\repository\org\slf4j\slf4j-api\1.4.0\slf4j-ap
i-1.4.0.jar]
[DEBUG] Output directory:
K:\Sources\Prefs\memoryprefs\target\test-classes
[INFO] Nothing to compile - all classes are up to date
[DEBUG] nl.xup.prefs:memoryprefs:jar:1.0-SNAPSHOT (selected for null)
[DEBUG]   org.slf4j:slf4j-api:jar:1.4.0:compile (selected for compile)
[DEBUG]   junit:junit:jar:4.3.1:test (selected for test)
[DEBUG]   org.slf4j:slf4j-simple:jar:1.4.0:test (selected for test)
[DEBUG]
org.apache.maven.plugins:maven-surefire-plugin:maven-plugin:2.1.2:runtim
e (selected for runtime)
[DEBUG] Retrieving parent-POM:
org.apache.maven.surefire:surefire-root::1.1 for project:
null:surefire-booter:jar:1.5.2 from the repository.
[DEBUG]   org.apache.maven.surefire:surefire-booter:jar:1.5.2:runtime
(selected for runtime)
[DEBUG]     junit:junit:jar:3.8.1:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM:
org.apache.maven.surefire:surefire-root::1.1 for project:
null:surefire:jar:1.5.2 from the repository.
[DEBUG]     org.apache.maven.surefire:surefire:jar:1.5.2:runtime
(selected for runtime)
[DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus::1.0.4 for
project: null:plexus-utils:jar:1.0.5 from the repository.
[DEBUG]       org.codehaus.plexus:plexus-utils:jar:1.0.5:runtime
(selected for runtime)
[DEBUG]         classworlds:classworlds:jar:1.1-alpha-2:runtime
(selected for runtime)
[DEBUG]   org.apache.maven:maven-plugin-api:jar:2.0:runtime (selected
for runtime)
[DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.0.5:runtime (removed -
nearer found: 1.0.4)
[DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (selected
for runtime)
[DEBUG]   org.apache.maven.surefire:surefire:jar:1.5.2:runtime (selected
for runtime)
[DEBUG]     org.codehaus.plexus:plexus-utils:jar:1.0.5:runtime (removed
- nearer found: 1.0.4)
[DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.1:runtime (removed -
nearer found: 1.0.4)
[DEBUG]   org.apache.maven:maven-artifact:jar:2.0:runtime (selected for
runtime)
[DEBUG]   junit:junit:jar:3.8.1:runtime (selected for runtime)
[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-surefire-plugin:2.1.2:test' -->
[DEBUG]   (f) basedir = K:\Sources\Prefs\memoryprefs
[DEBUG]   (f) childDelegation = true
[DEBUG]   (f) classesDirectory =
K:\Sources\Prefs\memoryprefs\target\classes
[DEBUG]   (f) classpathElements =
[K:\Sources\Prefs\memoryprefs\target\classes,
K:\Sources\Prefs\memoryprefs\target\test-classes,
K:\Repositories\maven2\.m2\repository\junit\junit\4.3.1\junit-4.3.1.jar,
K:\Repositories\maven2\.m2\repository\org\slf4j\slf4j-simple\1.4.0\slf4j
-simple-1.4.0.jar,
K:\Repositories\maven2\.m2\repository\org\slf4j\slf4j-api\1.4.0\slf4j-ap
i-1.4.0.jar]
[DEBUG]   (f) forkMode = none
[DEBUG]   (f) jvm = java
[DEBUG]   (f) localRepository = [local] ->
file://K:\Repositories\maven2\.m2\repository
[DEBUG]   (f) pluginArtifacts =
[org.apache.maven.surefire:surefire-booter:jar:1.5.2:runtime,
org.apache.maven.surefire:surefire:jar:1.5.2:runtime,
org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime,
junit:junit:jar:3.8.1:runtime,
org.apache.maven:maven-plugin-api:jar:2.0:runtime,
org.codehaus.plexus:plexus-utils:jar:1.1:runtime,
org.apache.maven:maven-artifact:jar:2.0:runtime]
[DEBUG]   (f) printSummary = true
[DEBUG]   (f) reportFormat = brief
[DEBUG]   (f) reportsDirectory =
K:\Sources\Prefs\memoryprefs\target/surefire-reports
[DEBUG]   (f) testClassesDirectory =
K:\Sources\Prefs\memoryprefs\target\test-classes
[DEBUG]   (f) useFile = true
[DEBUG] -- end configuration --
[INFO] [surefire:test]
[INFO] Setting reports dir:
K:\Sources\Prefs\memoryprefs\target/surefire-reports
[DEBUG] Test Classpath :
[DEBUG] K:\Sources\Prefs\memoryprefs\target\test-classes
[DEBUG] K:\Sources\Prefs\memoryprefs\target\classes
[DEBUG] K:\Sources\Prefs\memoryprefs\target\classes
[DEBUG] K:\Sources\Prefs\memoryprefs\target\test-classes
[DEBUG]
K:\Repositories\maven2\.m2\repository\junit\junit\4.3.1\junit-4.3.1.jar
[DEBUG]
K:\Repositories\maven2\.m2\repository\org\slf4j\slf4j-simple\1.4.0\slf4j
-simple-1.4.0.jar
[DEBUG]
K:\Repositories\maven2\.m2\repository\org\slf4j\slf4j-api\1.4.0\slf4j-ap
i-1.4.0.jar
[DEBUG] Adding to surefire test classpath:
K:\Repositories\maven2\.m2\repository\org\apache\maven\surefire\surefire
-booter\1.5.2\surefire-booter-1.5.2.jar
[DEBUG] Adding to surefire test classpath:
K:\Repositories\maven2\.m2\repository\org\apache\maven\surefire\surefire
\1.5.2\surefire-1.5.2.jar
[DEBUG] Adding to surefire test classpath:
K:\Repositories\maven2\.m2\repository\org\codehaus\plexus\plexus-utils\1
0.4\plexus-utils-1.0.4.jar
[DEBUG] Adding to surefire test classpath:
K:\Repositories\maven2\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar
[DEBUG] Adding to surefire test classpath:
K:\DevTools\maven\maven-2.0.6\lib\maven-core-2.0.6-uber.jar
<snap>


-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens
Vandermeeren, Jo
Verzonden: vrijdag 8 juni 2007 14:09
Aan: Maven Users List
Onderwerp: Re: Classpath issues with maven 2.0.6

On 6/8/07, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
>
>
>
> Hi Jo,
>
> Yes I have, look at the pom files below.



Hi Minto

I only see junit and 2 slf4j dependencies.
The ReloadableClassLoader class you mentioned earlier.. Did you include
it as source?
I would expect a dependency to the library that contains it.

Which class is causing the ClassNotFoundException?


Also not that in the maven case the test and project classes are not
> part of the classpath being used by the tests.



Could you paste some information about the build output when you run
"mvn test -X"?
Search for "classpathElements" and paste it back here.
As I said earlier, you can't predict the classpath that is used to run
your tests by looking at the classpath that is used to start Maven.

PS. Groeten aan de flikken! ;)
(Transl: Say hello to the cops)

Cheers
Jo


DISCLAIMER
De informatie in deze e-mail is vertrouwelijk en uitsluitend bestemd voor de 
geadresseerde. Indien u niet de geadresseerde bent, wordt u er hierbij op 
gewezen, dat u geen recht heeft kennis te nemen van de rest van deze e-mail, 
deze te gebruiken, te kopieren of te verstrekken aan andere personen dan de 
geadresseerde. Indien u deze e-mail abusievelijk hebt ontvangen, brengt u dan 
alstublieft de afzender op de hoogte, waarbij u bij deze gevraagd wordt het 
originele bericht te vernietigen. Politie Amsterdam-Amstelland is niet 
verantwoordelijk voor de inhoud van deze e-mail en wijst iedere 
aansprakelijkheid af voor en/of in verband met alle gevolgen en/of schade van 
een onjuiste of onvolledige verzending ervan. Tenzij uitdrukkelijk het 
tegendeel blijkt, kunnen aan dit bericht geen rechten worden ontleend. Het 
gebruik van Internet e-mail brengt zekere risico's met zich. Daarom wordt 
iedere aansprakelijkheid voor het gebruik van dit medium door de Politie 
Amsterdam-Amstelland van de hand gewezen. 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to