120 likes | 255 Views
Maven for building Java applications By Nalin De Zoysa http://nalin-blogging.blogspot.com/. Notes. This is an interactive session Please ask questions Prerequisites Introduction to the Java Stack. Outline. Introduce maven Basic Maven Pom File and Project Structure
E N D
Maven for building Java applications By Nalin De Zoysa http://nalin-blogging.blogspot.com/
Notes • This is an interactive session • Please ask questions • Prerequisites • Introduction to the Java Stack
Outline • Introduce maven • Basic Maven Pom File and Project Structure • Dependencies • Maven Central Repository • Maven Basic Operations
Introduce Maven • What is maven • Apache Maven is a build tool to support the developer at the whole process of a software project. • Based on the concept of XML Project Object Model (POM). • Originally developed for building Turbine. • A small core with numerous plugins
Introduce Maven • What it does • - Automate the process of the creation of the initial folder structure • - Performing the compilation and testing and the packaging and deployment • - Convention over configuration(avoid as much configuration as possible, by supplying project templates (archtypes)) • - Dependency management: - dependencies to other projects.(resolves the dependencies)
Maven Under the Hood jalopy site junit etc… test cactus artifact xdoc ear gump xdoclet javadoc java jar war ejb plugins maven core, jelly, werkz ant forehead classloader util launcher Maven
Maven Architecture Overview Build System project.xml (pom) http maven.xml (goals) Remote Repo Local Repo maven Site The Most Important Feature Remote Repository
Basic Operations - mvn install # default to run Maven #compiles, build and install the build result- mvn clean install -o # work off-line , i.e. use the local maven repository - mvn test Instead of running a full build with packaging it is also possible to just run single phases of a life cycle.
Demonstration... Lets use maven demo
Get More... • http://maven.apache.org • http://www.onjava.com/pub/a/onjava/2003/10/22/maven.html • http://www-106.ibm.com/developerworks/java/library/j-maven • http://www.javausergroup.at/events/maven.pdf • http://www.theserverside.com/articles/article.jsp?l=MavenMagic • http://blogs.codehaus.org/people/vmassol/archives/000080.html • http://www.javaworld.com/javaworld/jw-10-2002/jw-1011-maven.html
www.hSenidbiz.com www.hSenidbiz.com