Skip to content

My first build

zenbones edited this page Mar 14, 2011 · 1 revision

My First Build

Java

  1. Download and install the latest version of Java 6

Git

  1. Download the latest version of the Git revision control system and install it.
  2. Create a GIT_HOME environment variable and set it to the installation directory.
  3. Add the 'bin' directory of $GIT_HOME to your path.
  4. Clone the remote repository (ssh:<user name>@204.147.180.39/<repository>) to your local machine.

Maven

  1. Download the latest version of Maven from apache and install it (currently just unzip it).
  2. Create a 'M2_HOME' environment variable and set it to the installation directory.
  3. Add the 'bin' directory of $M2_HOME to your path.
  4. Create a 'MAVEN_OPTS' environment variable and set it to "-Xms256m -Xmx256m -XX:MaxPermSize=128m".
  5. In your home directory, make sure that a '.m2' directory exists.
  6. Add a settigs.xml file in your '.m2' directory using the template below...
<code class="xml">
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <servers>
    <server>
      <id>nexus</id>
      <username>your nexus user name</username>
      <password>your nexus password</password>
    </server>
  </servers>
 
  <mirrors>
    <mirror>
      <id>nexus</id>
      <mirrorOf>*</mirrorOf>
      <url>http://nexus host:nexus port/nexus/content/groups/public</url>
    </mirror>
  </mirrors>
 
  <profiles>
    <profile>
      <id>nexus</id>
      <properties>
        <nexus.server>http://nexus host:nexus port</nexus.server>
      </properties>
      <repositories>
        <repository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
      </repositories>
     <pluginRepositories>
        <pluginRepository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
 
  <activeProfiles>
    <activeProfile>nexus</activeProfile>
  </activeProfiles>
</settings>
</code>

The Build

  1. Change directory to the install of the code base...

mvn clean install -Dmaven.test.skip=true

...and then wait for the internet to download (the first time only) and enjoy a clean first build.