Can't download dependencies using Maven

1,784 views
Skip to first unread message

Aleksandar

unread,
Jun 29, 2012, 12:59:46 PM6/29/12
to seleniu...@googlegroups.com
Hi,

I am trying to follow steps and set up my first project according to http://seleniumhq.org/docs/03_webdriver.html
Maven is installed correctly on my computer, but when I run command mvn clean install command I have messages as below and after 30 minutes i have a timeout error. 
Retried few times same thing is happening, I don't have any proxy, its my home network so the proxy is not a problem. 

Any solution why this is happening?

Thanks

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MySel20Proj 1.0
[INFO] ------------------------------------------------------------------------
clean-plugin/2.4.1/maven-clean-plugin-2.4.1.jar
15/21 KB
Message has been deleted

Aleksandar

unread,
Jun 29, 2012, 1:59:53 PM6/29/12
to seleniu...@googlegroups.com
And the error message that I am receiving after 30 minutes is

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30:01.055s
[INFO] Finished at: Fri Jun 29 19:11:55 CEST 2012
[INFO] Final Memory: 6M/107M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its d
ependencies could not be resolved: Could not transfer artifact org.apache.maven.
plugins:maven-clean-plugin:jar:2.4.1 from/to central (http://repo.maven.apache.o
rg/maven2): GET request of: org/apache/maven/plugins/maven-clean-plugin/2.4.1/ma
ven-clean-plugin-2.4.1.jar from central failed: Read timed out -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
onException

Mark Collin

unread,
Jun 29, 2012, 7:00:34 PM6/29/12
to seleniu...@googlegroups.com

Sounds like you have network issues and are not able to connect/are getting a very slow connection to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.jar

 

Nothing to do with Selenium I’m afraid.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/fdk2mkUEqp0J.
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-US.

Aleksandar

unread,
Jun 29, 2012, 8:02:00 PM6/29/12
to seleniu...@googlegroups.com
I have great connection, I can download manually everything and I know that this issue is not that connected to selenium but I though that if someone else have been using maven with selenium will be able to help. 

Thanks for the replay.
Kind Regards

On Saturday, June 30, 2012 1:00:34 AM UTC+2, Mark Collin wrote:

Sounds like you have network issues and are not able to connect/are getting a very slow connection to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.jar

 

Nothing to do with Selenium I’m afraid.

 

 

From: selenium-users@googlegroups.com [mailto:selenium-users@googlegroups.com] On Behalf Of Aleksandar
Sent: 29 June 2012 18:00
To: selenium-users@googlegroups.com
Subject: [selenium-users] Can't download dependencies using Maven

 

Hi,

 

I am trying to follow steps and set up my first project according to http://seleniumhq.org/docs/03_webdriver.html

Maven is installed correctly on my computer, but when I run command mvn clean install command I have messages as below and after 30 minutes i have a timeout error. 

Retried few times same thing is happening, I don't have any proxy, its my home network so the proxy is not a problem. 

 

Any solution why this is happening?

 

Thanks

 

[INFO] Scanning for projects...

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building MySel20Proj 1.0

[INFO] ------------------------------------------------------------------------

clean-plugin/2.4.1/maven-clean-plugin-2.4.1.jar

15/21 KB

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/fdk2mkUEqp0J.

To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.

Mark Collin

unread,
Jun 30, 2012, 3:37:09 AM6/30/12
to seleniu...@googlegroups.com

I have a maven template that works fine for me here:

 

https://github.com/Ardesco/Selenium-Maven-Template

 

Without seeing your POM there is not much anybody can do.

 

The message you are getting from maven is a network error though:

 

·         Is your DNS server playing up?  If so you could work around this by adding an entry to your hosts file for repo.maven.apache.org

·         Have you set a custom repository to download artefacts from?  I would have expected it to pull from repo1.maven.org

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-US.

--

You received this message because you are subscribed to the Google Groups "Selenium Users" group.

To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/L5j0zkJKKK8J.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.

Aleksandar

unread,
Jun 30, 2012, 6:10:26 AM6/30/12
to seleniu...@googlegroups.com
My pom file is  copy from the one on 

It's my first time to play around with Maven so I expected this to be straightforward but ... 
I followed http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html n they are mentioning something like 
If you have just installed Maven, it may take a while on the first run. This is because Maven is downloading the most recent artifacts (plugin jars and other files) into your local repository. You may also need to execute the command a couple of times before it succeeds. This is because the remote server may time out before your downloads are complete. Don't worry, there are ways to fix that.

But this is getting ridiculous, the first few library are always downloading and then after the first nothing. So just because some are downloaded I would assume that the problem is not in my network.

