IPB

Welcome Guest ( Log In | Register )



Tags
This content has not been tagged yet
 
Reply to this topicStart new topic

Short Info About About Apache Maven.

, It's a brief description about Apache Maven and how does it woks.


j44p
no avatar
Newbie
*
Group: Members
Posts: 2
Joined: 18-August 08
From: Mexico
Member No.: 66,623



Post #1 post Aug 18 2008, 06:58 PM
Hi there.

Well, it's my first post and I'd like to write about Apache Maven: What is it? How does it works? and a short example.

I hope this post results interesting and useful for someone, and well. Let's start.!

What is Apache Maven?

Apache Maven(or simple Maven) is a helpful tool design to create and build projects (usually Java Projects) almost in the same way than Ant and the classic "GnuMake", but Maven goes beyond and incorporate some another concepts like: archetypes, build cycles and plug-ins

For those who had use Ant, the way you build and use Maven would result very intuitive, at lest in the way you use it.

How does it work? and a short example

Maven is an executable .jar file and often the only thing to install it is download the .tgz untar the distribution archive and add it to the classpath.

The next step is to achieve one file named pom.xml who's the basic unit for configure and create a complete project in maven.

A simple pom.xml would be:

[codebox]
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>Maven Quick Start Archetype</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
[/codebox]

Whit this file in our base folder we are ready for use maven:

[codebox]
$> mvn package
[/codebox]

and the output:

[codebox]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9 seconds
[INFO] Finished at: Mon Aug 18 13:15:38 CDT 2008
[INFO] Final Memory: 18M/75M
[INFO] ------------------------------------------------------------------------
[/codebox]

Means that maven is working fittingly. smile.gif

Finally:

If you want you can visit the 5 minuts tutorial form the Apache Project:

http://maven.apache.org/guides/getting-sta...ve-minutes.html

Next days I'll update this post for show you how to build a simple application and how and where to find archetypes.

See you!

This post has been edited by j44p: Aug 18 2008, 06:59 PM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   2 pr3dr49 337 2nd August 2004 - 10:45 AM
Last post by: OpaQue
No new   14 Chatz 861 22nd March 2007 - 06:52 AM
Last post by: Blessed
No new   16 fernan 995 11th September 2004 - 01:53 PM
Last post by: Lurk
No new   19 cyberoidx 1,045 15th October 2004 - 09:03 AM
Last post by: Lyubomyr
No New Posts   0 Mario 615 11th September 2004 - 01:53 AM
Last post by: Mario
No New Posts   8 Mr Self Destruct 474 1st October 2004 - 02:00 PM
Last post by: Mr Self Destruct
No New Posts 2 rowita 384 5th October 2004 - 12:23 PM
Last post by: norbert
No New Posts 1 rowita 338 5th October 2004 - 12:18 PM
Last post by: norbert
No New Posts   5 -prodigy- 354 6th October 2004 - 06:37 AM
Last post by: -prodigy-
No New Posts 0 rowita 648 4th October 2004 - 10:48 PM
Last post by: rowita
No New Posts   1 -charon- 632 12th October 2004 - 12:13 PM
Last post by: tasty
No new 18 serverph 1,987 16th May 2005 - 02:06 PM
Last post by: Liquid-Fusion
No New Posts 10 rowita 1,123 3rd November 2004 - 10:40 PM
Last post by: rowita
No New Posts 5 rowita 401 13th October 2004 - 12:38 AM
Last post by: capeto
No New Posts   6 ICE-XG 418 13th October 2004 - 01:21 PM
Last post by: deejames


 



RSS Open Discussion Time is now: 8th January 2009 - 09:27 AM