Issues with Maven 3 and selenium 2.0 web drivers

239 views
Skip to first unread message

linkudin

unread,
Jun 13, 2011, 8:28:22 PM6/13/11
to Selenium Users
Hi,
I am blocked and not able to figure out what is going on.

I am using maven 3.0.1, jdk 1.6. I am trying to write some new
selenium tests and trying to run with latest webdriver. I had no
problem with selenium old versions.

This is what my pom file has (adding only relevant dependencies)

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium</artifactId>
<version>2.0rc2</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.cssparser</groupId>
<artifactId>cssparser</artifactId>
<version>0.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit-core-js</artifactId>
<version>2.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>1.9.14</version>
<scope>test</scope>
</dependency>

Repositories:
<repository>
<id>central2</id>
<name>Maven Repository Switchboard</name>
<layout>default</layout>
<url>http://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>

I have other local repositories and i did not install the selenium
drivers into my local repositories.
Why am i getting compilation errors?


[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium
\2.0rc2\selenium-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-remote-control
\2.0rc2\selenium-remote-control-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-chrome-driver
\2.0rc2\selenium-chrome-driver-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-remote-driver
\2.0rc2\selenium-remote-driver-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\apache\httpcomponents\httpclient
\4.0.2\httpclient-4.0.2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\apache\httpcomponents\httpcore
\4.0.1\httpcore-4.0.1.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-htmlunit-driver
\2.0rc2\selenium-htmlunit-driver-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-api\2.0rc2\selenium-
api-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\com\google\guava\guava\r09\guava-r09.jar; error in
opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-firefox-driver
\2.0rc2\selenium-firefox-driver-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-ie-driver
\2.0rc2\selenium-ie-driver-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-iphone-driver
\2.0rc2\selenium-iphone-driver-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-server
\2.0rc2\selenium-server-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\bouncycastle\bcprov-jdk15\135\bcprov-jdk15-135.jar;
error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\mx4j\mx4j-tools\3.0.1\mx4j-tools-3.0.1.jar; error in
opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-support
\2.0rc2\selenium-support-2.0rc2.jar; error in opening zip file
[INFO] 16 errors
[INFO] -------------------------------------------------------------
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2:54.008s
[INFO] Finished at: Mon Jun 13 20:21:47 EDT 2011
[INFO] Final Memory: 5M/10M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-
plugin:2.3.2:testCompile (default-testCompile) on project icoa:
Compilation failure: Compilation failure:
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium
\2.0rc2\selenium-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-remote-control
\2.0rc2\selenium-remote-control-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-chrome-driver
\2.0rc2\selenium-chrome-driver-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-remote-driver
\2.0rc2\selenium-remote-driver-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\apache\httpcomponents\httpclient
\4.0.2\httpclient-4.0.2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\apache\httpcomponents\httpcore
\4.0.1\httpcore-4.0.1.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-htmlunit-driver
\2.0rc2\selenium-htmlunit-driver-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-api\2.0rc2\selenium-
api-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\com\google\guava\guava\r09\guava-r09.jar; error in
opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-firefox-driver
\2.0rc2\selenium-firefox-driver-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-ie-driver
\2.0rc2\selenium-ie-driver-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-iphone-driver
\2.0rc2\selenium-iphone-driver-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-server
\2.0rc2\selenium-server-2.0rc2.jar; error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\bouncycastle\bcprov-jdk15\135\bcprov-jdk15-135.jar;
error in opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\mx4j\mx4j-tools\3.0.1\mx4j-tools-3.0.1.jar; error in
opening zip file
[ERROR] error: error reading C:\Documents and Settings\kondojis
\.m2\repository\org\seleniumhq\selenium\selenium-support
\2.0rc2\selenium-support-2.0rc2.jar; error in opening zip file
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal org.apache.maven.plugins:maven-compiler-plugin:
2.3.2:testCompile (default-testCompile) on project icoa: Compilation
failure
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:
199)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:
148)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:
140)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:
84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:
59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:
183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:
161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:451)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:188)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:134)
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:597)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:
290)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:
230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:
409)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
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:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:
115)
Caused by: org.apache.maven.plugin.CompilationFailureException:
Compilation failure
at
org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:
656)
at
org.apache.maven.plugin.TestCompilerMojo.execute(TestCompilerMojo.java:
161)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:
107)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:
195)
... 25 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Process finished with exit code 1

linkudin

unread,
Jun 14, 2011, 8:51:16 PM6/14/11
to Selenium Users
In addition to what i already posted earlier (moderators have not yet
approved my first post yet), it looks like the jars are corrupt and
the build scripts have problem reading the jars.
I have manually installed these jars as well as automatically by
adding the dependency to pom file. no luck.

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium</artifactId>
<version>2.0rc2</version>
<type>pom</type>
</dependency>

Any help would be highly appreciated.
Here is the error
[INFO] 15 errors
[INFO] -------------------------------------------------------------
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 35.297s
[INFO] Finished at: Tue Jun 14 20:44:46 EDT 2011
[INFO] Final Memory: 5M/10M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-
plugin:2.3.2:testCompile (default-testCompile) on project icoa:
Compilation failure: Compilation failure:
[ERROR] error: error reading C:\Documents and Settings\kondojis

Luke Inman-Semerau

unread,
Jun 17, 2011, 6:49:08 PM6/17/11
to seleniu...@googlegroups.com
looks like you have corrupt files in your local repository... delete this directory C:\Documents and Settings\kondojis\.m2\repository\org\seleniumhq 
and try again, if you have an error please post that


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


Mark Collin

unread,
Jun 20, 2011, 6:44:54 AM6/20/11
to seleniu...@googlegroups.com
For now try:

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium</artifactId>
<version>2.0rc2</version>

<type>pom</type>
</dependency>

It is probably going to change again for RC3, see the following for more
info:

https://groups.google.com/forum/#!topic/selenium-developers/T284IRAQev4

--


You received this message because you are subscribed to the Google Groups
"Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to
selenium-user...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/selenium-users?hl=en.


--
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.

If you have received this email in error please notify postm...@ardescosolutions.com

Luke Inman-Semerau

unread,
Jun 20, 2011, 12:22:21 PM6/20/11
to seleniu...@googlegroups.com
This one includes everything (and won't be changing with rc3 ~ other than the version #):

<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
     <artifactId>selenium-server</artifactId>
     <version>2.0rc2</version>
</dependency>

(I typically also include <scope>test</scope> especially if my tests are with the actual project i'm testing against, selenium jars don't normally need to be in the war when it's created)
Reply all
Reply to author
Forward
0 new messages