Skip to content
oliver_stueker edited this page Aug 7, 2015 · 4 revisions

<<toc></toc>>

Table of Contents

Executive summary

 * To compile a maven project, run following command on command line:
 * You can also run clean option with install option to make sure that all temporary files are deleted before a new compilation is performed:
 * Of course, you can issue them separately:

Known problems

 * Pablo Echenique: I have found that, sometimes, deleting the hidden  maven folder in my home solves compiling problems with maven.
 * Pablo Echenique: [[http://www.redleopard.com/2009/04/macroman-encoding-creeps-into-maven/|It seems]] that MacOS is stupid enough as not to use UTF-8 as default encoding, which may cause problems. Therefore, you might want to add these lines to your  file at the top of your maven repository folder:

If you are behind a proxy server

If you're using a proxy server, then you will need to tell Maven your proxy settings so that it will use them when attempting any downloads. (See also Mercurial.)

The proxy settings go in the file **$HOME/.m2/settings.xml**. If the files doesn't exist, you need to create it and put the following in it:

Unfortunately, as of this writing, Maven didn't take the settings for an https proxy from the settings.xml file. To get things to work you will need to set the **MAVEN_OPTS** environment variable with the proxy settings to pass to maven as shown below:

Alternatively, you can preface all your maven commands with the https proxy settings as shown below:

  In the maven convention, the class path for the file is therefore , so this is what we pass in using the mainClass argument. The main class of this file will then be executed/
 * -Dexec.args - this specifies a list of space-separated arguments that will be passed to the main method.
Clone this wiki locally