Vijay has posted 2 posts at DZone. You can read more from them at their website. View Full User Profile

Setting up develoment my environment.

11.13.2011
| 799 views |
  • submit to reddit

Maven : My Rescue Tool

A simple Google Search will show a heavy load of documents and links to follow over the topic. Maven is my primary build tool since the time I were introduced with build tools.

Defining Environment

In my current work environment, I do not have access to administrator rights over the development machines. So, this is a challenge to manage and setup and development environment for your own.

Whenever I change my workstation, I have to reconfigure my work environment on this new machine. In time crunch as I do be in, it is very tough to keep up. So, in such necessity I have device this way to help me in easily setup and running my eco-system.

Requirements

  1. A Maven release package.
  2. A Java installation.
  3. Old good Maven settings.

Environment setup tool

I have created a script file env-maven.bat for Windows system and env-maven.sh for my Linux systems. Below is the content of script for Windows machines.

 

echo off

set M2_HOME=D:/vshan/tools/apache-maven-2.2.1
set JAVA_HOME=D:/vshan/tools/jdk1.6.0_24
set PATH=%PATH%;%M2_HOME%/bin;

C:\Windows\System32\cmd.exe

This script executes and launch a command prompt with Maven executable is set in system class path.

0
Published at DZone with permission of its author, Vijay Shanker.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)