Maven2. Configuration and Build Management. Robert Reiz

Similar documents
Software project management. and. Maven

Build management & Continuous integration. with Maven & Hudson

Maven or how to automate java builds, tests and version management with open source tools

Hands on exercise for

Presentation of Enterprise Service Bus(ESB) and. Apache ServiceMix. Håkon Sagehaug

Maven2 Reference. Invoking Maven General Syntax: Prints help debugging output, very useful to diagnose. Creating a new Project (jar) Example:

Continuous Integration Multi-Stage Builds for Quality Assurance

Continuous integration in OSGi projects using Maven (v:0.1) Sergio Blanco Diez

Software project management. and. Maven

Integrating your Maven Build and Tomcat Deployment

by Charles Souillard CTO and co-founder, BonitaSoft

Sonatype CLM for Maven. Sonatype CLM for Maven

Sonatype CLM Enforcement Points - Continuous Integration (CI) Sonatype CLM Enforcement Points - Continuous Integration (CI)

Contents. Apache Log4j. What is logging. Disadvantages 15/01/2013. What are the advantages of logging? Enterprise Systems Log4j and Maven

Content. Development Tools 2(63)

COMPUTACIÓN ORIENTADA A SERVICIOS (PRÁCTICA) Dr. Mauricio Arroqui EXA-UNICEN

AEM Developer Tools for Eclipse

Meister Going Beyond Maven

Developer Guide: Smartphone Mobiliser Applications. Sybase Mobiliser Platform 5.1 SP03

Integration with Other Tools

Introduction to Programming Tools. Anjana & Shankar September,2010

Software Quality Exercise 2

Maven 2 in the real world

Jukka Kokko SOFTWARE BUILD AND RELEASE MANAGEMENT FOR A WIRELESS PRODUCT WITH OPEN SOURCE TOOLS

HELIO Storage Service Developers Guide Draft

Maven by Example. Maven by Example. Ed. 0.7

Software infrastructure for Java development projects

Hudson configuration manual

Integration in Practice

CI/CD Cheatsheet. Lars Fabian Tuchel Date: 18.March 2014 DOC:

Java Forum Nord Dirk Mahler

Automated performance testing using Maven & JMeter. George Barnett, Atlassian Software

GECKO Software. Introducing FACTORY SCHEMES. Adaptable software factory Patterns

Programming with Android: SDK install and initial setup. Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna

Jenkins User Conference Herzelia, July #jenkinsconf. Testing a Large Support Matrix Using Jenkins. Amir Kibbar HP

Jenkins on Windows with StreamBase

Programming with Android: SDK install and initial setup. Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna

1 Building, Deploying and Testing DPES application

Continuous Integration For Fusion Middleware

Maven 3 New Features. Stefan Scheidt Solution Architect OPITZ CONSULTING GmbH

Drupal CMS for marketing sites

Builder User Guide. Version Visual Rules Suite - Builder. Bosch Software Innovations

Configuration Manual Yahoo Cloud System Benchmark (YCSB) 24-Mar-14 SEECS-NUST Faria Mehak

Beginners guide to continuous integration. Gilles QUERRET Riverside Software

Builder User Guide. Version 5.4. Visual Rules Suite - Builder. Bosch Software Innovations

Creating an application with the Virgo Web Server

Grunt, Gulp & fabs. Build-System and Development-Workflow for modern Web-Applications

Android: Setup Hello, World: Android Edition. due by noon ET on Wed 2/22. Ingredients.

Enterprise Service Bus

Upping the game. Improving your software development process

D5.4.4 Integrated SemaGrow Stack API components

Networks and Services

Leveraging Rational Team Concert's build capabilities for Continuous Integration

Rapid Application Development. and Application Generation Tools. Walter Knesel

The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is recommended.

Developer s Guide. How to Develop a Communiqué Digital Asset Management Solution

Developing Web Services with Eclipse and Open Source. Claire Rogers Developer Resources and Partner Enablement, HP February, 2004

Tobar Segais: User Manual. Stephen Connolly

Hello World. by Elliot Khazon

Fahim Uddin 1. Java SDK

Practicing Continuous Delivery using Hudson. Winston Prakash Oracle Corporation

Nexus Professional Whitepaper. Repository Management: Stages of Adoption

BIRT Application and BIRT Report Deployment Functional Specification

Installing the Android SDK

SOA-14: Continuous Integration in SOA Projects Andreas Gies

Software Delivery Integration and Source Code Management. for Suppliers

ADT Plugin for Eclipse

Android Environment SDK

EMC Documentum Composer

