Skip to end of metadata
Go to start of metadata

Installation

  • Save the distribution of choice (http://dist.codehaus.org/maven-proxy/distributions/).
  • Create the property file Configuration
  • Launch it standalone
  • or deploy the war file to the application server of your choice, editing WEB-INF/web.xml
Labels
  • None
  1. Jul 10, 2004

    There is no files at the given address...

  2. Sep 12, 2006

      A couple of notes regarding Web application installation:

      1. The path to your maven property file should be the full path. For egs, /usr/share/tomcat/webapps/maven-proxy/maven-proxy.properties.  It is NOT picked up w.r.t WEB-INF/classes folder.

     2. This might be obvious, but not to all. Web apps cannot serve files outside of its context root, directly. So your repository location should be within your web-application location. For inst, if your tomcat is at /usr/share/tomcat/, and your web application folder is "maven-proxy", then, your repository location should be somewhere within /usr/share/tomcat/webapps/maven-proxy/ directory. Incidently, in linux, you could create a softlink here, which links to some folder outside of web-app installation folder.

     3. The url where jars are served by maven-proxy would be http://<server>:<port>/<we-app name>/<repository context>.

       <web-app name> is the name of your exploded folder, which contains your web app.

      <repository> is the context path to serve files. This is confiured in web.xml of the application. If you specify it as say "foo", then your maven jars are served at http://machine:port/appname/foo/.

        Above discussion assumes Tomcat as servlet container.
     4. Now, when you run maven, you MUST specify the repository using the maven.repo.remote property and set its value to something like  "http://host:port/appname/repository". Otherwise, it downloads stuff from repo1.maven.org.. or whatever is configured.

     5. Also, in your maven-proxy.properties, make sure you understand how proxies are specified. Listing for codehaus,  ibliblio etc have proxies set as "one", "two" etc. Ensure that you set your proxy first, and then change these properties to reflect the new key under which proxies are stored..

         For egs:

      # I have only one proxy.proxy.list=my_comp_proxy

    #Unauthenticated proxy
    proxy.my_comp_proxy.host=proxy1.example.com
    proxy.my_comp_proxy.port=3128
    ......# setting repositories.. #www.ibiblio.org
    repo.www-ibiblio-org.url=http://www.ibiblio.org/maven
    repo.www-ibiblio-org.description=www.ibiblio.org# Observe the the value of proxy property below, is "my_comp_proxy". repo.www-ibiblio-org.proxy=my_comp_proxy
    ......
    #dist.codehaus.org 
     

        
     

  3. Sep 12, 2006

    In regards to 2 - maven-proxy can serve outside the web-app as it uses a dedicated servlet to do so.

    This servlet has full access to your filesystem (bounded by OS permissions of course).

  4. Dec 01, 2008

    @prasanth-nath:
    In step 4, I found this guide to configuring the maven mirror URLs in ~/.m2/settings.xml: [http://maven.apache.org/guides/mini/guide-mirror-settings.html]