Hi Thorsten, Strange all my resource directories (src/main/resources, src/test/resources, src/main/java, scr/test/java) are all included in the build path but only the resources in src/main/java and in src/test/java show up in target/classes I have checked the buildpath for excluded and included patterns. right now I have fixed this by manually creating linked resources in src/main/java to the src/main/resources dir.
The errors i get are in the target/surefire-report dir in two files. i give the contents of the xml file <?xml version="1.0" encoding="UTF-8" ?> <testsuite group="integration-persistence.*" errors="0" skipped="0" tests="2" time="0.496" failures="2" name="Integration JPA"> <properties> <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/> <property value="/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/jre/lib/i386" name="sun.boot.library.path"/> <property value="1.5.0_08-b03" name="java.vm.version"/> <property value="Sun Microsystems Inc." name="java.vm.vendor"/> <property value="http://java.sun.com/" name="java.vendor.url"/> <property value=":" name="path.separator"/> <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/> <property value="sun.io" name="file.encoding.pkg"/> <property value="US" name="user.country"/> <property value="unknown" name="sun.os.patch.level"/> <property value="Java Virtual Machine Specification" name=" java.vm.specification.name"/> <property value="/home/rolf/Projects/persistence/jpa" name="user.dir"/> <property value="1.5.0_08-b03" name="java.runtime.version"/> <property value="sun.awt.X11GraphicsEnvironment" name=" java.awt.graphicsenv"/> <property value="/home/rolf/Projects/persistence/jpa" name="basedir"/> <property value="/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/jre/lib/endorsed" name="java.endorsed.dirs"/> <property value="i386" name="os.arch"/> <property value="/tmp" name="java.io.tmpdir"/> <property value=" " name="line.separator"/> <property value="Sun Microsystems Inc." name=" java.vm.specification.vendor"/> <property value="org.jboss.naming:org.jnp.interfaces" name=" java.naming.factory.url.pkgs"/> <property value="Linux" name="os.name"/> <property value="UTF-8" name="sun.jnu.encoding"/> <property value="/usr/lib/jvm/java-1.5.0-sun-1.5.0.08 /jre/lib/i386/client:/usr/lib/jvm/java-1.5.0-sun-1.5.0.08 /jre/lib/i386:/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/jre/../lib/i386:/usr/lib/firefox" name="java.library.path"/> <property value="Java Platform API Specification" name=" java.specification.name"/> <property value="49.0" name="java.class.version"/> <property value="HotSpot Client Compiler" name="sun.management.compiler "/> <property value="2.6.17-11-generic" name="os.version"/> <property value="/home/rolf" name="user.home"/> <property value="Europe/Amsterdam" name="user.timezone"/> <property value="sun.print.PSPrinterJob" name="java.awt.printerjob"/> <property value="UTF-8" name="file.encoding"/> <property value="1.5" name="java.specification.version"/> <property value="rolf" name="user.name"/> <property value="/home/rolf/.m2/repository/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus- archiver-1.0-alpha-7.jar:/home/rolf/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar:/home/rolf/.m2/repository/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.jar:/home/rolf/.m2/repository/org/apache/maven/surefire/surefire-api/2.3/surefire-api-2.3.jar:/home/rolf/.m2/repository/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar:/home/rolf/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar:/home/rolf/.m2/repository/commons-lang/commons-lang/2.1/commons-lang-2.1.jar:/home/rolf/.m2/repository/org/apache/maven/surefire/surefire-booter/2.3/surefire-booter-2.3.jar:/home/rolf/.m2/repository/org/testng/testng/5.1/testng-5.1-jdk15.jar" name="java.class.path"/> <property value="org.jnp.interfaces.LocalOnlyContextFactory" name=" java.naming.factory.initial"/> <property value="1.0" name="java.vm.specification.version"/> <property value="/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/jre" name=" java.home"/> <property value="32" name="sun.arch.data.model"/> <property value="en" name="user.language"/> <property value="Sun Microsystems Inc." name="java.specification.vendor "/> <property value="mixed mode, sharing" name="java.vm.info"/> <property value="1.5.0_08" name="java.version"/> <property value="/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/jre/lib/ext" name="java.ext.dirs"/> <property value="/usr/lib/jvm/java-1.5.0-sun-1.5.0.08 /jre/lib/rt.jar:/usr/lib/jvm/java-1.5.0-sun-1.5.0.08 /jre/lib/i18n.jar:/usr/lib/jvm/java-1.5.0-sun-1.5.0.08 /jre/lib/sunrsasign.jar:/usr/lib/jvm/java-1.5.0-sun-1.5.0.08 /jre/lib/jsse.jar:/usr/lib/jvm/java-1.5.0-sun-1.5.0.08 /jre/lib/jce.jar:/usr/lib/jvm/java-1.5.0-sun-1.5.0.08 /jre/lib/charsets.jar:/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/jre/classes" name="sun.boot.class.path"/> <property value="Sun Microsystems Inc." name="java.vendor"/> <property value="/home/rolf/.m2/repository" name="localRepository"/> <property value="/" name="file.separator"/> <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name=" java.vendor.url.bug"/> <property value="org.apache.xerces.dom.DOMXSImplementationSourceImpl" name="org.w3c.dom.DOMImplementationSourceList"/> <property value="UnicodeLittle" name="sun.io.unicode.encoding"/> <property value="little" name="sun.cpu.endian"/> <property value="gnome" name="sun.desktop"/> <property value="" name="sun.cpu.isalist"/> </properties> <testcase time="0.006" name="withoutEJBContainer"> <failure type="javax.naming.NameNotFoundException" message="EntityManagerFactories not bound"> javax.naming.NameNotFoundException: EntityManagerFactories not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:529) at org.jnp.server.NamingServer.getBinding(NamingServer.java:537) at org.jnp.server.NamingServer.getObject(NamingServer.java:543) at org.jnp.server.NamingServer.lookup(NamingServer.java:267) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:626) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588) at javax.naming.InitialContext.lookup(InitialContext.java:351) at auction.test.EJB3IntegrationTest.getEntityManagerFactory( EJB3IntegrationTest.java:133) at auction.test.basic.PersistentStateTransitions.withoutEJBContainer( PersistentStateTransitions.java:53) </failure> </testcase> <testcase time="0" name="withEJBContainer"> <failure type="javax.transaction.NotSupportedException" message="Transaction already active, cannot nest transactions."> javax.transaction.NotSupportedException: Transaction already active, cannot nest transactions. at org.jboss.tm.TxManager.begin(TxManager.java:557) at org.jboss.ejb3.embedded.UserTransactionImpl.begin( UserTransactionImpl.java:74) at auction.test.basic.PersistentStateTransitions.withEJBContainer( PersistentStateTransitions.java:116) </failure> </testcase> </testsuite> It looks like the embedded container doesn't have what it needs to startup properly but I don't have a clue what to look for Thanx Rolf On 3/29/07, Thorsten Heit <[EMAIL PROTECTED]> wrote:
Hi Rolf, > using the standard directory layout of maven my resources in > src/main/resourses are not copied during an eclipse full build. (neither > are > the ones in src/test/resources). Yes, that's normal: Eclipse only compiles Java source files contained in the configured source folders (Project -> Properties -> Java Build Path -> Source), and only resource files found in these folders are copied to the configured output folder(s). To have Eclipse copy your resources stored under src/main/resources simply add that folder to the build path. BTW: The same holds for test classes/resources under src/test/main etc. > But for some reason maven cannot run the test without failure in the > execution of the tests. > (no compilation error but runtime errors) > Can someone help me how to fix this problem? What error do you get? Have you had a look in the target directory where surefire creates the reports for each executed test? HTH Thorsten --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