<?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/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>MySel20Proj</groupId>
        <artifactId>MySel20Proj</artifactId>
        <version>1.0</version>
        <dependencies>
            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-java</artifactId>
                <version>2.24.1</version>
            </dependency>
            <dependency>
                <groupId>com.opera</groupId>
                <artifactId>operadriver</artifactId>
            </dependency>
        </dependencies>
        <dependencyManagement>
            <dependencies>
                <dependency>
                    <groupId>com.opera</groupId>
                    <artifactId>operadriver</artifactId>
                    <version>0.14</version>
                    <exclusions>
                        <exclusion>
                            <groupId>org.seleniumhq.selenium</groupId>
                            <artifactId>selenium-remote-driver</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
            </dependencies>
        </dependencyManagement>
</project>

To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.


For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/L5j0zkJKKK8J.

To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.

Aleksandar

unread,
Jun 30, 2012, 6:55:12 AM6/30/12
to seleniu...@googlegroups.com
Also do you know if it is possible to download all maven library manually? And where should i place them? So next time they don't have to be downloaded?

Thank you in advance
Aleksandar

To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.


For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/L5j0zkJKKK8J.

To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.

Graham

unread,
Jun 30, 2012, 7:04:02 AM6/30/12
to seleniu...@googlegroups.com
are you behind a proxy? we had problems that our proxy was stripping headers and it was messing it up for us. We created a local nexus repo which didn't go through the proxy.

Mark Collin

unread,
Jun 30, 2012, 7:39:35 AM6/30/12
to seleniu...@googlegroups.com

You can, but that kind of defeats the point of maven.

 

All maven files will be stored in your .m2/repository directory, this will usually be in your user directory so something like:

 

·         Windows – C:\Users\Aleksandar\.m2\repository

·         Linux - /home/Aleksandar/.m2/repository

·         OSX - /Users/Aleksandar/.m2/repository

 

All the files will be stored in a directory structure based upon the artefact names, so something like:

 

${USERDIR}/.m2/repository/org/seleniumhq/selenium/selenium-firefox-driver/2.24.1/selenium-firefox-driver-2.24.1.jar

 

Your POM file looks fine so the only thing left really is network issues, the remote server timing out maybe?

 

Maven will download a lot the first time you run it (You will hear people jokingly saying, “Oh look maven is downloading the internet again” quite often), you can force it to download using the –U switch:

 

mvn clean install -U

 

 

 

From: seleniu...@googlegroups.com [mailto:seleniu...@googlegroups.com] On Behalf Of Aleksandar
Sent: 30 June 2012 11:55
To: seleniu...@googlegroups.com
Subject: Re: [selenium-users] Can't download dependencies using Maven

 

Also do you know if it is possible to download all maven library manually? And where should i place them? So next time they don't have to be downloaded?

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-US.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/L5j0zkJKKK8J.

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-US.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.

To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/uadA3SGdJG0J.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.

sai kiran

unread,
Jun 30, 2012, 8:32:51 AM6/30/12
to seleniu...@googlegroups.com
Hi,
We too face issues with maven when it internet access is behind proxy.In our case, we request our network team to login with their access for downloading maven. I would like to know how to create local nexus repo with our requesting Network team and downloading maven dependencies..

Thanks

To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/8oET7D3J3KAJ.

To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.

Aleksandar

unread,
Jun 30, 2012, 2:47:30 PM6/30/12
to seleniu...@googlegroups.com
I fixed this with very unusual solution and i still don't know what the problem was but it download all dependencies. 

My computer was on wireless network (home network, I don't have any proxy I checked)
When I try to download dependencies it failed
I have a mobile phone with wireless access, accessing the same router as my computer 
I connected my computer to my mobile (and shared the internet from my phone)
I tried again and it worked, dependencies were downloading, I had to retry a lot of times but on the end they finished. 

Strange thing is that my phone was using the same network, hmmm but nevertheless now I have everything downloaded. 

Now is the hard time, to figure how to set up my first selenium project with maven :)))))

Thanks for all yore posts.
Regards

Mark Collin

unread,
Jun 30, 2012, 3:23:13 PM6/30/12
to seleniu...@googlegroups.com

Only guess I could make is that your phone is using a different DNS server to your main machine.

 

As for setting up a selenium project, have a look at the selenium maven template I linked to earlier in this thread, it shows the correct maven structure and has a selenium-tests profile to allow you to run selenium tests and unit tests separately.

 

Good luck with it J

 

From: seleniu...@googlegroups.com [mailto:seleniu...@googlegroups.com] On Behalf Of Aleksandar
Sent: 30 June 2012 19:48
To: seleniu...@googlegroups.com
Subject: Re: [selenium-users] Can't download dependencies using Maven

 

I fixed this with very unusual solution and i still don't know what the problem was but it download all dependencies. 

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-US.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/L5j0zkJKKK8J.

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-US.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.

To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/8oET7D3J3KAJ.


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-US.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.

To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/X5Lmueps66oJ.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages