You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Tibor Digana <ti...@apache.org> on 2017/11/27 21:22:14 UTC

Problem to download dependency on Ubuntu

My command *mvn clean* is not able to download a new artifact
*org.arquillian.universe:arquillian-junit:pom*
however it exists on Maven Central.

I run the command on Ubuntu Konsole, and nothing is downloaded.
When I run wget [1] from the same Konsole, the POM is downloaded.

The settings.xml is not a problem, I checked. There is a mirror of central
and URL of Nexus in company.

Is there any native difference between wget and mvn/Java on Ubuntu so that
the remote mavenrepo may not be reached?
I did setup of /etc/environment, /etc/network/interface, ~/.profile due to
proxy, DNS, http_no_proxy, etc. but nothing helps.

Any hint would be helpful here.
MAVEN and JAVA_OPTS is not set.

[1]: wget
http://mavenrepo.ads.local/nexus/content/groups/public/org/arquillian/arquillian-universe/1.1.13.7/arquillian-universe-1.1.13.7.pom

Thx
Tibor

Re: Problem to download dependency on Ubuntu

Posted by Tibor Digana <ti...@googlemail.com>.
I tried to use Proxy in settings.xml and nonProxyHosts separated by pipe |
with same result, but this is not necessary to do since our company is
using Nexus.
The funny thing is that I wrote Java code which downloads Arquillian from
the same URL.
The Jenkins also works almost well (with host name of Nexus and not
downloading artifacts with IP of Nexus) but the Maven from commandline does
not download anything from our Nexus.
Why?

Maybe the Maven has problem with network domain.
The Nexus is in another domain. Is it necessary for Maven to know the
network domain?
If I run a pure Java app like this (java Main), the file is downloaded. So
what's the difference in Maven?



import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class Main {
    public static void main(String... args) throws Exception {
        URL url = new
URL("http://mavenrepo.ads.local/nexus/content/groups/public/org/arquillian/arquillian-universe/1.1.13.7/arquillian-universe-1.1.13.7.pom");
        HttpURLConnection con = (HttpURLConnection) url.openConnection();
        con.setRequestMethod("GET");
        System.out.println(con.getContentLengthLong());
        System.out.println(con.usingProxy());
        BufferedReader r = new BufferedReader(new
InputStreamReader(con.getInputStream()));
        for (String line; (line = r.readLine()) != null; ) {
            System.out.println(line);
        }
        con.disconnect();
    }
}






On Mon, Nov 27, 2017 at 10:46 PM, Nick Stolwijk <ni...@gmail.com>
wrote:

> Did you also configure your proxy in the settings.xml? [1]
>
> Hth,
>
> Nick
>
> [1] https://maven.apache.org/guides/mini/guide-proxies.html
>
> Nick Stolwijk
>
> ~~~ Try to leave this world a little better than you found it and, when
> your turn comes to die, you can die happy in feeling that at any rate you
> have not wasted your time but have done your best ~~~
>
> Lord Baden-Powell
>
> On Mon, Nov 27, 2017 at 10:22 PM, Tibor Digana <ti...@apache.org>
> wrote:
>
> > My command *mvn clean* is not able to download a new artifact
> > *org.arquillian.universe:arquillian-junit:pom*
> > however it exists on Maven Central.
> >
> > I run the command on Ubuntu Konsole, and nothing is downloaded.
> > When I run wget [1] from the same Konsole, the POM is downloaded.
> >
> > The settings.xml is not a problem, I checked. There is a mirror of
> central
> > and URL of Nexus in company.
> >
> > Is there any native difference between wget and mvn/Java on Ubuntu so
> that
> > the remote mavenrepo may not be reached?
> > I did setup of /etc/environment, /etc/network/interface, ~/.profile due
> to
> > proxy, DNS, http_no_proxy, etc. but nothing helps.
> >
> > Any hint would be helpful here.
> > MAVEN and JAVA_OPTS is not set.
> >
> > [1]: wget
> > http://mavenrepo.ads.local/nexus/content/groups/public/
> > org/arquillian/arquillian-universe/1.1.13.7/arquillian-
> > universe-1.1.13.7.pom
> >
> > Thx
> > Tibor
> >
>



-- 
Cheers
Tibor

Re: Problem to download dependency on Ubuntu

Posted by Tibor Digana <ti...@googlemail.com>.
These are my logs from mvn -X clean

