Plan What is Maven ? Links : mvn command line tool

Slides:



Advertisements
Similar presentations
Vincent Massol, 1 st December 2006 Quality with Maven2.
Advertisements

Introduction to Maven 2.0 An open source build tool for Enterprise Java projects Mahen Goonewardene.
Developing in CAS. Why? As distributed you edit CAS 3 with Eclipse and build with Maven 2 – Best Practice for Release Engineering – Difficult edit-debug.
Introduction to Maven Michael Youngstrom. Notes This is a training NOT a presentation Please ask questions Prerequisites – Introduction to the Java Stack.
Transitions of Care Reference Implementation Development Overview July 5, 2011.
Developing CAS in Eclipse
Java Build Tool Comparison HJUG - April 29th, 2009 John Tyler.
Maven: Build and project management in the 21th century.
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
Open source administration software for education research administration Lin-Long Shyu System Analyst Kuali Coeus Technical Team Indiana University
Open source administration software for education 2012 User Conference April 22-24, 2012 – Atlanta, Georgia “Together Toward Tomorrow” Chris Denne, Colorado.
APACHE MAVEN Bhavana Sudharshan Jaydeep Patel. Introduction What is Maven? “Maven is a software management and comprehension tool based on the concept.
Maven and Stack Starter Michael Youngstrom. Notes This is a training NOT a presentation Please ask questions Prerequisites – Introduction to Java Stack.
Using Maven2. Free Maven Books Maven: The Definitive Guide (alpha)‏ Better Builds with Maven
Maven & Bamboo CONTINUOUS INTEGRATION. QA in a large organization In a large organization that manages over 100 applications and over 20 developers, implementing.
MAVEN-BLUEMARTINI Yannick Robin. What is maven-bluemartini?  maven-bluemartini is Maven archetypes for Blue Martini projects  Open source project on.
Sumedha Rubasinghe October,2009 Introduction to Programming Tools.
What’s new in Stack 3.2 Michael Youngstrom. Disclaimer This IS a presentation – So sit back and relax Please ask questions.
LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:
|Tecnologie Web L-A Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat
Using the ALM Module Fully Automated Deployments in Stack 3.2.
INFSOM-RI Juelich, 10 June 2008 ETICS - Maven From competition, to collaboration.
Search Technologies Maven Repository (Mirror) Central Repository (repo1.maven.org) Local Repository (/users/you/.m2) Local Machine Project target Project.
INFSO-RI JRA2: Testing senarious ETICS AH meeting Budapest, Iune 2009 Eva Takacs, Jozsef Kuti, András Milassin 4D Soft.
Using the ALM Module Michael Youngstrom. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in lab Please ask questions.
July 2011CMSC 341 CVS/Ant 1 CMSC 341 Java Packages Ant CVS Project Submission.
1 may 31, 2007 Build, test and deploy ADF applications without effort with the use of Maven2 Aino Andriessen AMIS.
Introduction to Maven 2. Basics Convention over Configuration Declarative project management DRY.
Maven 2.0 Improve your build patterns Vincent Massol CTO Pivolis.
Maven for building Java applications By Nalin De Zoysa
Enterprise Java v090125Dev Env Overview1 Enterprise Java ( ) Development Environment Overview.
Apache m aven Introduction to. Juven Xu twitter.com/juvenxu.
Build Systems Presentation December 14, 2015 Noon-1pm Kathy Lee Simunich Bldg. 203/ D120 Brought to you by: Argonne Java.
All the dSoftArk Tools Getting started!. Tools dSoftArk is a semi-realistic, agile, development project –Industrial strength software (programming, TDD,
Managing your builds with Maven 2 Craig Walls LoneStar Software Symposium 2007
® IBM Software Group © 2006 IBM Corporation Rational Asset Manager v7.2 Using Scripting Tutorial for using command line and scripting using Ant Tasks Carlos.
Software Deployment & Release 26/03/2015 1EN-ICE.
UpgradinguPortal to What’s new that matters Better use of third party frameworks Faster! Improved caching Drag and Drop New Skin & Theme Accessibility.
(1) Code Walkthrough robocode-pmj-dacruzer Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of.
Maven. Introduction Using Maven (I) – Installing the Maven plugin for Eclipse – Creating a Maven Project – Building the Project Understanding the POM.
From Venus to Mars Developer land Real world Maven Alfresco SDK is fun! -Pamp-to-war Alfresco AMP Archetype Share AMP Archetype.
CS520 Web Programming Introduction to Maven Chengyu Sun California State University, Los Angeles.
An Introduction to Ant. What is Ant? How do you use it? Why would you want to?
Maven & NetBeans Platform. Agenda ● Maven NetBeans Platform Project Types ● Three NetBeans RCP project types ● Differences with Ant project types ● All.
Platform & Maven2 David Šimonek. Certified Engineer Course Agenda What is Maven? Why Maven? NB IDE & Maven NB Platform & Maven.
Agenda:- DevOps Tools Chef Jenkins Puppet Apache Ant Apache Maven Logstash Docker New Relic Gradle Git.
Open-O Integration Project Introduction
with Some Eclipse Tricks included Safa Bacanlı Fall 16
Maven 04 March
CS520 Web Programming Introduction to Maven
Build Automation with Gradle
Modern “Servlet” Development
Bhavana Sudharshan Jaydeep Patel
Test Driven Development
prepared by hasan.we4tech.com
Project management and comprehension tool
Chengyu Sun California State University, Los Angeles
Using Maven2.
Maven IIB9 Plug-in Version 9.0
With Some Eclipse Tricks included.
Mark Dönszelmann Stanford Linear Accelerator Center
Devops Jenkins as CI/CD tool Created By: Amrit Choudhary
Maven IIB9 Plug-in Version 9.0
Escidoc build and development environment
Build Tools Software Engineering SS 2007
Continuous Integration
Java Code Review with CheckStyle
Práctica 1.
Software Engineering and Architecture
Presentation transcript:

Plan What is Maven ? Links : mvn command line tool POM : 1 pom.xml = 1 artifact POM POM Inheritance Standard Directory Layout Demo on JMMC projects Plugins Conclusion

What is Maven ? Apache Maven is a software project management and comprehension tool (build, test, packaging, reporting, site, deploy). != Apache ant (make like) Key features : POM : Project Object Model Dependency management Convention over configuration Plugins IDE integration (eclipse, netbeans ...)

Links : Project page : http://maven.apache.org/ Plugins : http://maven.apache.org/plugins/index.html Maven book : http://books.sonatype.com/mvnref-book/reference/index.html En français : http://maven-guide-fr.erwan-alliaume.com/ Mvn repository : http://mvnrepository.com/

mvn command line tool Install Maven (Java tool) => mvn command Settings : <home>/.m2/settings.xml Local repository : <home>/.m2/repository/ mvn install:install-file (missing library) mvn clean mvn package mvn clean install (into local repository) mvn test ... Easy to use Maven in IDE GOALS

.m2/settings.xml <settings> <offline>false</offline> <proxies> <proxy> <active>true</active> <protocol>http</protocol> <host>www-cache.ujf-grenoble.fr</host> <port>3128</port> <nonProxyHosts>*.jmmc.fr</nonProxyHosts> </proxy> </proxies> <profiles> <profile> <id>dev</id> <properties> <!-- disable jar signer --> <jarsigner.skip>true</jarsigner.skip> <!-- disable javadoc --> <maven.javadoc.skip>true</maven.javadoc.skip> <!-- disable tests --> <maven.test.skip>true</maven.test.skip> </properties> </profile> </profiles> <activeProfiles> <activeProfile>dev</activeProfile> </activeProfiles> </settings> .m2/settings.xml

POM : 1 pom.xml = 1 artifact

POM INHERITANCE ARTIFACT DEPENDENCY PLUGIN <?xml version="1.0" encoding="UTF-8" standalone="no"?> <project xmlns="http://maven.apache.org/POM/4.0.0"> <modelVersion>4.0.0</modelVersion> <parent> … </parent> <groupId>fr.jmmc.jmcs</groupId> <artifactId>jmcs</artifactId> <version>X.Y</version> <packaging>jar</packaging> ... <properties> </properties> <dependencies> </dependencies> <build> <plugins> </plugins> </build> </project> <parent> <groupId>fr.jmmc</groupId> <artifactId>jmmc</artifactId> <version>TRUNK</version> </parent> <dependency> <groupId>org.slf4j</groupId> <artifactId>jul-to-slf4j</artifactId> <version>1.7.6</version> </dependency> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> INHERITANCE ARTIFACT DEPENDENCY PLUGIN

POM Inheritance Override default configuration in POM : Maven settings Parent POM(s) (hierarchy) POM (current project) Active Profiles (dev) to finally set properties, login/password and env settings ... => Use Effective POM or an IDE mvn help:effective-pom

Standard Directory Layout http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html Use configuration to customize folders to your project setup ! src/main/java Source code src/main/resources Resource files src/main/config Configuration files src/main/scripts Scripts src/main/webapp Web application source src/test/java Test source code src/test/resources Test resource files src/site Site pom.xml POM LICENSE.txt License target/ Build output

Demo on JMMC projects Many artifacts : jmmc (super pom) gathers common config Jmcs library + deps Jmal library + deps … Aspro2 application Multi-module approach : exist oidb project Interest : dependencies are shared and transitive final package gathers all jar files + code signing

Plugins http://maven.apache.org/plugins/index.html - resource filtering (variable substitution) - site : generate a web site for the project - surefire : unit tests (junit) - packaging : jar, war, source ... - reporting : javadoc, pmd, checkstyle, changelog … Tools : - antrun : executes custom ant tasks - archetype : create a new project (template) - assembly (packaging) : jar with deps, zip, project or custom - dependency : copy dependencies … - scm : versioning integration (svn, git) - tomcat : run + deployment

Conclusion Very powerful but … A lot of conventions / configurations and Plugins = a bit cumbersome to find what you need Easier if you adopt the standard directory layout Other language support : PHP : http://www.php-maven.org/ C/C++ : http://maven-nar.github.io/