Showing posts with label maven. Show all posts
Showing posts with label maven. Show all posts

Saturday, August 17, 2013

Friday, June 1, 2012

How to install a jar into local Maven repository

Hello.
I often  face a problem when I need to use some Java library in my Maven based project, but this library is not available in any Maven repository and is distributed as a .jar file. In this post I'll describe two ways how to fix this problem.

Thursday, May 31, 2012

How to install Maven in Ubuntu 11.10

Installation of Maven in Ubuntu Linux is simple and straightforward.

First you need to download maven from Apache web-site.

Unpack it:
unzip apache-maven-3.0.4-bin.zip


I prefer to put all manually installed software to /opt but you can select /usr/local/bin or any other directory as well:
sudo mv apache-maven-3.0.4 /opt

Now let's create a symbolic link to this directory with a shorter name:
cd /opt
ln -s /opt/apache-maven-3.0.4/ maven

Now if things go wrong with this version we will be able to change it easily just by changing symbolic link.

The last thing we need to do is to specify where our maven executables are.
We need to add this line at the end of  ~/.bashrc:
export PATH=/opt/bin:${PATH}

or if you selected other directory:
export PATH=<path-to-maven-folder>/bin:${PATH} 

Now you need to close your shell and open it again, or do:
source ~/.bashrc

or just to execute the command you added to the end of your .bashrc in your shell.

Now you can check if your Maven works:
$ mvn --version
Apache Maven 3.0.4 (r1232337; 2012-01-17 08:44:56+0000)
Maven home: /opt/mavenJava version: 1.7.0_02, vendor: Oracle Corporation
Java home: /usr/lib/jvm/jdk1.7.0/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "3.0.0-20-generic", arch: "i386", family: "unix"

Everything seems to be OK.
That's all.
Good luck.

Tuesday, August 2, 2011

Setup Maven checkstyle plugin

When your project start to grow and new developers join your team you need keep your project from turning into a mess. One of steps to avoid it - bringing style conventions. In this post I will describe how to setup a Maven plugin that checks style of your project's code. Installing and configuring should take no more than three hours.

Sunday, July 3, 2011

Create runnable Scala .jar with Maven

Hello.


Today I want to describe how you can create executable jar file with Maven, so you can build it and run on any computer, even without Scala installed there.