|
|
|
|
![]() ![]() |
![]() Group: Members
Posts: 2 Joined: 18-August 08 From: Mexico Member No.: 66,623 |
Post
#1
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. 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 |
![]() ![]() |
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
2 | pr3dr49 | 337 | 2nd August 2004 - 10:45 AM Last post by: OpaQue |
|||
![]() |
14 | Chatz | 861 | 22nd March 2007 - 06:52 AM Last post by: Blessed |
|||
![]() |
16 | fernan | 995 | 11th September 2004 - 01:53 PM Last post by: Lurk |
|||
![]() |
19 | cyberoidx | 1,045 | 15th October 2004 - 09:03 AM Last post by: Lyubomyr |
|||
![]() |
0 | Mario | 615 | 11th September 2004 - 01:53 AM Last post by: Mario |
|||
![]() |
8 | Mr Self Destruct | 474 | 1st October 2004 - 02:00 PM Last post by: Mr Self Destruct |
|||
![]() |
2 | rowita | 384 | 5th October 2004 - 12:23 PM Last post by: norbert |
|||
![]() |
1 | rowita | 338 | 5th October 2004 - 12:18 PM Last post by: norbert |
|||
![]() |
5 | -prodigy- | 354 | 6th October 2004 - 06:37 AM Last post by: -prodigy- |
|||
![]() |
0 | rowita | 648 | 4th October 2004 - 10:48 PM Last post by: rowita |
|||
![]() |
1 | -charon- | 632 | 12th October 2004 - 12:13 PM Last post by: tasty |
|||
![]() |
18 | serverph | 1,987 | 16th May 2005 - 02:06 PM Last post by: Liquid-Fusion |
|||
![]() |
10 | rowita | 1,123 | 3rd November 2004 - 10:40 PM Last post by: rowita |
|||
![]() |
5 | rowita | 401 | 13th October 2004 - 12:38 AM Last post by: capeto |
|||
![]() |
6 | ICE-XG | 418 | 13th October 2004 - 01:21 PM Last post by: deejames |
|||
|
Open Discussion | Time is now: 8th January 2009 - 09:27 AM |