Adobe Summit 2015 Lab 712: Building Mobile Apps: A PhoneGap Enterprise Introduction for Developers

Oracle FLEXCUBE Direct Banking Android Tab Client Installation Guide Release

Beginner s guide to continuous integration. Gilles QUERRET Riverside Software

! E6893 Big Data Analytics:! Demo Session II: Mahout working with Eclipse and Maven for Collaborative Filtering

Automate Your Deployment with Bamboo, Drush and Features DrupalCamp Scotland, 9 th 10 th May 2014

IBM TRIRIGA Anywhere Version 10 Release 4. Installing a development environment

Mind The Gap! Setting Up A Code Structure Building Bridges

Click Start > Control Panel > System icon to open System Properties dialog box. Click Advanced > Environment Variables.

Building OWASP ZAP Using Eclipse IDE

Mastering Continuous Integration with Jenkins

SAP Web IDE Hybrid App Toolkit Add-on

Oracle Fusion Middleware. 1 Oracle Team Productivity Center Server System Requirements. 2 Installing the Oracle Team Productivity Center Server

Adaptive Workload Offloading For Efficient Mobile Cloud Computing Jayashree Lakade Venus Sarode

OpenDaylight & PacketFence install guide. for PacketFence version 4.5.0

Continuous Integration (CI) and Testing - Configuring Bamboo, Hudson, and TestMaker

Setting up Hadoop with MongoDB on Windows 7 64-bit

WA Continuous Integration with Jenkins- CI, Maven and Nexus. Classroom Setup Guide. Web Age Solutions Inc. Web Age Solutions Inc.

Improving Software Quality with the Continuous Integration Server Hudson. Dr. Ullrich Hafner Avaloq Evolution AG 8911

Software Construction

Profiling and Testing with Test and Performance Tools Platform (TPTP)

Mobile Labs Plugin for IBM Urban Code Deploy

Introduction to the Podcast Series and the Connection to the Lecture and Lab

Transcription:

Maven2 Configuration and Build Management Robert Reiz

A presentation is not a documentation! A presentation should just support the speaker! PLOIN Because it's your time Seite 2

1 What is Maven2 2 Short Introduction 3 Maven2 Advanced PLOIN Because it's your time Seite 3

1 What is Maven? PLOIN Because it's your time Seite 4

1 What is Maven? - Maven exist since 2001. - Maven2 exist since 2003. - Maven2 is a completely new development. - Maven2 is not compatible to Maven1. - Maven3 is compatible to Maven2. PLOIN Because it's your time Seite 5

1 What is Maven? - A better Ant? - Project Description / Project Management - Reporting (Metrics, Code Coverage, Tracking) - Documentation - Testing PLOIN Because it's your time Seite 6

1 What is Maven? - Description of Dependencys - Convention over Configuration? - Best Practice - DRY - Lifecycle PLOIN Because it's your time Seite 7

1 What is Maven? /src/ /pom.xml PLOIN Because it's your time Seite 8

1 What is Maven? /src/ /target/ /pom.xml PLOIN Because it's your time Seite 9

1 What is Maven? /src/ main/ test/ site/ /pom.xml PLOIN Because it's your time Seite 10

1 What is Maven? /src/ main/ java/ resources/ webcontent/ test/ site/ /pom.xml PLOIN Because it's your time Seite 11

1 What is Maven? /src/ main/ java/ resources/ webcontent/ test/ java/ resources/ site/ /pom.xml PLOIN Because it's your time Seite 12

1 What is Maven? /src/ main/ java/ org.ploin.app.start.java resources/ webcontent/ test/ java/ org.ploin.app.starttest.java resources/ site/ /pom.xml PLOIN Because it's your time Seite 13

1 What is Maven? /src/ main/ java/ org.ploin.app.start.java resources/ webcontent/ test/ java/ org.ploin.app.starttest.java resources/ site/ /pom.xml PLOIN Because it's your time Seite 14

1 What is Maven? <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>myfirstmaven</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> PLOIN Because it's your time Seite 15

1 What is Maven? Commandline command: mvn compile http://repo1.maven.org/maven2/ PLOIN Because it's your time Seite 16

1 What is Maven? ~/.m2/repository/ PLOIN Because it's your time Seite 17

1 What is Maven? Lifecycle - Phases validate compile test package integration-test install deploy PLOIN Because it's your time Seite 18

1 What is Maven? Maven Commands: mvn compile mvn test mvn package mvn install mvn eclipse:eclipse mvn idea:idea mvn clean PLOIN Because it's your time Seite 19

