Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Environment:Hide#---- BEGIN: Which report
Which.version=Which.java:($Revision: 1.2 $) WhichJar.java:($Revision: 1.2 $)
java.version=1.4.2_02
file.encoding=Cp1252
java.ext.dirs=C:\j2sdk1.4.2_02\jre\lib\ext
java.class.path=c:\PROGRA~1\apache-maven\lib\forehead-1.0-beta-5.jar
os.name=Windows XP
java.vendor=Sun Microsystems Inc.
sun.boot.class.path=c:\PROGRA~1\apache-maven\lib\endorsed\xerces-2.4.0.jar;c:\PROGRA~1\apache-maven\lib\endorsed\xml-api
s-1.0.b2.jar;C:\j2sdk1.4.2_02\jre\lib\rt.jar;C:\j2sdk1.4.2_02\jre\lib\i18n.jar;C:\j2sdk1.4.2_02\jre\lib\sunrsasign.jar;C
:\j2sdk1.4.2_02\jre\lib\jsse.jar;C:\j2sdk1.4.2_02\jre\lib\jce.jar;C:\j2sdk1.4.2_02\jre\lib\charsets.jar;C:\j2sdk1.4.2_02
\jre\classes
java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition
#---- END: Which report
Installed plugins:
maven-abbot-plugin-1.1
maven-announcement-plugin-1.3
maven-ant-plugin-1.8.1
maven-antlr-plugin-1.2.1
maven-appserver-plugin-2.0
maven-artifact-plugin-1.4.1
maven-ashkelon-plugin-1.2
maven-aspectj-plugin-3.2
maven-aspectwerkz-plugin-1.2
maven-caller-plugin-1.1
maven-castor-plugin-1.2
maven-changelog-plugin-1.7.1
maven-changes-plugin-1.5.1
maven-checkstyle-plugin-2.5
maven-clean-plugin-1.3
maven-clover-plugin-1.6
maven-console-plugin-1.1
maven-cruisecontrol-plugin-1.6
maven-dashboard-plugin-1.6
maven-developer-activity-plugin-1.5.1
maven-dist-plugin-1.6.1
maven-docbook-plugin-1.2
maven-ear-plugin-1.6
maven-eclipse-plugin-1.9
maven-ejb-plugin-1.5
maven-faq-plugin-1.4
maven-file-activity-plugin-1.5.1
maven-findbugs-plugin-0.8.4
maven-genapp-plugin-2.2
maven-gump-plugin-1.4
maven-hibernate-plugin-1.2
maven-html2xdoc-plugin-1.3.1
maven-idea-plugin-1.5
maven-j2ee-plugin-1.5.1
maven-jalopy-plugin-1.3.1
maven-jar-plugin-1.6.1
maven-java-plugin-1.5
maven-javacc-plugin-1.1
maven-javadoc-plugin-1.7
maven-jboss-plugin-1.5
maven-jbuilder-plugin-1.5
maven-jcoverage-plugin-1.0.9
maven-jdee-plugin-1.1
maven-jdepend-plugin-1.5
maven-jdeveloper-plugin-1.4
maven-jdiff-plugin-1.4
maven-jellydoc-plugin-1.3.1
maven-jetty-plugin-1.1
maven-jira-plugin-1.1.2
maven-jnlp-plugin-1.4.1
maven-junit-doclet-plugin-1.2
maven-junit-report-plugin-1.5
maven-jxr-plugin-1.4.2
maven-latex-plugin-1.4.1
maven-latka-plugin-1.4.1
maven-license-plugin-1.2
maven-linkcheck-plugin-1.3.4
maven-multichanges-plugin-1.1
maven-multiproject-plugin-1.3.1
maven-native-plugin-1.1
maven-nsis-plugin-1.1
maven-pdf-plugin-2.2.1
maven-plugin-plugin-1.5.2
maven-pmd-plugin-1.6
maven-pom-plugin-1.4.1
maven-rar-plugin-1.0
maven-release-plugin-1.4.1
maven-repository-plugin-1.2
maven-scm-plugin-1.4.1
maven-shell-plugin-1.1
maven-simian-plugin-1.4
maven-site-plugin-1.5.2
maven-struts-plugin-1.3
maven-tasklist-plugin-2.3
maven-test-plugin-1.6.2
maven-tjdo-plugin-1.0.0
maven-uberjar-plugin-1.2
maven-vdoclet-plugin-1.2
maven-war-plugin-1.6.1
maven-webserver-plugin-2.0
maven-wizard-plugin-1.1
maven-xdoc-plugin-1.8
Exception reading build.properties: C:\Documents and Settings\emattsson\build.properties (The system cannot find the fil
e specified)
Home Build properties: {}Show#---- BEGIN: Which report Which.version=Which.java:($Revision: 1.2 $) WhichJar.java:($Revision: 1.2 $) java.version=1.4.2_02 file.encoding=Cp1252 java.ext.dirs=C:\j2sdk1.4.2_02\jre\lib\ext java.class.path=c:\PROGRA~1\apache-maven\lib\forehead-1.0-beta-5.jar os.name=Windows XP java.vendor=Sun Microsystems Inc. sun.boot.class.path=c:\PROGRA~1\apache-maven\lib\endorsed\xerces-2.4.0.jar;c:\PROGRA~1\apache-maven\lib\endorsed\xml-api s-1.0.b2.jar;C:\j2sdk1.4.2_02\jre\lib\rt.jar;C:\j2sdk1.4.2_02\jre\lib\i18n.jar;C:\j2sdk1.4.2_02\jre\lib\sunrsasign.jar;C :\j2sdk1.4.2_02\jre\lib\jsse.jar;C:\j2sdk1.4.2_02\jre\lib\jce.jar;C:\j2sdk1.4.2_02\jre\lib\charsets.jar;C:\j2sdk1.4.2_02 \jre\classes java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition #---- END: Which report Installed plugins: maven-abbot-plugin-1.1 maven-announcement-plugin-1.3 maven-ant-plugin-1.8.1 maven-antlr-plugin-1.2.1 maven-appserver-plugin-2.0 maven-artifact-plugin-1.4.1 maven-ashkelon-plugin-1.2 maven-aspectj-plugin-3.2 maven-aspectwerkz-plugin-1.2 maven-caller-plugin-1.1 maven-castor-plugin-1.2 maven-changelog-plugin-1.7.1 maven-changes-plugin-1.5.1 maven-checkstyle-plugin-2.5 maven-clean-plugin-1.3 maven-clover-plugin-1.6 maven-console-plugin-1.1 maven-cruisecontrol-plugin-1.6 maven-dashboard-plugin-1.6 maven-developer-activity-plugin-1.5.1 maven-dist-plugin-1.6.1 maven-docbook-plugin-1.2 maven-ear-plugin-1.6 maven-eclipse-plugin-1.9 maven-ejb-plugin-1.5 maven-faq-plugin-1.4 maven-file-activity-plugin-1.5.1 maven-findbugs-plugin-0.8.4 maven-genapp-plugin-2.2 maven-gump-plugin-1.4 maven-hibernate-plugin-1.2 maven-html2xdoc-plugin-1.3.1 maven-idea-plugin-1.5 maven-j2ee-plugin-1.5.1 maven-jalopy-plugin-1.3.1 maven-jar-plugin-1.6.1 maven-java-plugin-1.5 maven-javacc-plugin-1.1 maven-javadoc-plugin-1.7 maven-jboss-plugin-1.5 maven-jbuilder-plugin-1.5 maven-jcoverage-plugin-1.0.9 maven-jdee-plugin-1.1 maven-jdepend-plugin-1.5 maven-jdeveloper-plugin-1.4 maven-jdiff-plugin-1.4 maven-jellydoc-plugin-1.3.1 maven-jetty-plugin-1.1 maven-jira-plugin-1.1.2 maven-jnlp-plugin-1.4.1 maven-junit-doclet-plugin-1.2 maven-junit-report-plugin-1.5 maven-jxr-plugin-1.4.2 maven-latex-plugin-1.4.1 maven-latka-plugin-1.4.1 maven-license-plugin-1.2 maven-linkcheck-plugin-1.3.4 maven-multichanges-plugin-1.1 maven-multiproject-plugin-1.3.1 maven-native-plugin-1.1 maven-nsis-plugin-1.1 maven-pdf-plugin-2.2.1 maven-plugin-plugin-1.5.2 maven-pmd-plugin-1.6 maven-pom-plugin-1.4.1 maven-rar-plugin-1.0 maven-release-plugin-1.4.1 maven-repository-plugin-1.2 maven-scm-plugin-1.4.1 maven-shell-plugin-1.1 maven-simian-plugin-1.4 maven-site-plugin-1.5.2 maven-struts-plugin-1.3 maven-tasklist-plugin-2.3 maven-test-plugin-1.6.2 maven-tjdo-plugin-1.0.0 maven-uberjar-plugin-1.2 maven-vdoclet-plugin-1.2 maven-war-plugin-1.6.1 maven-webserver-plugin-2.0 maven-wizard-plugin-1.1 maven-xdoc-plugin-1.8 Exception reading build.properties: C:\Documents and Settings\emattsson\build.properties (The system cannot find the fil e specified) Home Build properties: {}
-
Number of attachments :
Description
I got a project with unit tests that require a bunch of resources in the classpath. When I run the tests through maven, then the test cant find the resources at all.
The tests works when I run them with:
- maven-clover-plugin, the test are successful.
- "maven test:ui" - The tests works with the Swing test app when it is started from maven.
It does not work when I run
- "maven test"
Ive verified that the goal "test:test-resources" copies the resource files to the target path "target/test-classes". So I cant understand why i cant get the goal "test" to work when the other does.
(Ive also setup eclipse so it works, and tried the meven-ide to synchronize the changes from the eclipse project properties to the maven project-xml file. And it still doesnt work.)
Maven test output ("maven test")
----------------------------------------------------------------------
test:test:
[junit] Running net.sourceforge.jsh3modtool.mod.DefaultGameModTest
[junit] Tests run: 16, Failures: 0, Errors: 0, Time elapsed: 0,19 sec
[junit] Running net.sourceforge.jsh3modtool.modpackage.FolderModPackageTest
[junit] Tests run: 7, Failures: 0, Errors: 7, Time elapsed: 0,04 sec
[junit] [ERROR] TEST net.sourceforge.jsh3modtool.modpackage.FolderModPackageTest FAILED
[junit] Running net.sourceforge.jsh3modtool.modpackage.JarModPackageTest
[junit] Tests run: 6, Failures: 0, Errors: 6, Time elapsed: 0,03 sec
[junit] [ERROR] TEST net.sourceforge.jsh3modtool.modpackage.JarModPackageTest FAILED
----------------------------------------------------------------------
Maven clover output ("maven clover")
----------------------------------------------------------------------
test:test:
[junit] Running net.sourceforge.jsh3modtool.mod.DefaultGameModTest
[junit] Tests run: 16, Failures: 0, Errors: 0, Time elapsed: 1,408 sec
[junit] Running net.sourceforge.jsh3modtool.modpackage.FolderModPackageTest
[junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0,57 sec
[junit] Running net.sourceforge.jsh3modtool.modpackage.JarModPackageTest
[junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0,589 sec
----------------------------------------------------------------------
Here is the project.xml:
----------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<project>
<pomVersion>3</pomVersion>
<id>jsh3modtool</id>
<name>Silent Hunter III Mod Tool</name>
<currentVersion>0.1</currentVersion>
<organization><name>sourceforge.net</name></organization>
<inceptionYear>2005</inceptionYear>
<package>net.sourceforge.jsh3modtool</package>
<shortDescription>Mod tool for Silent Hunter III</shortDescription>
<url>http://jsh3modtool.sf.net</url>
<dependencies>
<dependency>
<groupId>xerces</groupId>
<artifactId>xerces</artifactId>
<version>2.4.0</version>
<type>jar</type>
</dependency>
</dependencies>
<build>
<nagEmailAddress>jsh3modtool</nagEmailAddress>
<sourceDirectory>src/core/java</sourceDirectory>
<unitTestSourceDirectory>src/test/java</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
<excludes>
<exclude>**/Abstract*Test.java</exclude>
</excludes>
<resources>
<resource>
<directory>src/test/etc</directory>
<includes>
<include>*/</include>
</includes>
</resource>
</resources>
</unitTest>
</build>
<reports>
<report>maven-junit-report-plugin</report>
<report>maven-clover-plugin</report>
</reports>
</project>
----------------------------------------------------------------------
The code in the tests looks like this
----------------------------------------------------------------------
protected void setUp() throws Exception
----------------------------------------------------------------------
Directory structure
----------------------------------------------------------------------
Directory of C:\Data\eclipse-cvs\jsh3modtool\target\test-classes
2005-05-16 22:22 <DIR> modpackages
2005-05-16 22:22 <DIR> modrepositories
2005-05-16 22:22 <DIR> net
0 File(s) 0 bytes
Directory of C:\Data\eclipse-cvs\jsh3modtool\target\test-classes\modpackages
2005-05-16 22:22 <DIR> folderpackage
2005-05-16 22:22 <DIR> jarpackage
0 File(s) 0 bytes
Directory of C:\Data\eclipse-cvs\jsh3modtool\target\test-classes\modpackages\folderpackage
2005-05-16 22:22 <DIR> gamefiles
2005-05-16 22:22 1ÿ276 gamemod.xml
2005-05-16 22:22 <DIR> screenshots
1 File(s) 1ÿ276 bytes
Directory of C:\Data\eclipse-cvs\jsh3modtool\target\test-classes\modpackages\folderpackage\gamefiles
2005-05-16 22:22 65ÿ580 data1.tga
2005-05-16 22:22 65ÿ580 data2.tga
2 File(s) 131ÿ160 bytes
Directory of C:\Data\eclipse-cvs\jsh3modtool\target\test-classes\modpackages\folderpackage\screenshots
2005-05-16 22:22 121ÿ758 shot1.jpg
2005-05-16 22:22 130ÿ078 shot2.jpg
2 File(s) 251ÿ836 bytes
Directory of C:\Data\eclipse-cvs\jsh3modtool\target\test-classes\modpackages\jarpackage
2005-05-16 22:22 338ÿ132 jarmod.jar
1 File(s) 338ÿ132 bytes
Directory of C:\Data\eclipse-cvs\jsh3modtool\target\test-classes\modrepositories
2005-05-16 22:22 <DIR> folderrepository
2005-05-16 22:22 <DIR> ziprepository
0 File(s) 0 bytes
Directory of C:\Data\eclipse-cvs\jsh3modtool\target\test-classes\net
2005-05-16 22:22 <DIR> sourceforge
0 File(s) 0 bytes
Directory of C:\Data\eclipse-cvs\jsh3modtool\target\test-classes\net\sourceforge
2005-05-16 22:22 <DIR> jsh3modtool
0 File(s) 0 bytes
Directory of C:\Data\eclipse-cvs\jsh3modtool\target\test-classes\net\sourceforge\jsh3modtool
2005-05-16 22:22 <DIR> mod
2005-05-16 22:22 <DIR> modpackage
2005-05-16 22:22 797 ResourceTests.class
1 File(s) 797 bytes
Directory of C:\Data\eclipse-cvs\jsh3modtool\target\test-classes\net\sourceforge\jsh3modtool\mod
2005-05-16 22:22 1ÿ835 DefaultGameModTest$MockModPackage.class
2005-05-16 22:22 9ÿ995 DefaultGameModTest.class
2 File(s) 11ÿ830 bytes
Directory of C:\Data\eclipse-cvs\jsh3modtool\target\test-classes\net\sourceforge\jsh3modtool\modpackage
2005-05-16 22:22 1ÿ776 AbstractModPackageTest.class
2005-05-16 22:22 1ÿ442 AllTests.class
2005-05-16 22:22 2ÿ331 FolderModPackageTest.class
2005-05-16 22:22 2ÿ125 JarModPackageTest.class
4 File(s) 7ÿ674 bytes
----------------------------------------------------------------------
Debug output from "maven -X test" is attached.