Unable to configure pom to have plugin fin the compiled fixture classes
-----------------------------------------------------------------------
Key: MFIT-11
URL: http://jira.codehaus.org/browse/MFIT-11
Project: Maven 2.x FIT Plugin
Issue Type: Bug
Affects Versions: 2.0
Environment: Running eclipse 3.2.1 on win XP with M2 plugin 0.0.9
maven version 2.0.4
fit-maven-plugin-2.0-beta-3
Reporter: Michael
Assignee: Mauro Talevi
Unable to configure pom to have plugin find the compiled fixture classes, I am
not sure if there is a bug or a config issue with classpath
The fixture classes are compiled in my target/testclasses directory, yet the
plugin does not see it despite it being in the classpath
Any help would be much appreciated .
Error from the html file when the plugin is executed is
java.lang.ClassNotFoundException:: [package name].fixtures.[class name]
at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at
java.security.AccessController.doPrivileged(Native Method) at
java.net.URLClassLoader.findClass(URLClassLoader.java:188) at
java.lang.ClassLoader.loadClass(ClassLoader.java:306) at
org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
at
org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at
java.lang.Class.forName0(Native Method) at
java.lang.Class.forName(Class.java:164) at fit.ActionFixture.start(Unknown
Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585) at
fit.ActionFixture.doCells(Unknown Source) at fit.Fixture.doRow(Unknown
Source) at fit.Fixture.doRows(Unknown Source) at
fit.Fixture.doTable(Unknown Source) at fit.Fixture.interpretTables(Unknown
Source) at fit.Fixture.doTables(Unknown Source) at
org.codehaus.mojo.fit.FitRunnerMojo.run(FitRunnerMojo.java:206) at
org.codehaus.mojo.fit.FitRunnerMojo.run(FitRunnerMojo.java:197) at
org.codehaus.mojo.fit.FitRunnerMojo.run(FitRunnerMojo.java:190) at
org.codehaus.mojo.fit.FitRunnerMojo.run(FitRunnerMojo.java:183) at
org.codehaus.mojo.fit.FitRunnerMojo.execute(FitRunnerMojo.java:116) at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
at
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:441) at
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:382) at
org.maven.ide.eclipse.Maven2Executor.main(Maven2Executor.java:68)
------------------------
I put the fixture source class files in the /src/test/java folder
have the the html is src/acctest/spec folder
added
<testResource>
<directory>src/acctest</directory>
</testResource>
to get the html file in the test/classes/target dir, other wise was getting and
error saying fitrunner could not find the html file
The following is the plugin config of the pom file
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>fit-maven-plugin</artifactId>
<executions>
<execution>
<configuration>
<sourceDirectory>src/acctest</sourceDirectory>
<sourceIncludes>**/*ervices.html</sourceIncludes>
<sourceExcludes>result/*.html</sourceExcludes>
<outputDirectory>target/test-classes</outputDirectory>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
When I run maven with the goal clean install the following is my class path
[DEBUG] Configuring mojo 'org.codehaus.mojo:fit-maven-plugin:2.0-beta-3:run' -->
[DEBUG] (f) caseSensitive = false
[DEBUG] (f) classpathElements = [C:\workspace\[project name]\target\classes,
C:\workspace\[project name]\target\test-classes,
c:\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar,
c:\repository\hibernate\hibernate\3.0.3\hibernate-3.0.3.jar .. a bunch more
jars]
[DEBUG] (f) ignoreFailures = true
[DEBUG] (f) outputDirectory = target/test-classes
[DEBUG] (f) sourceDirectory = src/acctest
[DEBUG] (f) sourceExcludes = result/*.html
[DEBUG] (f) sourceIncludes = **/*ervices.html
[DEBUG] -- end configuration --
[INFO] fit:run {execution: default}
[DEBUG] Executing FitRunner with parameters sourceDirectory=src/acctest,
caseSensitive=false, sourceIncludes=**/*ervices.html,
sourceExcludes=result/*.html, parseTags=[table, tr, td],
outputDirectory=target/test-classes, ignoreFailures=true
[DEBUG] Listing files from directory src/acctest
[DEBUG] Setting case sensitive false
[DEBUG] Setting includes **/*ervices.html
[DEBUG] Setting excludes result/*.html
[DEBUG] Files listed [spec\Services.html]
[INFO] Running Fixture with input file src\acctest\spec\Services.html and
output file target\test-classes\spec\Services.html
[DEBUG] Created org.codehaus.mojo.fit.ClassLoaderFixture with classpathElements
[C:\workspace\[project name]\target\classes, C:\workspace\[project
name]\target\test-classes,
c:\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar,
c:\repository\hibernate\hibernate\3.0.3\hibernate-3.0.3.jar, ... a bunch more
jars]
[WARN] Fixture failed with counts: 0 right, 0 wrong, 0 ignored, 11 exceptions
and the services,html has null pointer and class not found exceptions.
Any ideas?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email