You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Markus Innerebner <ma...@eurac.edu> on 2013/11/29 11:18:33 UTC

Question about external repositories

Hello users and experts,

I have to the following question:
In my Archiva (1.3.6) running in an servlet container (tomcat6) I 
configured three additional remote repositories. In addition I added 
them as Proxy Connectors ( |whitelist "**/*"|).

Now I expect, that when connecting from a client to my archiva 
repository, that archiva takes care in downloading the (missing) 
libraries from the remote repository.

Did I get something wrong, or should it not be like that, because on the 
client maven complains he can not find that jar files.

Any idea or suggestion?

thanks

Markus

Re: Question about external repositories

Posted by Markus Innerebner <ma...@eurac.edu>.
Hi all,

at the end I managed to solve the problem. I set up version 
apache-archiva-1.4-M4 and finally I am able to download also from my 
added remote repositories.

cheers Markus

Re: Question about external repositories

Posted by Markus Innerebner <ma...@eurac.edu>.
Hi Sasha
> to me it looks like you're client side settings are OK, it cannot even 
> find Core Maven stuff this time (so now, we're sure everthing is 
> loaded through the "mirror").
>
> Is the server (where Archiva runs) connected to the internet? Can you 
> use Maven from the command line there?
yes, it is connected and I can run there maven.

>
> You might also try a fresh install of the server, which comes with 
> defaults that allow a connection to central. So with a default Archiva 
> installation and nothing changing on the client, you should at least 
> be able to mirror core Maven artifacts.