[DEBUG] Using mirror nexus (
http://mavenrepo.ads.local/nexus/content/groups/public) for central (
https://repo.maven.apache.org/maven2).
...
[DEBUG] Using transporter WagonTransporter with priority -1.0 for
http://mavenrepo.ads.local/nexus/content/groups/public
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for
http://mavenrepo.ads.local/nexus/content/groups/public with
username=deployment, password=***
Downloading:
http://mavenrepo.ads.local/nexus/content/groups/public/org/arquillian/arquillian-universe/1.1.13.7/arquillian-universe-1.1.13.7.pom
[WARNING] Failed to create parent directories for tracking file
/home/xms40/.m2/repository/org/arquillian/arquillian-universe/
1.1.13.7/arquillian-universe-1.1.13.7.pom.lastUpdated
...
[ERROR] Non-resolvable import POM: Could not transfer artifact
org.arquillian:arquillian-universe:pom:1.1.13.7 from/to nexus (
http://mavenrepo.ads.local/nexus/content/groups/public):
/home/xms40/.m2/repository/org/arquillian/arquillian-universe/
1.1.13.7/arquillian-universe-1.1.13.7.pom.part.lock (No such file or
directory)


On Mon, Nov 27, 2017 at 10:46 PM, Nick Stolwijk <ni...@gmail.com>
wrote:

> Did you also configure your proxy in the settings.xml? [1]
>
> Hth,
>
> Nick
>
> [1] https://maven.apache.org/guides/mini/guide-proxies.html
>
> Nick Stolwijk
>
> ~~~ Try to leave this world a little better than you found it and, when
> your turn comes to die, you can die happy in feeling that at any rate you
> have not wasted your time but have done your best ~~~
>
> Lord Baden-Powell
>
> On Mon, Nov 27, 2017 at 10:22 PM, Tibor Digana <ti...@apache.org>
> wrote:
>
> > My command *mvn clean* is not able to download a new artifact
> > *org.arquillian.universe:arquillian-junit:pom*
> > however it exists on Maven Central.
> >
> > I run the command on Ubuntu Konsole, and nothing is downloaded.
> > When I run wget [1] from the same Konsole, the POM is downloaded.
> >
> > The settings.xml is not a problem, I checked. There is a mirror of
> central
> > and URL of Nexus in company.
> >
> > Is there any native difference between wget and mvn/Java on Ubuntu so
> that
> > the remote mavenrepo may not be reached?
> > I did setup of /etc/environment, /etc/network/interface, ~/.profile due
> to
> > proxy, DNS, http_no_proxy, etc. but nothing helps.
> >
> > Any hint would be helpful here.
> > MAVEN and JAVA_OPTS is not set.
> >
> > [1]: wget
> > http://mavenrepo.ads.local/nexus/content/groups/public/
> > org/arquillian/arquillian-universe/1.1.13.7/arquillian-
> > universe-1.1.13.7.pom
> >
> > Thx
> > Tibor
> >
>



-- 
Cheers
Tibor

Re: Problem to download dependency on Ubuntu

Posted by Tibor Digana <ti...@apache.org>.
>>From "Failed to create parent directories"...

It is multi-module project but it does not have any parent POM. It is fully
isolated project - Microservice.

>>Local repo directory ownership/permissions?
All is done in my user home.
cd ~
git clone ...
cd ...
mvn -X -U clean


Thx
Tibor


On Tue, Nov 28, 2017 at 8:31 PM, Tamás Cservenák <ta...@cservenak.net>
wrote:

> My 5c:
> From "Failed to create parent directories"...
>
> Local repo directory ownership/permissions?
>
> HTH,
> T
>
> On Tue, Nov 28, 2017 at 7:21 PM Tibor Digana <ti...@apache.org>
> wrote:
>
> > The settings.xml:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
> >           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >           xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
> > http://maven.apache.org/xsd/settings-1.0.0.xsd">
> >
> >     <localRepository>/home/xms40/.m2/repository</localRepository>
> >
> >     <mirrors>
> >         <mirror>
> >             <id>nexus</id>
> >             <mirrorOf>*</mirrorOf>
> >             <name>Sonatype Nexus</name>
> >             <url>http://mavenrepo.ads.local/nexus/content/groups/public
> > </url>
> >         </mirror>
> >     </mirrors>
> >    <servers>
> >       <server>
> >          <id>nexus</id>
> >          <username>***</username>
> >          <password>***</password>
> >       </server>
> >    </servers>
> >
> >
> > </settings>
> >
> >
> > On Mon, Nov 27, 2017 at 10:46 PM, Nick Stolwijk <nick.stolwijk@gmail.com
> >
> > wrote:
> >
> > > Did you also configure your proxy in the settings.xml? [1]
> > >
> > > Hth,
> > >
> > > Nick
> > >
> > > [1] https://maven.apache.org/guides/mini/guide-proxies.html
> > >
> > > Nick Stolwijk
> > >
> > > ~~~ Try to leave this world a little better than you found it and, when
> > > your turn comes to die, you can die happy in feeling that at any rate
> you
> > > have not wasted your time but have done your best ~~~
> > >
> > > Lord Baden-Powell
> > >
> > > On Mon, Nov 27, 2017 at 10:22 PM, Tibor Digana <tibordigana@apache.org
> >
> > > wrote:
> > >
> > > > My command *mvn clean* is not able to download a new artifact
> > > > *org.arquillian.universe:arquillian-junit:pom*
> > > > however it exists on Maven Central.
> > > >
> > > > I run the command on Ubuntu Konsole, and nothing is downloaded.
> > > > When I run wget [1] from the same Konsole, the POM is downloaded.
> > > >
> > > > The settings.xml is not a problem, I checked. There is a mirror of
> > > central
> > > > and URL of Nexus in company.
> > > >
> > > > Is there any native difference between wget and mvn/Java on Ubuntu so
> > > that
> > > > the remote mavenrepo may not be reached?
> > > > I did setup of /etc/environment, /etc/network/interface, ~/.profile
> due
> > > to
> > > > proxy, DNS, http_no_proxy, etc. but nothing helps.
> > > >
> > > > Any hint would be helpful here.
> > > > MAVEN and JAVA_OPTS is not set.
> > > >
> > > > [1]: wget
> > > > http://mavenrepo.ads.local/nexus/content/groups/public/
> > > > org/arquillian/arquillian-universe/1.1.13.7/arquillian-
> > > > universe-1.1.13.7.pom
> > > >
> > > > Thx
> > > > Tibor
> > > >
> > >
> >
> --
> Thanks,
> ~t~
>

Re: Problem to download dependency on Ubuntu

Posted by Tamás Cservenák <ta...@cservenak.net>.
My 5c:
From "Failed to create parent directories"...

Local repo directory ownership/permissions?

HTH,
T

On Tue, Nov 28, 2017 at 7:21 PM Tibor Digana <ti...@apache.org> wrote:

> The settings.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
>           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>           xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
> http://maven.apache.org/xsd/settings-1.0.0.xsd">
>
>     <localRepository>/home/xms40/.m2/repository</localRepository>
>
>     <mirrors>
>         <mirror>
>             <id>nexus</id>
>             <mirrorOf>*</mirrorOf>
>             <name>Sonatype Nexus</name>
>             <url>http://mavenrepo.ads.local/nexus/content/groups/public
> </url>
>         </mirror>
>     </mirrors>
>    <servers>
>       <server>
>          <id>nexus</id>
>          <username>***</username>
>          <password>***</password>
>       </server>
>    </servers>
>
>
> </settings>
>
>
> On Mon, Nov 27, 2017 at 10:46 PM, Nick Stolwijk <ni...@gmail.com>
> wrote:
>
> > Did you also configure your proxy in the settings.xml? [1]
> >
> > Hth,
> >
> > Nick
> >
> > [1] https://maven.apache.org/guides/mini/guide-proxies.html
> >
> > Nick Stolwijk
> >
> > ~~~ Try to leave this world a little better than you found it and, when
> > your turn comes to die, you can die happy in feeling that at any rate you
> > have not wasted your time but have done your best ~~~
> >
> > Lord Baden-Powell
> >
> > On Mon, Nov 27, 2017 at 10:22 PM, Tibor Digana <ti...@apache.org>
> > wrote:
> >
> > > My command *mvn clean* is not able to download a new artifact
> > > *org.arquillian.universe:arquillian-junit:pom*
> > > however it exists on Maven Central.
> > >
> > > I run the command on Ubuntu Konsole, and nothing is downloaded.
> > > When I run wget [1] from the same Konsole, the POM is downloaded.
> > >
> > > The settings.xml is not a problem, I checked. There is a mirror of
> > central
> > > and URL of Nexus in company.
> > >
> > > Is there any native difference between wget and mvn/Java on Ubuntu so
> > that
> > > the remote mavenrepo may not be reached?
> > > I did setup of /etc/environment, /etc/network/interface, ~/.profile due
> > to
> > > proxy, DNS, http_no_proxy, etc. but nothing helps.
> > >
> > > Any hint would be helpful here.
> > > MAVEN and JAVA_OPTS is not set.
> > >
> > > [1]: wget
> > > http://mavenrepo.ads.local/nexus/content/groups/public/
> > > org/arquillian/arquillian-universe/1.1.13.7/arquillian-
> > > universe-1.1.13.7.pom
> > >
> > > Thx
> > > Tibor
> > >
> >
>
-- 
Thanks,
~t~

Re: Problem to download dependency on Ubuntu

Posted by Tibor Digana <ti...@apache.org>.
The settings.xml:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">

    <localRepository>/home/xms40/.m2/repository</localRepository>

    <mirrors>
        <mirror>
            <id>nexus</id>
            <mirrorOf>*</mirrorOf>
            <name>Sonatype Nexus</name>
            <url>http://mavenrepo.ads.local/nexus/content/groups/public</url>
        </mirror>
    </mirrors>
   <servers>
      <server>
         <id>nexus</id>
         <username>***</username>
         <password>***</password>
      </server>
   </servers>


</settings>


On Mon, Nov 27, 2017 at 10:46 PM, Nick Stolwijk <ni...@gmail.com>
wrote:

> Did you also configure your proxy in the settings.xml? [1]
>
> Hth,
>
> Nick
>
> [1] https://maven.apache.org/guides/mini/guide-proxies.html
>
> Nick Stolwijk
>
> ~~~ Try to leave this world a little better than you found it and, when
> your turn comes to die, you can die happy in feeling that at any rate you
> have not wasted your time but have done your best ~~~
>
> Lord Baden-Powell
>
> On Mon, Nov 27, 2017 at 10:22 PM, Tibor Digana <ti...@apache.org>
> wrote:
>
> > My command *mvn clean* is not able to download a new artifact
> > *org.arquillian.universe:arquillian-junit:pom*
> > however it exists on Maven Central.
> >
> > I run the command on Ubuntu Konsole, and nothing is downloaded.
> > When I run wget [1] from the same Konsole, the POM is downloaded.
> >
> > The settings.xml is not a problem, I checked. There is a mirror of
> central
> > and URL of Nexus in company.
> >
> > Is there any native difference between wget and mvn/Java on Ubuntu so
> that
> > the remote mavenrepo may not be reached?
> > I did setup of /etc/environment, /etc/network/interface, ~/.profile due
> to
> > proxy, DNS, http_no_proxy, etc. but nothing helps.
> >
> > Any hint would be helpful here.
> > MAVEN and JAVA_OPTS is not set.
> >
> > [1]: wget
> > http://mavenrepo.ads.local/nexus/content/groups/public/
> > org/arquillian/arquillian-universe/1.1.13.7/arquillian-
> > universe-1.1.13.7.pom
> >
> > Thx
> > Tibor
> >
>

Re: Problem to download dependency on Ubuntu

Posted by Nick Stolwijk <ni...@gmail.com>.
Did you also configure your proxy in the settings.xml? [1]

Hth,

Nick

[1] https://maven.apache.org/guides/mini/guide-proxies.html

Nick Stolwijk

~~~ Try to leave this world a little better than you found it and, when
your turn comes to die, you can die happy in feeling that at any rate you
have not wasted your time but have done your best ~~~

Lord Baden-Powell

On Mon, Nov 27, 2017 at 10:22 PM, Tibor Digana <ti...@apache.org>
wrote:

> My command *mvn clean* is not able to download a new artifact
> *org.arquillian.universe:arquillian-junit:pom*
> however it exists on Maven Central.
>
> I run the command on Ubuntu Konsole, and nothing is downloaded.
> When I run wget [1] from the same Konsole, the POM is downloaded.
>
> The settings.xml is not a problem, I checked. There is a mirror of central
> and URL of Nexus in company.
>
> Is there any native difference between wget and mvn/Java on Ubuntu so that
> the remote mavenrepo may not be reached?
> I did setup of /etc/environment, /etc/network/interface, ~/.profile due to
> proxy, DNS, http_no_proxy, etc. but nothing helps.
>
> Any hint would be helpful here.
> MAVEN and JAVA_OPTS is not set.
>
> [1]: wget
> http://mavenrepo.ads.local/nexus/content/groups/public/
> org/arquillian/arquillian-universe/1.1.13.7/arquillian-
> universe-1.1.13.7.pom
>
> Thx
> Tibor
>