Hi, I think it's a simple problem but I'm new with mojo gwt plugin usage (and GWT at all) and I can't find the solution... I'll be really grateful if someone help me.
I tried to use GWT code testing with maven like is described at page: http://mojo.codehaus.org/gwt-maven-plugin/user-guide/testing.html When I run maven -install I get error: [INFO] [gwt:test] [INFO] using GWT jars from project dependencies : 1.7.0 [INFO] Unpack native libraries required to run GWT [INFO] establishing classpath list (scope = test) [ERROR] java.lang.NoClassDefFoundError: org/codehaus/mojo/gwt/test/MavenTestRunner [ERROR] Caused by: java.lang.ClassNotFoundException: org.codehaus.mojo.gwt.test.MavenTestRunner [ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:200) [ERROR] at java.security.AccessController.doPrivileged(Native Method) [ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:188) [ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:303) [ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) [ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [ERROR] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) [ERROR] Could not find the main class: org.codehaus.mojo.gwt.test.MavenTestRunner. Program will exit. [ERROR] Exception in thread "main" I suppose it's caused by wrong .pom file preparation. My pom file is: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.something</groupId> <artifactId>projectname</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT</version> <name>gwt-maven-archetype-project</name> <properties> <gwt.version>1.7.0</gwt.version> <maven.compiler.source>1.6</maven.compiler.source> <maven.compiler.target>1.6</maven.compiler.target> </properties> <repositories> <repository> <id>smartclient</id> <name>smartclient.com</name> <url>http://www.smartclient.com/maven2/</url> </repository> <repository> <id>jboss</id> <url>http://repository.jboss.com/maven2</url> </repository> <repository> <id>codehaus-mule</id> <url>http://dist.codehaus.org/mule/dependencies/maven2</url> </repository> </repositories> <dependencies> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-servlet</artifactId> <version>${gwt.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-user</artifactId> <version>${gwt.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.smartgwt</groupId> <artifactId>smartgwt</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>com.googlecode.gchart</groupId> <artifactId>gchart</artifactId> <version>2.5</version> </dependency> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-incubator</artifactId> <version>july-14-2009</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.7</version> <scope>test</scope> </dependency> </dependencies> <build> <outputDirectory>war/WEB-INF/classes</outputDirectory> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> <version>1.1</version> <configuration> <runTarget>org.something.projectname.ProjectnameGwtGui/ProjectnameGwtGui.html</runTarget> <generateDirectory>target/projectname-0.0.1-SNAPSHOT/generated-sources/gwt</generateDirectory> </configuration> <executions> <execution> <id>ex1</id> <goals> <goal>compile</goal> <goal>generateAsync</goal> <goal>test</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>2.4.3</version> <configuration> <excludes> <exclude>**/*GwtTest.java</exclude> </excludes> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> <configuration> <source>${maven.compiler.source}</source> <target>${maven.compiler.target}</target> </configuration> </plugin> </plugins> </build> </project> The structure of my project is: - src - main - java <here are project sources> - test - java - gui - GwtTestExample.java Thanks in advance for help Nadzieja -- View this message in context: http://old.nabble.com/Problem-with-test-running-tp26406210p26406210.html Sent from the mojo - user mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
