There are a few steps which you need to perform:
- Check your JDK installation. If you don't have JDK, you will need to install one (1.5 or above).
- Install Apache Maven 3.0.5.
- Test your installation.
1. Check/Install JDK
To check if you have Java installed just type this in your terminal:You should get the following result if Java is installed:
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
I'm using Java 1.7.0_25. To make sure that you have installed both JDK and JRE, not only JRE, an additional check should include javac (Java compiler). Type which javac in your terminal and you should get a path to your Java compiler, which looks like this: /usr/bin/javac. If output is empty it means that you don't have JDK installed - go to If JDK is not present step.
If JDK is not present:
command not found: javaor: empty which result.
Let's install JDK:
- Go to JDK download page.
- Download JDK for Mac OS X x64 (you will have to accept licence agreement first).
- Install JDK like a normal DMG file.
2. Install Apache Maven
I'm going to describe tree different methods: Homebrew, MacPorts, manually.Install Apache Maven with Homebrew
Install Apache Maven with MacPorts
Install Apache Maven manually
- Download Apache Maven 3.0.5:
- Extract it:
- Go to /usr/local:
- Create a symbolic link to your apache-maven-3.0.5-bin directory:
- Export variables (probably you'll want to put these commands in ~/.profile or other shell startup script):
3. Test Apache Maven installation
To test if maven is properly installed on your computer just put: in your shell. You will get information about Maven installation or command not found - it depends on the result of the installation process.Example output (Apache Maven installed with Homebrew):
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:28+0100)
Maven home: /usr/local/Cellar/maven/3.0.5/libexec
Java version: 1.6.0_51, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: pl_PL, platform encoding: MacCentralEurope
OS name: "mac os x", version: "10.8.4", arch: "x86_64", family: "mac"
I've just realized that SyntaxHighlighter (I belive by Alex Gorbatchev) is not working on iOS (Safari). At least for mobile version of this site (this is blogger.com blog).
Sorry for technical problems. I will stop using this tool.
Best Regards,
Michael Flowersky
Unknown
August 1, 2013 at 11:08 PMADDITIONAL INFORMATION: Maven came pre installed since version 10.6.8 Mac OS X Snow Leopard.
Unknown
August 2, 2013 at 1:37 AM