Bonjour,
Est-ce quelqu'un a déjà paramétré le proxy Archiva ?
Auriez-vous quelques détails sur ce qu'il faut paramétrer au niveau de Maven et d'Archiva ?
Merci
Version imprimable
Bonjour,
Est-ce quelqu'un a déjà paramétré le proxy Archiva ?
Auriez-vous quelques détails sur ce qu'il faut paramétrer au niveau de Maven et d'Archiva ?
Merci
Regarde ces liens, tu devrais y trouver ce que tu cherches:
http://docs.codehaus.org/display/MAV...d+with+Archiva
http://docs.codehaus.org/display/MAV...iva+as+a+Proxy
http://docs.codehaus.org/display/MAVENUSER/Archiva
J'ai bien suivi les démarches mais visiblement il y a un bout qui manque.
Ce que j'ai fait :
- J'ai créer un nouveau repository à l'aide d'archiva.
- J'ai définit ce repository comme étant un proxy pour les deux repo distant pré-configurés dans archiva.
- Dans mon fichier settings.xml, j'ai ajouté un nouveau repository.
- Dans mon fichier settings.xml, j'ai ajouté un nouveau server avec les infos de connexions du compte admin d'archiva.
Mais à aucun moment les ressources que je ne possède pas sur mon poste local ne sont recopiées dans le proxy avant qu'elles soient téléchargées en local sur mon poste.
Si tu veux utiliser uniquement Archiva comme repository (avec mécanisme de proxy) pour les repo distant), il ne faut pas configuer ton repo Archiva dans ton settings.xml comme repository mais comme mirroit, ainsi maven n'utilisera plus le repo distant repo1.maven.org/maven2 mais toujours Archiva.
Mais à ce moment on perd le mécanisme de proxy puisque ça ne devient plus qu'un mirroir.
Or je ne veux pas un mirroir complet d'aun repo distant, je veux juste que les ressources téléchargées une fois se mettent dans mon proxy avant de les obtenir en local.
Si tu utilises mirror dans ton settings.xml, tu ne perd pas le mécanisme de proxy, au contraire. Le terme mirror signifie que tu ne veux pas utilisé le central repo mais un "mirroir" de celui-ci. Le "miroir", dans ton cas" est archiva, mais archiva ne va pas faire un mirroir du central repo, il ne stockera, avec le mécanisme de proxy, que les artifacts demandé par le client maven.
Dans mon settings.xml j'ai la config suivante :
Et je n'ai plus de repository qui sont déclarés, mais maintenant Maven n'est plus capable de trouver les ressources.Code:
1
2
3
4
5
6
7<mirror> <id>toto</id> <mirrorOf>*</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://dev.esne.ch:8880/archiva/repository/proxyArchiva/</url> </mirror>
Je ne comprends pas, il me semble que les proxy connector déclarés au niveau d'archiva ne sont pas pris en compte.
Lances maven en mode debug (-X) pour voir si il y a des codes d'erreurs HTTP
Regarde dans les logs d'Archiva, il faut peut-être augmenter le niveau des logs pour voir quel peut être le problème.
As-tu autoriser guest à utiliser ton archiva?
As-tu défini un login/password dans settings.xml pour accéder à Archiva? Comment l'as-tu paraméter?
Alors au niveau des logs même en mettant un niveau plus haut je ne vois rien.
Visiblement pas d'erreur http.
J'ai mis à Guest les mêmes droits que Admin histoire d'être sur que le problème ne vient pas de là.
Dans mon settings.xml, j'ai le paramétrage suivant pour l'authentification sur le reop Archiva :
Code:
1
2
3
4
5
6
7<server> <id>toto</id> <username>admin</username> <password>****</password> </server>
L'id de ton server doit être: "dev.esne.ch:8880", peut-être sans le port, je ne sais plus
Je désespère ..... voilà un extrait de l'exécution de la commande avec l'option -X :
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194 + Error stacktraces are turned on. Maven version: 2.0.7 Java version: 1.6.0 OS name: "windows xp" version: "5.1" arch: "x86" [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settings\helbling\.m2\plugin-registry.xml' [DEBUG] Building Maven global-level plugin registry from: 'C:\Java\maven-2.0.7\bin\..\conf\plugin-registry.xml' [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] applicationWallaby [INFO] persistence [INFO] metier [INFO] presentation [DEBUG] Initialising extension: org.apache.maven.wagon:wagon-webdav [DEBUG] Retrieving parent-POM: org.apache.maven.wagon:wagon-providers::1.0-beta-2 for project: null:wagon-webdav:jar:1.0-beta-2 from the repository. [DEBUG] Retrieving parent-POM: org.apache.maven.wagon:wagon::1.0-beta-2 for project: null:wagon-providers:pom:null from the repository. [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::4 for project: org.apache.maven.wagon:wagon:pom:1.0-beta-2 from the repository. [DEBUG] Retrieving parent-POM: org.apache:apache::3 for project: org.apache.maven:maven-parent:pom:4 from the repository. [DEBUG] Adding managed dependencies for unknown:wagon-webdav [DEBUG] org.apache.maven.wagon:wagon-ssh-common:jar:1.0-beta-2 [DEBUG] org.apache.maven.wagon:wagon-ssh-common-test:jar:1.0-beta-2:test [DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2 [DEBUG] org.apache.maven.wagon:wagon-provider-test:jar:1.0-beta-2 [DEBUG] junit:junit:jar:3.8.1 [DEBUG] org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4 [DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8 [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4 [DEBUG] wallaby:applicationWallaby:pom:1.0 (selected for null) [DEBUG] org.apache.maven.wagon:wagon-webdav:jar:1.0-beta-2:runtime (selected for runtime) [DEBUG] Adding managed dependencies for unknown:wagon-provider-api [DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2 [DEBUG] org.apache.maven.wagon:wagon-provider-test:jar:1.0-beta-2 [DEBUG] org.apache.maven.wagon:wagon-ssh-common-test:jar:1.0-beta-2 [DEBUG] org.apache.maven.wagon:wagon-ssh-common:jar:1.0-beta-2 [DEBUG] junit:junit:jar:3.8.1 [DEBUG] org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4 [DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8 [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4 [DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:runtime (selected for runtime) [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (selected for runtime) [DEBUG] Trying repository central Downloading: http://dev.esne.ch:8880/archiva/repository/proxyArchiva/slide/slide-webdavlib/2.1/slide-webdavlib-2.1.pom [DEBUG] Unable to get resource 'slide:slide-webdavlib:pom:2.1' from repository central (http://repo1.maven.org/maven2) [DEBUG] Artifact not found - using stub model: Unable to download the artifact from any repository slide:slide-webdavlib:pom:2.1 from the specified remote repositories: central (http://repo1.maven.org/maven2) [DEBUG] Using defaults for missing POM slide:slide-webdavlib:pom:2.1:runtime [DEBUG] slide:slide-webdavlib:jar:2.1:runtime (selected for runtime) [DEBUG] commons-logging:commons-logging:jar:1.0.4:runtime (selected for runtime) [DEBUG] slide:slide-webdavlib:jar:2.1:runtime (selected for runtime) [DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus::1.0.4 for project: null:plexus-utils:jar:1.1 from the repository. [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1) [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.1:runtime (selected for runtime) [DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:runtime (selected for runtime) [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.1) [DEBUG] commons-logging:commons-logging:jar:1.0.4:runtime (selected for runtime) [DEBUG] Trying repository central Downloading: http://dev.esne.ch:8880/archiva/repository/proxyArchiva/slide/slide-webdavlib/2.1/slide-webdavlib-2.1.jar [DEBUG] Unable to get resource 'slide:slide-webdavlib:jar:2.1' from repository central (http://repo1.maven.org/maven2) [DEBUG] Unable to download the artifact from any repository Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=slide -DartifactId=slide-webdavlib \ -Dversion=2.1 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=slide -DartifactId=slide-webdavlib \ -Dversion=2.1 -Dpackaging=jar -Dfile=/path/to/file \ -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) wallaby:applicationWallaby:pom:1.0 2) slide:slide-webdavlib:jar:2.1 slide:slide-webdavlib:jar:2.1 from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. Missing: ---------- 1) slide:slide-webdavlib:jar:2.1 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=slide -DartifactId=slide-webdavlib \ -Dversion=2.1 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=slide -DartifactId=slide-webdavlib \ -Dversion=2.1 -Dpackaging=jar -Dfile=/path/to/file \ -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) wallaby:applicationWallaby:pom:1.0 2) slide:slide-webdavlib:jar:2.1 ---------- 1 required artifact is missing. for artifact: wallaby:applicationWallaby:pom:1.0 from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] ------------------------------------------------------------------------ [DEBUG] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Missing: ---------- 1) slide:slide-webdavlib:jar:2.1 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=slide -DartifactId=slide-webdavlib \ -Dversion=2.1 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=slide -DartifactId=slide-webdavlib \ -Dversion=2.1 -Dpackaging=jar -Dfile=/path/to/file \ -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) wallaby:applicationWallaby:pom:1.0 2) slide:slide-webdavlib:jar:2.1 ---------- 1 required artifact is missing. for artifact: wallaby:applicationWallaby:pom:1.0 from the specified remote repositories: central (http://repo1.maven.org/maven2) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findExtensions(DefaultLifecycleExecutor.java:166) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:141) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) at org.apache.maven.cli.MavenCli.main(MavenCli.java:280) 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.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing: ---------- 1) slide:slide-webdavlib:jar:2.1 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=slide -DartifactId=slide-webdavlib \ -Dversion=2.1 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=slide -DartifactId=slide-webdavlib \ -Dversion=2.1 -Dpackaging=jar -Dfile=/path/to/file \ -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) wallaby:applicationWallaby:pom:1.0 2) slide:slide-webdavlib:jar:2.1 ---------- 1 required artifact is missing. for artifact: wallaby:applicationWallaby:pom:1.0 from the specified remote repositories: central (http://repo1.maven.org/maven2) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:305) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:272) at org.apache.maven.extension.DefaultExtensionManager.addExtension(DefaultExtensionManager.java:121) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findExtensions(DefaultLifecycleExecutor.java:158) ... 12 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: < 1 second [INFO] Finished at: Thu Nov 01 14:41:19 CET 2007 [INFO] Final Memory: 2M/4M [INFO] ------------------------------------------------------------------------
Qu'as tu dans les parties "Repositories" and "Proxy Connectors" dans Archiva?
Si tu utilises un proxy, tu doit avoir ton proxy défini dans "Network Proxies", et ton "Network Proxy" doit être connecté à ton "Proxy Connector"
Enfin, pour vérifier que tout fonctionne correctement, dans ton browser, utilises cette url http://dev.esne.ch:8880/archiva/repo...davlib-2.1.pom pour vérifier que tu récupères le fichier, si c'est ok, çà devrait être bon avec maven aussi.
La beta-3 d'Archiva est en cours de préparation donc tu pourras l'utiliser ce soir ou demain.
As-tu défini un proxy dans ton settings.xml? Si c'est le cas, supprimes le et rééssaye.
Il me reste plus qu'à te dire merci c'est tout bon tout fonctionne !
Effectivement, dev.esne.ch est une adresse interne non référencée dans le dns .......
Pas de problème