IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Maven Java Discussion :

[archiva] Archiva comme proxy


Sujet :

Maven Java

  1. #1
    Membre confirmé
    Inscrit en
    Août 2006
    Messages
    105
    Détails du profil
    Informations forums :
    Inscription : Août 2006
    Messages : 105
    Par défaut [archiva] Archiva comme proxy
    Je veux utiliser Archiva comme repository d'entreprise et comme proxiedRepository repo.mergere.com.

    Si j'ai bien compris, quand je demande un jar :
    • maven regarde dans le repository local : première demande donc il ne le trouve pas.
      il demande a mon repository d’entreprise : archiva ne l'a pas.
    • Archiva demande à repo.mergere.com: il le trouve et le download .
    • Archiva le stock dans son repository
    • Archiva signal à maven qu'il a le jar.
    • Maven download le jar

    Le scénario est-il bien comme cela ?

    Dans mon cas j'utilise un proxy http.

    Ma configuration archiva :
    Code Maestro 1.1\project-server\data\project-server\conf\archiva.xml : Sélectionner tout - Visualiser dans une fenêtre à part
    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
     
    <?xml version="1.0" encoding="UTF-8"?><configuration>
      <repositories>
        <repository>
          <directory>D:\Program Files\Mergere\Maestro 1.1\project-server\bin\win32\..\..\data\project-server\repository</directory>
          <id>maestro</id>
          <name>Managed Repository</name>
        </repository>
      </repositories>
      <proxiedRepositories>
        <proxiedRepository>
          <url>http://repo.mergere.com/maven2</url>
          <managedRepository>maestro</managedRepository>
          <releasesPolicy>interval</releasesPolicy>
          <releasesInterval>1</releasesInterval>
          <useNetworkProxy>true</useNetworkProxy>
          <id>mergere</id>
          <name>Mergere Repository Mirror</name>
        </proxiedRepository>
      </proxiedRepositories>
      <localRepository>C:\Documents and Settings\moi\.m2\repository</localRepository>
      <indexPath>D:\Program Files\Mergere\Maestro 1.1\project-server\data\project-server\index</indexPath>
      <proxy>
        <username></username>
        <password></password>
        <port>1234</port>
        <host>proxy.monentreprise.com</host>
      </proxy>
    </configuration>

    Mon test :
    Code cmd.exe : Sélectionner tout - Visualiser dans une fenêtre à part
    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
     
    C:\projets>mvn help:effective-pom
    [INFO] Scanning for projects...
    [INFO] Searching repository for plugin with prefix: 'help'.
    [INFO] org.apache.maven.plugins: checking for updates from maestro-project-server
    [INFO] org.apache.maven.plugins: checking for updates from central
    [INFO] ----------------------------------------------------------------------------
    [INFO] Building MonProjet
    [INFO]    task-segment: [help:effective-pom] (aggregator-style)
    [INFO] ----------------------------------------------------------------------------
    Downloading: http://localhost:8080/repository/org/apache/maven/maven-settings/2.0/maven-settings-2.0.pom
    [WARNING] Unable to get resource from repository maestro-project-server (http://localhost:8080/repository)
    Downloading: http://repo.mergere.com/maven2/org/apache/maven/maven-settings/2.0/maven-settings-2.0.pom
    [WARNING] Unable to get resource from repository central (http://repo.mergere.com/maven2)
    Downloading: http://localhost:8080/repository/org/apache/maven/maven-plugin-tools-api/2.0/maven-plugin-tools-api-2.0.pom
    [WARNING] Unable to get resource from repository maestro-project-server (http://localhost:8080/repository)
    Downloading: http://repo.mergere.com/maven2/org/apache/maven/maven-plugin-tools-api/2.0/maven-plugin-tools-api-2.0.pom
    [WARNING] Unable to get resource from repository central (http://repo.mergere.com/maven2)
    Downloading: http://localhost:8080/repository/org/apache/maven/maven-plugin-descriptor/2.0/maven-plugin-descriptor-2.0.pom
    [WARNING] Unable to get resource from repository maestro-project-server (http://localhost:8080/repository)
    Downloading: http://repo.mergere.com/maven2/org/apache/maven/maven-plugin-descriptor/2.0/maven-plugin-descriptor-2.0.pom
    [WARNING] Unable to get resource from repository central (http://repo.mergere.com/maven2)
    Downloading: http://localhost:8080/repository/org/apache/maven/maven-core/2.0/maven-core-2.0.pom
    [WARNING] Unable to get resource from repository maestro-project-server (http://localhost:8080/repository)
    Downloading: http://repo.mergere.com/maven2/org/apache/maven/maven-core/2.0/maven-core-2.0.pom
    [WARNING] Unable to get resource from repository central (http://repo.mergere.com/maven2)
    Downloading: http://localhost:8080/repository/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0.pom
    [WARNING] Unable to get resource from repository maestro-project-server (http://localhost:8080/repository)
    Downloading: http://repo.mergere.com/maven2/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0.pom
    [WARNING] Unable to get resource from repository central (http://repo.mergere.com/maven2)
    Downloading: http://localhost:8080/repository/org/apache/maven/maven-plugin-tools-api/2.0/maven-plugin-tools-api-2.0.jar
    [WARNING] Unable to get resource from repository maestro-project-server (http://localhost:8080/repository)
    Downloading: http://repo.mergere.com/maven2/org/apache/maven/maven-plugin-tools-api/2.0/maven-plugin-tools-api-2.0.jar
    [WARNING] Unable to get resource from repository central (http://repo.mergere.com/maven2)
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Failed to resolve artifact.
     
    Missing:
    ----------
    1) org.apache.maven:maven-plugin-tools-api:jar:2.0
     
      Try downloading the file manually from the project website.
     
      Then, install it using the command:
          mvn install:install-file -DgroupId=org.apache.maven -DartifactId=maven-plugin-tools-api \
              -Dversion=2.0 -Dpackaging=jar -Dfile=/path/to/file
     
      Path to dependency:
            1) org.apache.maven.plugins:maven-help-plugin:maven-plugin:2.0.1
            2) org.apache.maven:maven-plugin-tools-api:jar:2.0
     
    ----------
    1 required artifact is missing.
     
    for artifact:
      org.apache.maven.plugins:maven-help-plugin:maven-plugin:2.0.1
     
    from the specified remote repositories:
      central (http://repo.mergere.com/maven2),
      maestro-project-server (http://localhost:8080/repository)
     
     
    [INFO] ------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 3 minutes 33 seconds
    [INFO] Finished at: Tue Nov 14 17:49:06 CET 2006
    [INFO] Final Memory: 4M/508M
    [INFO] ------------------------------------------------------------------------
     
    C:\projets>

    Je me demande si j'ai un problème plus de configuration d'archiva ou plus réseau et firewall (ou de compréhension des fonctionnalités d'archiva)

  2. #2
    Membre Expert

    Profil pro
    Inscrit en
    Mai 2006
    Messages
    1 172
    Détails du profil
    Informations personnelles :
    Âge : 50
    Localisation : France, Yvelines (Île de France)

    Informations forums :
    Inscription : Mai 2006
    Messages : 1 172
    Par défaut
    Citation Envoyé par jerrr
    Le scénario est-il bien comme cela ?
    Oui.

    Comment as-tu précisé à maven d'utiliser Archiva?

  3. #3
    Membre confirmé
    Inscrit en
    Août 2006
    Messages
    105
    Détails du profil
    Informations forums :
    Inscription : Août 2006
    Messages : 105
    Par défaut
    Citation Envoyé par evenisse
    Comment as-tu précisé à maven d'utiliser Archiva?
    dans mon pom.xml parent
    Code pom.xml : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
          <repositories>
            <repository>
              <id>maestro-project-server</id>
              <name>Maestro Project Server</name>
              <url>http://MonServeurMaestro:8080/repository</url>
            </repository>
          </repositories>
          <pluginRepositories>
            <pluginRepository>
              <id>maestro-project-server</id>
              <name>Maestro Project Server</name>
              <url>http://MonServeurMaestro:8080/repository</url>
            </pluginRepository>
          </pluginRepositories>

    Merci pour tes éclaircissements

  4. #4
    Membre confirmé
    Inscrit en
    Août 2006
    Messages
    105
    Détails du profil
    Informations forums :
    Inscription : Août 2006
    Messages : 105
    Par défaut
    Dans la log de maestro (wrapper.log) je n'ai rein a ce sujet ??
    Il y a t-il une log pour archiva (dans le répertoire d'archiva j'ai un fichier logs/foo vide) pour suivre l'activité d'archiva et des fonctions de proxy de celui-ci ?

  5. #5
    Membre confirmé
    Inscrit en
    Août 2006
    Messages
    105
    Détails du profil
    Informations forums :
    Inscription : Août 2006
    Messages : 105
    Par défaut
    Dans quel cas doit-on utiliser proxy-http-listener

    Code project-server\apps\conf\application.xml : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    <application>
     
      <services>
        <service>
          <id>jetty</id>
          <configuration>
            <webapps>
              <webapp>
                <file>${plexus.home}/lib/archiva-webapp-1.0-maestro-1.1.war</file>
                <context>/archiva</context>
                <extraction-path>${plexus.home}/webapp</extraction-path>
                <standardWebappClassloader>true</standardWebappClassloader>
                <listeners>
                  <http-listener>
                    <port>8080</port>
                  </http-listener>
                  <!--
                  <proxy-http-listener>
                    <port>8090</port>
                    <proxy-host>localhost</proxy-host>
                    <proxy-port>80</proxy-port>
                  </proxy-http-listener>
                  -->
                </listeners>
              </webapp>
            </webapps>
          </configuration>
        </service>
      </services>
     
    </application>

  6. #6
    Membre confirmé
    Inscrit en
    Août 2006
    Messages
    105
    Détails du profil
    Informations forums :
    Inscription : Août 2006
    Messages : 105
    Par défaut
    Si dans un explorateur Web je vais sur l'url : http://localhost:8080/repository/com...ging-1.0.3.jar

    J'ai un 404 error :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
     
    Error 404 Not Found
     
    Resource in error: http://localhost:8080/repository/commons-logging/commons-logging/1.0.3/commons-logging-1.0.3.jar
     
    Exception details:
     
    it.could.webdav.DAVException: Not found
    	at it.could.webdav.methods.HEAD.process(HEAD.java:52)
    	at it.could.webdav.methods.GET.process(GET.java:58)
    	at it.could.webdav.DAVProcessor.process(DAVProcessor.java:79)
    	at it.could.webdav.DAVServlet.service(DAVServlet.java:198)
    	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
    	at org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:666)
    	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
    	at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
    	at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
    	at org.mortbay.http.HttpServer.service(HttpServer.java:909)
    	at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
    	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
    	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
    	at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
    	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
    	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

  7. #7
    Membre confirmé
    Inscrit en
    Août 2006
    Messages
    105
    Détails du profil
    Informations forums :
    Inscription : Août 2006
    Messages : 105
    Par défaut
    Il me semble que la configuration d'archiva n'est pas lu, car au debug je ne passe jamais par PlexusComponentServlet ?

    Code archiva\webapp\WEB-INF\web.xml : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
     
      <servlet>
        <servlet-name>RepositoryAccessServlet</servlet-name>
        <servlet-class>org.apache.maven.archiva.web.servlet.PlexusComponentServlet</servlet-class>
        <init-param>
          <param-name>key</param-name>
          <param-value>repositoryAccess</param-value>
        </init-param>
      </servlet>
     
      <servlet-mapping>
        <servlet-name>RepositoryAccessServlet</servlet-name>
        <url-pattern>/repository/*</url-pattern>
      </servlet-mapping>

  8. #8
    Membre confirmé
    Inscrit en
    Août 2006
    Messages
    105
    Détails du profil
    Informations forums :
    Inscription : Août 2006
    Messages : 105
    Par défaut
    Mon url n'est pas bonne

    je dois avoir :
    Code pom.xml : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
      <repositories>
            <repository>
              <id>maestro-project-server</id>
              <name>Maestro Project Server</name>
              <url>http://MonServeurMaestro:8080/archiva/repository/repositoryId/</url>
            </repository>
          </repositories>
          <pluginRepositories>
            <pluginRepository>
              <id>maestro-project-server</id>
              <name>Maestro Project Server</name>
              <url>http://MonServeurMaestro:8080/archiva/repository/repositoryId/</url>
            </pluginRepository>
          </pluginRepositories>

  9. #9
    Membre confirmé
    Inscrit en
    Août 2006
    Messages
    105
    Détails du profil
    Informations forums :
    Inscription : Août 2006
    Messages : 105
    Par défaut
    Bon maintenant il communique bien avec archiva mais j'ai un problème de login il me semble :

    Dans la log j'ai :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    jvm 1    | 2006-11-27 14:14:23,051 [SocketListener0-1] DEBUG Authenticator:user-manager     - Authenticate: PasswordBasedAuthenticationDataSource[principal=null,password=]
    jvm 1    | 2006-11-27 14:14:23,051 [SocketListener0-1] WARN  Authenticator:user-manager     - Login for user null failed. user not found.
    jvm 1    | 2006-11-27 14:14:23,051 [SocketListener0-1] DEBUG SecuritySystem:default         - authnManager.authenticate() result: AuthenticationResult[principal=null,isAuthenticated=false,exception=org.codehaus.plexus.security.authentication.AuthenticationException : authentication failed on authent
    icators: (UserManagerAuthenticator) ($ID:$) ]
    jvm 1    | 2006-11-27 14:14:23,051 [SocketListener0-1] DEBUG SecuritySystem:default         - User 'null' IS NOT authenticated.

  10. #10
    Membre confirmé
    Inscrit en
    Août 2006
    Messages
    105
    Détails du profil
    Informations forums :
    Inscription : Août 2006
    Messages : 105
    Par défaut
    Voilà cela marche si on fait :
    Code settings.xml : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
     
    <settings>
      
      <mirrors>
        <mirror>
          <mirrorOf>central</mirrorOf>
          <name>Central Mirror Repository</name>
          <url>http://MonServeurMaestro:8080/archiva/proxy/MonRepositoryID</url>
          <id>central-mirror</id>
        </mirror>
      </mirrors>
      
      
    </settings>

    Le settings.xml proposé par défaut par le serveur maestro propose l'utilisation d'archiva comme repository simple, pas comme proxy. (WebDav sur le répertoire du repository)

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Utiliser node comme proxy vers d'autres applications
    Par Black Templar dans le forum NodeJS
    Réponses: 2
    Dernier message: 07/03/2013, 19h09
  2. Utiliser son PC à distance comme proxy
    Par Tomoya dans le forum Internet
    Réponses: 1
    Dernier message: 13/11/2010, 20h12
  3. utiliser un serveur linux comme proxy ?
    Par the_boss003 dans le forum Réseau
    Réponses: 2
    Dernier message: 25/04/2009, 12h18
  4. utiliser mon serveur comme proxy ?
    Par keviin dans le forum Windows Serveur
    Réponses: 0
    Dernier message: 21/01/2009, 23h33
  5. [Réseau]Comment définir son ordi comme proxy
    Par Janitrix dans le forum Hardware
    Réponses: 4
    Dernier message: 22/09/2006, 17h51

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo