SlideShare a Scribd company logo
by Amelia Ilies,
Kati Holasz
Setup
Maven is Java based tool, so the very first requirement is to have JDK installed in your machine.
Download and install Java JDK::
http://www.oracle.com/technetwork/java/javase/downloads/jdk6downloads-1902814.html
Download and install Apache Maven:
http://maven.apache.org/download.cgi
Download and install Eclipse JDK:
http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/junosr2
Download and install Mozilla Firefox:
http://www.mozilla.org/
Steps
Step 1Step 1 - verify Java installation in your machine- verify Java installation in your machine c:>java -versionc:>java -version
Step 2Step 2 - set JAVA environment:- set JAVA environment: JAVA_HOME to C:ProgramJAVA_HOME to C:Program
FilesJavajdk1.6.0_21FilesJavajdk1.6.0_21
Step 3Step 3 - download Maven archive:- download Maven archive: http://maven.apache.org/download.htmlhttp://maven.apache.org/download.html
Step 4Step 4 - extract the Maven archive:- extract the Maven archive: C:Program FilesApache SoftwareC:Program FilesApache Software
Foundationapache-mavenFoundationapache-maven
4
Setup environment variablesSetup environment variables
Start → Control Panel → System and Security → System → Advanced system settings → Environment Variables
Step 5Step 5 - set Maven environment variables:- set Maven environment variables:
Step 6Step 6 – set Path for Maven and Java– set Path for Maven and Java
Step 7Step 7 - verify Maven installation:- verify Maven installation:
c:> mvn --versionc:> mvn --version
Creating a Java project using
Execute the following mvn command:
C:MVN>mvn archetype:generate
→DgroupId=com
→DartifactId=application
→DarchetypeArtifactId=maven-archetype-quickstart
→DinteractiveMode=false
Creating a Java project using
Creating a Java project using
.
Import Maven
Project
After Import – into Eclipse IDe
SureFire and FailSafe configuration – Pom.xml
SureFireSureFire FailSafeFailSafe
Running tests in parallel
Using JUnit
Running test
Run tests with:
mvn surefire:test
Run test with FailSafe
mvn failsafe:test-integration
mvn failsafe:verify
Run a single test
mvn -Dtest=Login test
Run a set of methods in a single test
mvn -Dtest=LoginTest#Log_In test
Generate reports and site
mvn site
Skip tests with SureFire
- go to pom.xml and add: <skip>true</skip> to configuration tag specific to SureFire
Good Luck!

More Related Content

DOCX
Api webservice setupinstructions
PDF
Spring Boot
PDF
Spring Boot and Microservices
PDF
What's New in AppFuse 2.0
ODP
Xke spring boot
PPTX
PPTX
Spring Boot Tutorial
PPTX
How to customize Spring Boot?
Api webservice setupinstructions
Spring Boot
Spring Boot and Microservices
What's New in AppFuse 2.0
Xke spring boot
Spring Boot Tutorial
How to customize Spring Boot?

What's hot (20)

PPTX
PDF
Spring boot introduction
PDF
Banquet 42
PDF
Upgrading to Selenium WebDriver version 3
PDF
Testing Like a Pro - Chef Infrastructure Testing
PPTX
Spring Boot Showcase
PDF
Spring boot
PPT
My First Web Services Example - XFire, Spring, SoapUI
PPTX
Spring boot
PPTX
Cache is King
PPTX
Your Script Just Killed My Site
PDF
JavaDo#09 Spring boot入門ハンズオン
PDF
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
PPTX
Spring Boot and REST API
PDF
Java Web Application Security - UberConf 2011
PDF
Seven Simple Reasons to Use AppFuse
PDF
Enable Authentication and Authorization with Azure Active Directory and Sprin...
PPTX
It could happen to anyone - FrontEnd Connect 2017
PPTX
How to hack a node app? - LvivJS 2017
PPTX
Quickly Build Spring Boot Applications to Consume Public Cloud Services
Spring boot introduction
Banquet 42
Upgrading to Selenium WebDriver version 3
Testing Like a Pro - Chef Infrastructure Testing
Spring Boot Showcase
Spring boot
My First Web Services Example - XFire, Spring, SoapUI
Spring boot
Cache is King
Your Script Just Killed My Site
JavaDo#09 Spring boot入門ハンズオン
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
Spring Boot and REST API
Java Web Application Security - UberConf 2011
Seven Simple Reasons to Use AppFuse
Enable Authentication and Authorization with Azure Active Directory and Sprin...
It could happen to anyone - FrontEnd Connect 2017
How to hack a node app? - LvivJS 2017
Quickly Build Spring Boot Applications to Consume Public Cloud Services
Ad

Viewers also liked (9)

PDF
Version Control != Dependency Management
PPTX
Maven
PPT
Java build tool_comparison
PDF
Java Builds with Maven and Ant
PDF
Maven 3 Overview
PPT
PPTX
Apache ant
PPT
Maven Introduction
PPTX
An Introduction to Maven
Version Control != Dependency Management
Maven
Java build tool_comparison
Java Builds with Maven and Ant
Maven 3 Overview
Apache ant
Maven Introduction
An Introduction to Maven
Ad

Similar to Maven Setup (20)

PPTX
Selenium topic 4 - Selenium Web Driver Set Up
PDF
Installation eclipse
PDF
Java, Eclipse, Maven & JSF tutorial
PDF
Installing java, eclipse and maven
PDF
Install spark on_windows10
PDF
How to Install Java on Debian 12 Using Apt and Deb.pdf
PDF
Enterprise Messaging Foundations
PPTX
A Java Microservices Spring Boot and Docker case study.
PPTX
Java Insecurity: How to Deal with the Constant Vulnerabilities
PDF
Webinar: Creating an Effective Docker Build Pipeline for Java Apps
PDF
Spring Lab
ODP
techSocAndroid1
PDF
How to Install OpenJDK on Debian 12 Server.pdf
PDF
Jsf, facelets, spring, hibernate, maven2
PPTX
Apache Maven basics
ODP
Setting up and open fidy dev environment
PPT
Ayw android env_setup
PDF
Android training in Noida
PPTX
Introduction to spring boot
Selenium topic 4 - Selenium Web Driver Set Up
Installation eclipse
Java, Eclipse, Maven & JSF tutorial
Installing java, eclipse and maven
Install spark on_windows10
How to Install Java on Debian 12 Using Apt and Deb.pdf
Enterprise Messaging Foundations
A Java Microservices Spring Boot and Docker case study.
Java Insecurity: How to Deal with the Constant Vulnerabilities
Webinar: Creating an Effective Docker Build Pipeline for Java Apps
Spring Lab
techSocAndroid1
How to Install OpenJDK on Debian 12 Server.pdf
Jsf, facelets, spring, hibernate, maven2
Apache Maven basics
Setting up and open fidy dev environment
Ayw android env_setup
Android training in Noida
Introduction to spring boot

More from Holasz Kati (7)

PDF
Testing types functional and nonfunctional - Kati Holasz
PPTX
Four schools of testing context driven school
PDF
Your body language shapes who you are - K.H.
PDF
Transformational Management
PPSX
Maven Presentation - SureFire vs FailSafe
PDF
MAVEN - Short documentation
PDF
SEO Testing v2.0
Testing types functional and nonfunctional - Kati Holasz
Four schools of testing context driven school
Your body language shapes who you are - K.H.
Transformational Management
Maven Presentation - SureFire vs FailSafe
MAVEN - Short documentation
SEO Testing v2.0

Maven Setup

  • 2. Setup Maven is Java based tool, so the very first requirement is to have JDK installed in your machine. Download and install Java JDK:: http://www.oracle.com/technetwork/java/javase/downloads/jdk6downloads-1902814.html Download and install Apache Maven: http://maven.apache.org/download.cgi Download and install Eclipse JDK: http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/junosr2 Download and install Mozilla Firefox: http://www.mozilla.org/
  • 3. Steps Step 1Step 1 - verify Java installation in your machine- verify Java installation in your machine c:>java -versionc:>java -version Step 2Step 2 - set JAVA environment:- set JAVA environment: JAVA_HOME to C:ProgramJAVA_HOME to C:Program FilesJavajdk1.6.0_21FilesJavajdk1.6.0_21 Step 3Step 3 - download Maven archive:- download Maven archive: http://maven.apache.org/download.htmlhttp://maven.apache.org/download.html Step 4Step 4 - extract the Maven archive:- extract the Maven archive: C:Program FilesApache SoftwareC:Program FilesApache Software Foundationapache-mavenFoundationapache-maven
  • 4. 4 Setup environment variablesSetup environment variables Start → Control Panel → System and Security → System → Advanced system settings → Environment Variables Step 5Step 5 - set Maven environment variables:- set Maven environment variables: Step 6Step 6 – set Path for Maven and Java– set Path for Maven and Java Step 7Step 7 - verify Maven installation:- verify Maven installation: c:> mvn --versionc:> mvn --version
  • 5. Creating a Java project using Execute the following mvn command: C:MVN>mvn archetype:generate →DgroupId=com →DartifactId=application →DarchetypeArtifactId=maven-archetype-quickstart →DinteractiveMode=false
  • 6. Creating a Java project using
  • 7. Creating a Java project using
  • 9. After Import – into Eclipse IDe
  • 10. SureFire and FailSafe configuration – Pom.xml SureFireSureFire FailSafeFailSafe
  • 11. Running tests in parallel Using JUnit
  • 12. Running test Run tests with: mvn surefire:test Run test with FailSafe mvn failsafe:test-integration mvn failsafe:verify Run a single test mvn -Dtest=Login test Run a set of methods in a single test mvn -Dtest=LoginTest#Log_In test Generate reports and site mvn site Skip tests with SureFire - go to pom.xml and add: <skip>true</skip> to configuration tag specific to SureFire