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
Page: daemontools

5 Comments
Hide/Show CommentsJul 10, 2004
Stepan Koltsov
There is no files at the given address...
Jul 10, 2004
Jörg Schaible
Look into http://dist.codehaus.org/maven-proxy/jars
Sep 12, 2006
prasanth nath
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
Sep 12, 2006
Ben Walding
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).
Dec 01, 2008
David Leonard
@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]