1 What is Maven? Maven Packeging: ploinmailfactory-1.3.1.jar ploinmailfactory-1.3.1-javadoc.jar ploinmailfactory-1.3.1-sources.jar ploinmailfactory-1.3.1-jdk5.jar ploinmailfactory-1.3.1-jdk1.4.jar PLOIN Because it's your time Seite 20

1 What is Maven? Maven Packeging: <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-javadoc-plugin</artifactid> <executions> <execution> <id>attach-sources</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-source-plugin</artifactid> <executions> <execution> <id>attach-sources</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> PLOIN Because it's your time Seite 21

1 What is Maven? Maven Packeging: mvn -DdownloadJavadocs -DdownloadSources idea:idea mvn -DdownloadJavadocs DdownloadSources eclipse:eclipse PLOIN Because it's your time Seite 22

2 Short Introduction PLOIN Because it's your time Seite 23

2 Short Introduction http://maven.apache.org/ PLOIN Because it's your time Seite 24

2 Short Introduction 1. Download Zip File. 2. Unzip. PLOIN Because it's your time Seite 25

2 Short Introduction 1. export PATH = $PATH:pathToMaven2/bin 2. export M2_HOME = pathtomaven2 3. export M2 = pathtomaven2/bin 4. export JAVA_HOME = pathtoyourjavahome PLOIN Because it's your time Seite 26

2 Short Introduction PLOIN Because it's your time Seite 27

2 Short Introduction Quick online introduction: Maven-Quickinstall: http://robert-reiz.com/2008/02/21/maven2-quickinstall-2/ Maven-Quickinstall for Mac OS X: http://robert-reiz.com/2010/10/02/maven2-quickinstall-for-mac-os-x/ PLOIN Because it's your time Seite 28

indt Eclipse-Plugin PLOIN Because it's your time Seite 29

2 Short Introduction PLOIN Because it's your time Seite 30

2 Short Introduction PLOIN Because it's your time

2 Short Introduction http://m2eclipse.sonatype.org/update/ PLOIN Because it's your time

2 Short Introduction PLOIN Because it's your time

Maven2 - Import Project into Eclipse PLOIN Because it's your time Seite 34

2 Short Introduction In Project-Root (where the pom.xml is located): mvn eclipse:eclipse!! This command generates Eclipse Metafiles PLOIN Because it's your time Seite 35

2 Short Introduction PLOIN Because it's your time

2 Short Introduction PLOIN Because it's your time

2 Short Introduction PLOIN Because it's your time

2 Short Introduction Short Intro: Maven-Quickinstall + Eclipse: http://robert-reiz.com/2008/02/21/maven2-quickinstall-2/ PLOIN Because it's your time

Live Demo PLOIN Because it's your time Seite 40

3 Maven2 Advanced PLOIN Because it's your time Seite 41

3 Maven2 Advanced Dependencies & Exclusions <dependency> <groupid>org.springframework</groupid> <artifactid>spring-hibernate3</artifactid> <version>[2.0.8,)</version> <scope>compile</scope> <exclusions> <exclusion> <groupid>org.hibernate</groupid> <artifactid>hibernate</artifactid> </exclusion> </exclusions> </dependency> PLOIN Because it's your time Seite 42

3 Maven2 Advanced Dependencies version ranges <version>[1.0,)</version> -> always the newest version <version>(,1.0],[1.2,)</version> -> everything but not 1.1 <version>[1.0,2.0]</version> -> everything from 1.0 to 2.0 PLOIN Because it's your time Seite 43

3 Maven2 Advanced Maven through Proxies <settings>.. <proxies> <proxy> <active>true</active> <protocol>http</protocol> <host>proxy.somewhere.com</host> <port>8080</port> <username>proxyuser</username> <password>somepassword</password> <nonproxyhosts>www.google.com *.somewhere.com</nonproxyhosts> </proxy> </proxies>.. </settings> PLOIN Because it's your time Seite 44

3 Maven2 Advanced Your own M2 Repository Server PLOIN Because it's your time Seite 45

3 Maven2 Advanced PLOIN Because it's your time Seite 46

3 Maven2 Advanced Archetypes PLOIN Because it's your time Seite 47

3 Maven2 Advanced mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.mycompany.app -DartifactId=my-app mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-webapp -DgroupId=com.mycompany.app -DartifactId=my-webapp PLOIN Because it's your time Seite 48

3 Maven2 Advanced http://robert-reiz.com/tutorials/archetypes/ PLOIN Because it's your time Seite 49

Archetypes Demo PLOIN Because it's your time Seite 50

PLOIN Because it's your time Seite 51

??? PLOIN Because it's your time Seite 52