The strange part is that downloading jars that belong to the main 
repository (http://repo1.maven.org/maven2) archiva is downloading, but 
the remote repositories I added are not downloaded.

It looks like there are some configuration errors, but I do not know 
which ones. Remote repository is correct,  proxy connectors are set up.

I even run everything now on an new environment (using M4). I really 
don't know what the hack I am doing wrong.

Are you using a remote repository?

cheers Markus

Re: Question about external repositories

Posted by Sascha Vogt <sa...@gmail.com>.
Hi Markus,

to me it looks like you're client side settings are OK, it cannot even 
find Core Maven stuff this time (so now, we're sure everthing is loaded 
through the "mirror").

Is the server (where Archiva runs) connected to the internet? Can you 
use Maven from the command line there?

You might also try a fresh install of the server, which comes with 
defaults that allow a connection to central. So with a default Archiva 
installation and nothing changing on the client, you should at least be 
able to mirror core Maven artifacts.

HTH,
Sascha

Am 30.11.13 12:54, schrieb Markus Innerebner:
> Hi Sasha, comments are inlined/
>
> I added the entire log on nopaste with -X option
> see: http://nopaste.info/2411f5f62e.html
>
>>>
>> I think you should set the first mirrorOf to
>> "external:*,!apache.snapshots" otherwise the first wildcard will
>> include the second. Also I personally prefer *,!apache.snapshots as
>> I'm not sure, why one would have local file based or localhost
>> repositories and just using * is shorter / easier to understand to non
>> experienced Maven users. YMMV
>
> But I set external in the settings before apache.snapshot.
>
> Btw: my settings file is on published here:
> http://nopaste.info/0490c3b421.html
>
>>
>>> [AdminInM@ABZ01SDE test]$ mvn clean install
>> Did you try with -U ??? Otherwise Maven will not retry to download
>> from Archiva but cache the error.
> yes, but same error. Errors are in log file.
>
>>
>> How does the POM look like? Is there a repository specified, which
>> holds the edu.eurac.test:test:jar:1.0 artifact? And is the correct
>> Proxy Connector added to the Archiva "internal" repository?
>
> yes, there is added the repository where the jars (that during building
> maven cannot find) are located with to Proxy Connector internal.
>
> I really do not know what I am doing wrong.
>
> cheers M.
>


Re: Question about external repositories

Posted by Markus Innerebner <ma...@eurac.edu>.
Hi Sasha, comments are inlined/

I added the entire log on nopaste with -X option
see: http://nopaste.info/2411f5f62e.html

>>
> I think you should set the first mirrorOf to 
> "external:*,!apache.snapshots" otherwise the first wildcard will 
> include the second. Also I personally prefer *,!apache.snapshots as 
> I'm not sure, why one would have local file based or localhost 
> repositories and just using * is shorter / easier to understand to non 
> experienced Maven users. YMMV

But I set external in the settings before apache.snapshot.

Btw: my settings file is on published here:
http://nopaste.info/0490c3b421.html

>
>> [AdminInM@ABZ01SDE test]$ mvn clean install
> Did you try with -U ??? Otherwise Maven will not retry to download 
> from Archiva but cache the error.
yes, but same error. Errors are in log file.

>
> How does the POM look like? Is there a repository specified, which 
> holds the edu.eurac.test:test:jar:1.0 artifact? And is the correct 
> Proxy Connector added to the Archiva "internal" repository?

yes, there is added the repository where the jars (that during building 
maven cannot find) are located with to Proxy Connector internal.

I really do not know what I am doing wrong.

cheers M.


Re: Question about external repositories

Posted by Sascha Vogt <sa...@gmail.com>.
Hi,

Comments inline

Am 29.11.13 17:24, schrieb Markus Innerebner:
> [...]
>    <mirrors>
> *    <mirror>**
> **      <id>archiva.default</id>**
> **<url>http://abz01sde.eurac.edu:8080/archiva/repository/internal</url>**
> **      <mirrorOf>external:*</mirrorOf>**
> **    </mirror>**
> **    <mirror>**
> **      <id>archiva.apache.snapshot</id>**
> **<url>http://abz01sde.eurac.edu:8080/archiva/repository/snapshots</url>**
> **      <mirrorOf>apache.snapshots</mirrorOf>**
> **    </mirror>*
>    </mirrors>
I think you should set the first mirrorOf to 
"external:*,!apache.snapshots" otherwise the first wildcard will include 
the second. Also I personally prefer *,!apache.snapshots as I'm not 
sure, why one would have local file based or localhost repositories and 
just using * is shorter / easier to understand to non experienced Maven 
users. YMMV

> [AdminInM@ABZ01SDE test]$ mvn clean install
Did you try with -U ??? Otherwise Maven will not retry to download from 
Archiva but cache the error.

How does the POM look like? Is there a repository specified, which holds 
the edu.eurac.test:test:jar:1.0 artifact? And is the correct Proxy 
Connector added to the Archiva "internal" repository?

Greetings
-Sascha-

Re: Question about external repositories

Posted by Markus Innerebner <ma...@eurac.edu>.
Hi , thanks for you prompt answer:

I guess you mean the settings.xml of the client: I only touched the part 
about the mirrors.

<?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">
   <pluginGroups>
   </pluginGroups>

   <proxies>
   </proxies>

   <servers>
   </servers>

   <mirrors>
*    <mirror>**
**      <id>archiva.default</id>**
**<url>http://abz01sde.eurac.edu:8080/archiva/repository/internal</url>**
**      <mirrorOf>external:*</mirrorOf>**
**    </mirror>**
**    <mirror>**
**      <id>archiva.apache.snapshot</id>**
**<url>http://abz01sde.eurac.edu:8080/archiva/repository/snapshots</url>**
**      <mirrorOf>apache.snapshots</mirrorOf>**
**    </mirror>*
   </mirrors>

   <profiles>
   </profiles>
</settings>



> Your expectations are correct, and it works for us exactly that way.
>
> Can you show us the POM your using, the settings.xml involved and the
> exact error messages Maven gives you?

this is the error log:


[AdminInM@ABZ01SDE test]$ mvn clean install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective 
model for edu.eurac.test:test:jar:1.0
[WARNING] 'build.plugins.plugin.version' for 
org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 14, 
column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they 
threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support 
building such malformed projects.
[WARNING]
[INFO]
[INFO] 
------------------------------------------------------------------------
[INFO] Building Simple WebGIS Template 1.0
[INFO] 
------------------------------------------------------------------------
[WARNING] The POM for it.geosolutions:geoserver-manager:jar:1.5.0 is 
missing, no dependency information available
[INFO] 
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] 
------------------------------------------------------------------------
[INFO] Total time: 0.682s
[INFO] Finished at: Fri Nov 29 17:21:39 CET 2013
[INFO] Final Memory: 5M/15M
[INFO] 
------------------------------------------------------------------------
[ERROR] Failed to execute goal on project test: Could not resolve 
dependencies for project edu.eurac.test:test:jar:1.0: Failure to find 
it.geosolutions:geoserver-manager:jar:1.5.0 in 
http://abz01sde.eurac.edu:8080/archiva/repository/internal was cached in 
the local repository, resolution will not be reattempted until the 
update interval of archiva.default has elapsed or updates are forced -> 
[Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the 
-e switch.
[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/DependencyResolutionException


cheers Markus

Re: Question about external repositories

Posted by Sascha Vogt <sa...@gmail.com>.
Your expectations are correct, and it works for us exactly that way.

Can you show us the POM your using, the settings.xml involved and the
exact error messages Maven gives you?

Especially it should tell you, which repository it tried to access.

Also If you don't specify a whitelist, it should allow everything, so
you don't need to specify "**/*"

Greetings
-Sascha-

Am 29.11.2013 11:18, schrieb Markus Innerebner:
> Hello users and experts,
> 
> I have to the following question:
> In my Archiva (1.3.6) running in an servlet container (tomcat6) I
> configured three additional remote repositories. In addition I added
> them as Proxy Connectors ( |whitelist "**/*"|).
> 
> Now I expect, that when connecting from a client to my archiva
> repository, that archiva takes care in downloading the (missing)
> libraries from the remote repository.
> 
> Did I get something wrong, or should it not be like that, because on the
> client maven complains he can not find that jar files.
> 
> Any idea or suggestion?
> 
> thanks
> 
> Markus
>