SlideShare a Scribd company logo
Maven
technical session
Dmitry
 Bakaleinik

January
 2015
Maven

expert; know-it-all
ComingfromtheHebrewwordHebrew ‫מבין‬(mevin),
mavencanhavetwodefinitions.
Incommoncontextsmeansexpert.
However,insarcasticsettings,itisusedas“know-it-all”.
– YiddishSlangDictionary
The maven project was originally started as an attempt to
simplify the build processes.
Maven addresses two aspects of building software:
First, it describes how software is built, and second, it describes its
dependencies.
pom.xml
compiled code
artifact jar/war/
othertests coverage
documentation
quality report
What maven can do?
Centralize project information such as build metadata, properties, version
control systems, developers in project object model file (pom.xml).
Manage our build process; does project build tasks such as compilation,
unit testing, integration testing, quality metrics, documentation generation
as it required for the successful delivery.
Manage project library and resources dependencies.
Manage project artifacts deployment to corporate/public repositories.
Maven plugins
Maven is actually a plugin execution framework where every task is
actually done by plugins.
A plugin provides a set of actions or commands (in maven terminology
called goals) that can be executed to perform a task.
There are plugins for building, testing, source control management,
running a web server, generating project files and much more.
Some basic plugins are included in every project by default, and they have
sensible default settings.
Maven plugins suite
Core
clean
compiler
deploy
failsafe
install
resources
site
surefire
verifier
Reporting
Changelog
Changes
Checkstyle
Clover
Javadocs
PMD
Surefire-reports
Local servers
Cargo
jaxme
jetty
tomcat
Tools
Ant
Antlr
Antrun
Archetype
Assembly
Help
Release
Packaging
jar war ear ejb
rar pom shade
IDE integration
eclipse
idea
Maven plugins suite
Core
clean
compiler
deploy
failsafe
install
resources
site
surefire
verifier
Reporting
Changelog
Changes
Checkstyle
Clover
Javadocs
PMD
Surefire-reports
Local servers
Cargo
jaxme
jetty
tomcat
Tools
Ant
Antlr
Antrun
Archetype
Assembly
Help
Release
Packaging
jar war ear ejb
rar pom shade
IDE integration
eclipse
idea
And
 much
 more…⋯
Maven plugin goals
Maven plugin goals
A plugin generally provides a set of goals and which can be executed using
following syntax:

mvn [plugin-name]:[goal-name]
Maven plugin goals
A plugin generally provides a set of goals and which can be executed using
following syntax:
mvn [plugin-name]:[goal-name]
For example, a Java project can be compiled with the maven-compiler-
plugin's compile-goal by running following command:

my-project-dir mvn compiler:compile
Maven plugin goals
A plugin generally provides a set of goals and which can be executed using
following syntax:
mvn [plugin-name]:[goal-name]
For example, a Java project can be compiled with the maven-compiler-
plugin's compile-goal by running following command:
my-project-dir
You can get information about plugin and its goals using maven help
plugin:

mvn help:describe -Dplugin=compiler
Maven plugin goals
A plugin generally provides a set of goals and which can be executed using
following syntax:
mvn [plugin-name]:[goal-name]
For example, a Java project can be compiled with the maven-compiler-
plugin's compile-goal by running following command:
my-project-dir
You can get information about plugin and its goals using maven help
plugin:

mvn help:describe -Dplugin=compiler
Project Object Model (POM)
Project Object Model (POM)
A Project Object Model or POM is the fundamental unit of work in Maven.
It’s an XML file that contains information about the project and configuration
details used by Maven to build the project.
The configuration that can be specified in the POM are the project dependencies,
the plugins or goals that can be executed, the build profiles, and so on.
When executing a task or goal, Maven looks for the POM in the current working
directory, but you can explicitly tell to maven path of POM file:

mvn -f path/to/pom.xml
Simplest pom.xml
Coordinates.What???
Every maven project is identified by its GAV coordinates.
groupId (G) - It’s an identifier for a collection of related modules.

This is usually a hierarchy that starts with the organization that produced the
modules, and then possibly moves into increasingly more specialized projects,
e.g. com.sap.ui5 or com.sap.fiori.
G
A
V
Coordinates.What???
artifact (A) - It’s a unique identifier or a simple name that is given to a
module within a group
There can be multiple modules in a group.

If a group has a module called webapp, its artifactId will be“webapp”.
G
A
V
Coordinates.What???
version (V) - It’s an identifier for the release or build number of project,

e.g. 1.0 or 1.0-SNAPSHOT
G
A
V
Coordinates.What???
version (V) - It’s an identifier for the release or build number of project,
e.g. 1.0 or 1.0-SNAPSHOT
Now what’s this SNAPSHOT?
G
A
V
Versioning strategy
There are two types of versions: release and snapshot.
Releases - a version that is assumed never to change.

Only to be used for a single state of the project when it is released and then updated to the
next snapshot
Snapshot - used by projects during development as it implies that development is still
occurring that project may change
G
A
V
Simplest pom.xml
Simplest pom.xml
mvn install
Simplest pom.xml
mvn install
{
compile code
run tests
package as jar
deploy to local repo
How all this can be done
from 6 lines of xml?
Super POM
Super POM
The modelVersion property defines the super POM 

file (org/apache/maven/model/pom-4.0.0.xml)
Super POM
The modelVersion property defines the super POM 

file (org/apache/maven/model/pom-4.0.0.xml)
Super POM
The modelVersion property defines the super POM 

file (org/apache/maven/model/pom-4.0.0.xml)
Standard
 

directory
 

layout
Super POM
The modelVersion property defines the super POM 

file (org/apache/maven/model/pom-4.0.0.xml)
properties

interpolation
Super POM
The modelVersion property defines the super POM 

file (org/apache/maven/model/pom-4.0.0.xml)
Super POM
The modelVersion property defines the super POM
file (org/apache/maven/model/pom-4.0.0.xml)
Work with the same analogy as objectsinheritance
Effec%ve'POM'
POM'
Parent'
POM'
Super'
POM'
Super POM
The modelVersion property defines the super POM
file (org/apache/maven/model/pom-4.0.0.xml)
Work with the same analogy as
To see the merged pom:

mvn help:effective-pom Effec%ve'POM'
POM'
Parent'
POM'
Super'
POM'
Property references
env.*

Environment variables exposed by OS or Shell

${env.JAVA_HOME}
project.*

POM elemens

${project.groupId} ${project.parent.groupId}
settings.*

Maven settings.xml properties

${settings.localRepository}
Custom properties

${foo}
Build Lifecycle
In maven, the build is run is a predefined ordered set of steps called the
build lifecycle.
The individual steps are called phases and the same phases are run for
every maven build using the default lifecycle, no matter what it produce.
The build task that will be performed during each phase are determined by
the configuration in the project file, and in particular in the selected
packaging.
Build lifecycle
Validate
•  Validate the project is correct
and all necessary information
is available
Compile
•  Compile the source code of
the project
Test
•  Test the compiled code using
a suitable unit testing
framework. These tests
should not require the code
be packaged or deployed
Package
•  Take the compiled code and
package it in distributable
format, such as a JAR
Integration-test
•  Process and deploy the
package if necessary into a
environment where
integration tests can run
Verify
•  Run any checks to verify the
package is valid and meets
the quality criteria
Install
•  Install the package into the
local repository, for use as a
dependency for other
projects locally
Deploy
•  Done in integration or release
environment, copies the final
package to the local
repository, then deploy the
installed package in a
specified environment.
Default 

Lifecycle
(collectionofbuildphases)
Build lifecycle
mvn install
Validate
•  Validate the project is correct
and all necessary information
is available
Compile
•  Compile the source code of
the project
Test
•  Test the compiled code using
a suitable unit testing
framework. These tests
should not require the code
be packaged or deployed
Package
•  Take the compiled code and
package it in distributable
format, such as a JAR
Integration-test
•  Process and deploy the
package if necessary into a
environment where
integration tests can run
Verify
•  Run any checks to verify the
package is valid and meets
the quality criteria
Install
•  Install the package into the
local repository, for use as a
dependency for other
projects locally
Deploy
•  Done in integration or release
environment, copies the final
package to the local
repository, then deploy the
installed package in a
specified environment.
X
Build lifecycle
Validate
•  Validate the project is correct
and all necessary information
is available
Compile
•  Compile the source code of
the project
Test
•  Test the compiled code using
a suitable unit testing
framework. These tests
should not require the code
be packaged or deployed
Package
•  Take the compiled code and
package it in distributable
format, such as a JAR
Integration-test
•  Process and deploy the
package if necessary into a
environment where
integration tests can run
Verify
•  Run any checks to verify the
package is valid and meets
the quality criteria
Install
•  Install the package into the
local repository, for use as a
dependency for other
projects locally
Deploy
•  Done in integration or release
environment, copies the final
package to the local
repository, then deploy the
installed package in a
specified environment.
X mvn clean install
+Pre-clean
Clean
• Remove all
previous build files
Post-clean
Mapping
Lifecycle
Clean Validate Compile
Test Package
Integration-
test
Verify Install Deploy
jslint plugin
jslint
Compiler plugin
compile testCompile
Cargo plugin
deploy run
Mapping
Lifecycle
Clean Validate Compile
Test Package
Integration-
test
Verify Install Deploy
Clean plugin
clean
jslint plugin
jslint
Compiler plugin
compile testCompile
Cargo plugin
deploy run
Mapping
Lifecycle
Clean Validate Compile
Test Package
Integration-
test
Verify Install Deploy
Clean plugin
clean
jslint plugin
jslint
Compiler plugin
compile testCompile
Cargo plugin
deploy run
Mapping
Lifecycle
Clean Validate Compile
Test Package
Integration-
test
Verify Install Deploy
Clean plugin
clean
Each plugin comes

with its goals bound
to lifecycle phases
In
 maven
 terminology
 such
 binding
 called
 MOJO
 
Its
 also
 predefines
 goal
 configuration
jslint plugin
jslint
Compiler plugin
compile testCompile
Cargo plugin
deploy run
Mapping
Lifecycle
Clean Validate Compile
Test Package
Integration-
test
Verify Install Deploy
Clean plugin
clean
Each plugin comes

with its goals bound
to lifecycle phases
jslint plugin
jslint
Compiler plugin
compile testCompile
Cargo plugin
deploy run
Mapping
Lifecycle
Clean Validate Compile
Test Package
Integration-
test
Verify Install Deploy
Clean plugin
clean
Each plugin comes

with its goals bound
to lifecycle phases
jslint plugin
jslint
Mapping
Lifecycle
Clean Validate Compile
Test Package
Integration-
test
Verify Install Deploy
Each plugin comes

with its goals bound
to lifecycle phases
jslint plugin
jslint
Mapping
Lifecycle
Clean Validate Compile
Test Package
Integration-
test
Verify Install Deploy
Each plugin comes

with its goals bound
to lifecycle phases
jslint plugin
jslint
Mapping
Lifecycle
Clean Validate Compile
Test Package
Integration-
test
Verify Install Deploy
Each plugin comes

with its goals bound
to lifecycle phases
TIP: to disable 

a preconfigured

plugin execution

change phase to

“none”
Package type
The specific goals bound to each phase default to a set of goals specific to a
project’s packaging.
Package type
The specific goals bound to each phase default to a set of goals specific to a
project’s packaging.
A project with packaging jar has a different set of default goals from a project
with a packaging of war.The packaging element affects the steps required to
build a project.
Package type
Package type
JAR is the default packaging type, the most common, and thus the most
commonly encountered lifecycle configuration.
Package type
JAR is the
commonly encountered lifecycle configuration.
POM is the simplest packaging type.The artifact that it generates is itself
only, rather than a JAR, SAR, or EAR.There is no code to test or compile, and
there are no resources the process.
Package type
JAR is the
commonly encountered lifecycle configuration.
POM is the simplest packaging type.The artifact that it generates is itself
only, rather than a JAR, SAR, or EAR.There is no code to test or compile, and
there are no resources the process.
TheWAR packaging type is similar to the JAR type.The exception being the
package goal of war:war. Note that the war:war goal requires a web.xml
configuration in your src/main/webapp/WEB-INF directory.
Package type
Dependencies mechanism
The cornerstone of the POM is its 

dependency list. Because most 

every project depends upon 

others to build and run correctly.
It happens with the Coordinates!
Dependencies
One powerful aspect of Maven is in its handling of project relationships; that
includes inheritance, aggregation (multi-module projects) and dependencies 

(it also includes transitive dependencies).
Dependencies
One powerful aspect of Maven is in its handling of project relationships; that
includes inheritance, aggregation (multi-module projects) and dependencies
(it also includes transitive dependencies).
Whats it transitive dependencies?

Maven brings the dependencies of the project dependencies, allowing your
dependency list to focus solely on project requirements.
Dependencies
One powerful aspect of Maven is in its handling of project relationships; that
includes inheritance, aggregation (multi-module projects) and dependencies
(it also includes transitive dependencies).
Whats it transitive dependencies?
Maven brings the dependencies of the project dependencies, allowing your
dependency list to focus solely on project requirements.
Dependency management has a long tradition of being a complicated mess for
anything but the most trivial of projects. Maven solves both problems through a
common local repository from which to link projects correctly, versions and all.
Scopes
compile provided
runtime test
system import
Compile Test Runtime
Classpath
Scopes
compile provided
runtime test
system import
Compile Test Runtime
Classpath
This is the default scope, used if
none is specified. Compile
dependencies are available in all
classpaths. Furthermore, those
dependencies are propagated to
dependent projects.
Scopes
compile provided
runtime test
system import
Compile Test Runtime
Classpath
This is much like compile, but
indicates you expect the JDK or a
container to provide it at
runtime. It is only available on
the compilation and test
classpath, and is not transitive.
Scopes
compile provided
runtime test
system import
Compile Test Runtime
Classpath
This scope indicates that the
dependency is not required for
compilation, but is for execution.
It is in the runtime and test
classpaths, but not the compile
classpath.
Scopes
compile provided
runtime test
system import
Compile Test Runtime
Classpath
This scope indicates that the
dependency is not required for
normal use of the application,
and is only available for the test
compilation and execution
phases.
Scopes
compile provided
runtime test
system import
Compile Test Runtime
Classpath
This scope is similar to provided
except that you have to provide
the JAR which contains it
explicitly.The artifact is always
available and is not looked up in
a repository.
Scopes
compile provided
runtime test
system import
Compile Test Runtime
Classpath
This scope used to import
dependencies defined in
configuration of the other
project
Scopes
compile provided
runtime test
system import
Compile Test Runtime
Classpath
Repositories
Local repository in %USER_HOME%/.m2/repository
Remote repository

Example: http://repo1.maven.org/maven2 or

another internal company repository, like nexus.wdf.sap.corp
The repository contains dependencies and plugins, can store any kind of
artifact: jar, war, pom, ejb, ear.
The repository can be managed by a“repository manager”like Nexus
Lifecycle
Maven
Project
pom.xml
source code
Lifecycle
Maven
Project
pom.xml
source code
reads the configuration
Lifecycle
Maven
Project
pom.xml
source code
fetches the dependencies
M2 local repo
Lifecycle
Maven
Project
pom.xml
source code
M2 local repo
NEXUS
fetches missing dependencies from the Internet into M2
Lifecycle
Maven
Project
pom.xml
source code
M2 local repo
NEXUS
fetches missing dependencies from the Internet into M2
Lifecycle
Maven
Project
pom.xml
source code
M2 local repo
NEXUS
target folder
copies the dependencies
Lifecycle
Maven
Project
pom.xml
source code
M2 local repo
NEXUS
target folder
build the project
Lifecycle
Maven
Project
pom.xml
source code
M2 local repo
NEXUS
target folder
deploys artifact to local repository

More Related Content

What's hot

Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
Smita Prasad
 
Maven
MavenMaven
Maven
feng lee
 
Continuous Deployment Pipeline with maven
Continuous Deployment Pipeline with mavenContinuous Deployment Pipeline with maven
Continuous Deployment Pipeline with mavenAlan Parkinson
 
Apache Maven
Apache MavenApache Maven
Apache Maven
Rahul Tanwani
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
Onkar Deshpande
 
Note - Apache Maven Intro
Note - Apache Maven IntroNote - Apache Maven Intro
Note - Apache Maven Introboyw165
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
Mindfire Solutions
 
Maven
Maven Maven
Maven
Khan625
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
Sandeep Chawla
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to MavenVadym Lotar
 
Introduction to maven
Introduction to mavenIntroduction to maven
Introduction to maven
Manos Georgopoulos
 
Maven basics
Maven basicsMaven basics
Demystifying Maven
Demystifying MavenDemystifying Maven
Demystifying Maven
Mike Desjardins
 
Development Tools - Maven
Development Tools - MavenDevelopment Tools - Maven
Development Tools - Maven
Bert Koorengevel
 
maven
mavenmaven
maven
akd11
 
Version Management in Maven
Version Management in MavenVersion Management in Maven
Version Management in MavenGeert Pante
 
Maven 2 features
Maven 2 featuresMaven 2 features
Maven 2 features
Angel Ruiz
 
Maven
MavenMaven
Maven
Shraddha
 
Maven ppt
Maven pptMaven ppt
Maven ppt
natashasweety7
 

What's hot (20)

Maven Overview
Maven OverviewMaven Overview
Maven Overview
 
Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
 
Maven
MavenMaven
Maven
 
Continuous Deployment Pipeline with maven
Continuous Deployment Pipeline with mavenContinuous Deployment Pipeline with maven
Continuous Deployment Pipeline with maven
 
Apache Maven
Apache MavenApache Maven
Apache Maven
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
 
Note - Apache Maven Intro
Note - Apache Maven IntroNote - Apache Maven Intro
Note - Apache Maven Intro
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
 
Maven
Maven Maven
Maven
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
 
Introduction to maven
Introduction to mavenIntroduction to maven
Introduction to maven
 
Maven basics
Maven basicsMaven basics
Maven basics
 
Demystifying Maven
Demystifying MavenDemystifying Maven
Demystifying Maven
 
Development Tools - Maven
Development Tools - MavenDevelopment Tools - Maven
Development Tools - Maven
 
maven
mavenmaven
maven
 
Version Management in Maven
Version Management in MavenVersion Management in Maven
Version Management in Maven
 
Maven 2 features
Maven 2 featuresMaven 2 features
Maven 2 features
 
Maven
MavenMaven
Maven
 
Maven ppt
Maven pptMaven ppt
Maven ppt
 

Similar to Introduction to maven, its configuration, lifecycle and relationship to JS world

Apache maven, a software project management tool
Apache maven, a software project management toolApache maven, a software project management tool
Apache maven, a software project management toolRenato Primavera
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
Mert Çalışkan
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolelliando dias
 
(Re)-Introduction to Maven
(Re)-Introduction to Maven(Re)-Introduction to Maven
(Re)-Introduction to Maven
Eric Wyles
 
BMO - Intelligent Projects with Maven
BMO - Intelligent Projects with MavenBMO - Intelligent Projects with Maven
BMO - Intelligent Projects with Maven
Mert Çalışkan
 
Maven in mulesoft
Maven in mulesoftMaven in mulesoft
Maven in mulesoft
venkata20k
 
Maven
MavenMaven
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
Gourav Varma
 
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorial
Raghavan Mohan
 
Maven
MavenMaven
Maven
Emprovise
 
Mavennotes.pdf
Mavennotes.pdfMavennotes.pdf
Mavennotes.pdf
AnkurSingh656748
 
Maven
MavenMaven
A-Z_Maven.pdf
A-Z_Maven.pdfA-Z_Maven.pdf
A-Z_Maven.pdf
Mithilesh Singh
 
Wonderful World of Maven
Wonderful World of MavenWonderful World of Maven
Wonderful World of Maven
Justin J. Moses
 
Maven
MavenMaven
Maven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsMaven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable Results
Steve Keener
 

Similar to Introduction to maven, its configuration, lifecycle and relationship to JS world (20)

Apache maven, a software project management tool
Apache maven, a software project management toolApache maven, a software project management tool
Apache maven, a software project management tool
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension tool
 
(Re)-Introduction to Maven
(Re)-Introduction to Maven(Re)-Introduction to Maven
(Re)-Introduction to Maven
 
Exploring Maven SVN GIT
Exploring Maven SVN GITExploring Maven SVN GIT
Exploring Maven SVN GIT
 
BMO - Intelligent Projects with Maven
BMO - Intelligent Projects with MavenBMO - Intelligent Projects with Maven
BMO - Intelligent Projects with Maven
 
Maven in mulesoft
Maven in mulesoftMaven in mulesoft
Maven in mulesoft
 
Maven
MavenMaven
Maven
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
 
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorial
 
Maven
MavenMaven
Maven
 
Mavennotes.pdf
Mavennotes.pdfMavennotes.pdf
Mavennotes.pdf
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
P&MSP2012 - Maven
P&MSP2012 - MavenP&MSP2012 - Maven
P&MSP2012 - Maven
 
A-Z_Maven.pdf
A-Z_Maven.pdfA-Z_Maven.pdf
A-Z_Maven.pdf
 
Wonderful World of Maven
Wonderful World of MavenWonderful World of Maven
Wonderful World of Maven
 
Maven
MavenMaven
Maven
 
Maven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsMaven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable Results
 

Recently uploaded

Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 

Recently uploaded (20)

Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 

Introduction to maven, its configuration, lifecycle and relationship to JS world

  • 5. The maven project was originally started as an attempt to simplify the build processes. Maven addresses two aspects of building software: First, it describes how software is built, and second, it describes its dependencies. pom.xml compiled code artifact jar/war/ othertests coverage documentation quality report
  • 6. What maven can do? Centralize project information such as build metadata, properties, version control systems, developers in project object model file (pom.xml). Manage our build process; does project build tasks such as compilation, unit testing, integration testing, quality metrics, documentation generation as it required for the successful delivery. Manage project library and resources dependencies. Manage project artifacts deployment to corporate/public repositories.
  • 7. Maven plugins Maven is actually a plugin execution framework where every task is actually done by plugins. A plugin provides a set of actions or commands (in maven terminology called goals) that can be executed to perform a task. There are plugins for building, testing, source control management, running a web server, generating project files and much more. Some basic plugins are included in every project by default, and they have sensible default settings.
  • 8. Maven plugins suite Core clean compiler deploy failsafe install resources site surefire verifier Reporting Changelog Changes Checkstyle Clover Javadocs PMD Surefire-reports Local servers Cargo jaxme jetty tomcat Tools Ant Antlr Antrun Archetype Assembly Help Release Packaging jar war ear ejb rar pom shade IDE integration eclipse idea
  • 9. Maven plugins suite Core clean compiler deploy failsafe install resources site surefire verifier Reporting Changelog Changes Checkstyle Clover Javadocs PMD Surefire-reports Local servers Cargo jaxme jetty tomcat Tools Ant Antlr Antrun Archetype Assembly Help Release Packaging jar war ear ejb rar pom shade IDE integration eclipse idea And
  • 13. Maven plugin goals A plugin generally provides a set of goals and which can be executed using following syntax:
 mvn [plugin-name]:[goal-name]
  • 14. Maven plugin goals A plugin generally provides a set of goals and which can be executed using following syntax: mvn [plugin-name]:[goal-name] For example, a Java project can be compiled with the maven-compiler- plugin's compile-goal by running following command:
 my-project-dir mvn compiler:compile
  • 15. Maven plugin goals A plugin generally provides a set of goals and which can be executed using following syntax: mvn [plugin-name]:[goal-name] For example, a Java project can be compiled with the maven-compiler- plugin's compile-goal by running following command: my-project-dir You can get information about plugin and its goals using maven help plugin:
 mvn help:describe -Dplugin=compiler
  • 16. Maven plugin goals A plugin generally provides a set of goals and which can be executed using following syntax: mvn [plugin-name]:[goal-name] For example, a Java project can be compiled with the maven-compiler- plugin's compile-goal by running following command: my-project-dir You can get information about plugin and its goals using maven help plugin:
 mvn help:describe -Dplugin=compiler
  • 18. Project Object Model (POM) A Project Object Model or POM is the fundamental unit of work in Maven. It’s an XML file that contains information about the project and configuration details used by Maven to build the project. The configuration that can be specified in the POM are the project dependencies, the plugins or goals that can be executed, the build profiles, and so on. When executing a task or goal, Maven looks for the POM in the current working directory, but you can explicitly tell to maven path of POM file:
 mvn -f path/to/pom.xml
  • 20. Coordinates.What??? Every maven project is identified by its GAV coordinates. groupId (G) - It’s an identifier for a collection of related modules.
 This is usually a hierarchy that starts with the organization that produced the modules, and then possibly moves into increasingly more specialized projects, e.g. com.sap.ui5 or com.sap.fiori. G A V
  • 21. Coordinates.What??? artifact (A) - It’s a unique identifier or a simple name that is given to a module within a group There can be multiple modules in a group.
 If a group has a module called webapp, its artifactId will be“webapp”. G A V
  • 22. Coordinates.What??? version (V) - It’s an identifier for the release or build number of project,
 e.g. 1.0 or 1.0-SNAPSHOT G A V
  • 23. Coordinates.What??? version (V) - It’s an identifier for the release or build number of project, e.g. 1.0 or 1.0-SNAPSHOT Now what’s this SNAPSHOT? G A V
  • 24. Versioning strategy There are two types of versions: release and snapshot. Releases - a version that is assumed never to change.
 Only to be used for a single state of the project when it is released and then updated to the next snapshot Snapshot - used by projects during development as it implies that development is still occurring that project may change G A V
  • 27. Simplest pom.xml mvn install { compile code run tests package as jar deploy to local repo
  • 28. How all this can be done from 6 lines of xml?
  • 30. Super POM The modelVersion property defines the super POM 
 file (org/apache/maven/model/pom-4.0.0.xml)
  • 31. Super POM The modelVersion property defines the super POM 
 file (org/apache/maven/model/pom-4.0.0.xml)
  • 32. Super POM The modelVersion property defines the super POM 
 file (org/apache/maven/model/pom-4.0.0.xml) Standard
  • 35. Super POM The modelVersion property defines the super POM 
 file (org/apache/maven/model/pom-4.0.0.xml) properties
 interpolation
  • 36. Super POM The modelVersion property defines the super POM 
 file (org/apache/maven/model/pom-4.0.0.xml)
  • 37. Super POM The modelVersion property defines the super POM file (org/apache/maven/model/pom-4.0.0.xml) Work with the same analogy as objectsinheritance Effec%ve'POM' POM' Parent' POM' Super' POM'
  • 38. Super POM The modelVersion property defines the super POM file (org/apache/maven/model/pom-4.0.0.xml) Work with the same analogy as To see the merged pom:
 mvn help:effective-pom Effec%ve'POM' POM' Parent' POM' Super' POM'
  • 39. Property references env.*
 Environment variables exposed by OS or Shell
 ${env.JAVA_HOME} project.*
 POM elemens
 ${project.groupId} ${project.parent.groupId} settings.*
 Maven settings.xml properties
 ${settings.localRepository} Custom properties
 ${foo}
  • 40. Build Lifecycle In maven, the build is run is a predefined ordered set of steps called the build lifecycle. The individual steps are called phases and the same phases are run for every maven build using the default lifecycle, no matter what it produce. The build task that will be performed during each phase are determined by the configuration in the project file, and in particular in the selected packaging.
  • 41. Build lifecycle Validate •  Validate the project is correct and all necessary information is available Compile •  Compile the source code of the project Test •  Test the compiled code using a suitable unit testing framework. These tests should not require the code be packaged or deployed Package •  Take the compiled code and package it in distributable format, such as a JAR Integration-test •  Process and deploy the package if necessary into a environment where integration tests can run Verify •  Run any checks to verify the package is valid and meets the quality criteria Install •  Install the package into the local repository, for use as a dependency for other projects locally Deploy •  Done in integration or release environment, copies the final package to the local repository, then deploy the installed package in a specified environment. Default 
 Lifecycle (collectionofbuildphases)
  • 42. Build lifecycle mvn install Validate •  Validate the project is correct and all necessary information is available Compile •  Compile the source code of the project Test •  Test the compiled code using a suitable unit testing framework. These tests should not require the code be packaged or deployed Package •  Take the compiled code and package it in distributable format, such as a JAR Integration-test •  Process and deploy the package if necessary into a environment where integration tests can run Verify •  Run any checks to verify the package is valid and meets the quality criteria Install •  Install the package into the local repository, for use as a dependency for other projects locally Deploy •  Done in integration or release environment, copies the final package to the local repository, then deploy the installed package in a specified environment. X
  • 43. Build lifecycle Validate •  Validate the project is correct and all necessary information is available Compile •  Compile the source code of the project Test •  Test the compiled code using a suitable unit testing framework. These tests should not require the code be packaged or deployed Package •  Take the compiled code and package it in distributable format, such as a JAR Integration-test •  Process and deploy the package if necessary into a environment where integration tests can run Verify •  Run any checks to verify the package is valid and meets the quality criteria Install •  Install the package into the local repository, for use as a dependency for other projects locally Deploy •  Done in integration or release environment, copies the final package to the local repository, then deploy the installed package in a specified environment. X mvn clean install +Pre-clean Clean • Remove all previous build files Post-clean
  • 44. Mapping Lifecycle Clean Validate Compile Test Package Integration- test Verify Install Deploy
  • 45. jslint plugin jslint Compiler plugin compile testCompile Cargo plugin deploy run Mapping Lifecycle Clean Validate Compile Test Package Integration- test Verify Install Deploy Clean plugin clean
  • 46. jslint plugin jslint Compiler plugin compile testCompile Cargo plugin deploy run Mapping Lifecycle Clean Validate Compile Test Package Integration- test Verify Install Deploy Clean plugin clean
  • 47. jslint plugin jslint Compiler plugin compile testCompile Cargo plugin deploy run Mapping Lifecycle Clean Validate Compile Test Package Integration- test Verify Install Deploy Clean plugin clean Each plugin comes
 with its goals bound to lifecycle phases In
  • 59. jslint plugin jslint Compiler plugin compile testCompile Cargo plugin deploy run Mapping Lifecycle Clean Validate Compile Test Package Integration- test Verify Install Deploy Clean plugin clean Each plugin comes
 with its goals bound to lifecycle phases
  • 60. jslint plugin jslint Compiler plugin compile testCompile Cargo plugin deploy run Mapping Lifecycle Clean Validate Compile Test Package Integration- test Verify Install Deploy Clean plugin clean Each plugin comes
 with its goals bound to lifecycle phases
  • 61. jslint plugin jslint Mapping Lifecycle Clean Validate Compile Test Package Integration- test Verify Install Deploy Each plugin comes
 with its goals bound to lifecycle phases
  • 62. jslint plugin jslint Mapping Lifecycle Clean Validate Compile Test Package Integration- test Verify Install Deploy Each plugin comes
 with its goals bound to lifecycle phases
  • 63. jslint plugin jslint Mapping Lifecycle Clean Validate Compile Test Package Integration- test Verify Install Deploy Each plugin comes
 with its goals bound to lifecycle phases TIP: to disable 
 a preconfigured
 plugin execution
 change phase to
 “none”
  • 65. The specific goals bound to each phase default to a set of goals specific to a project’s packaging. Package type
  • 66. The specific goals bound to each phase default to a set of goals specific to a project’s packaging. A project with packaging jar has a different set of default goals from a project with a packaging of war.The packaging element affects the steps required to build a project. Package type
  • 68. JAR is the default packaging type, the most common, and thus the most commonly encountered lifecycle configuration. Package type
  • 69. JAR is the commonly encountered lifecycle configuration. POM is the simplest packaging type.The artifact that it generates is itself only, rather than a JAR, SAR, or EAR.There is no code to test or compile, and there are no resources the process. Package type
  • 70. JAR is the commonly encountered lifecycle configuration. POM is the simplest packaging type.The artifact that it generates is itself only, rather than a JAR, SAR, or EAR.There is no code to test or compile, and there are no resources the process. TheWAR packaging type is similar to the JAR type.The exception being the package goal of war:war. Note that the war:war goal requires a web.xml configuration in your src/main/webapp/WEB-INF directory. Package type
  • 71. Dependencies mechanism The cornerstone of the POM is its 
 dependency list. Because most 
 every project depends upon 
 others to build and run correctly. It happens with the Coordinates!
  • 72. Dependencies One powerful aspect of Maven is in its handling of project relationships; that includes inheritance, aggregation (multi-module projects) and dependencies 
 (it also includes transitive dependencies).
  • 73. Dependencies One powerful aspect of Maven is in its handling of project relationships; that includes inheritance, aggregation (multi-module projects) and dependencies (it also includes transitive dependencies). Whats it transitive dependencies?
 Maven brings the dependencies of the project dependencies, allowing your dependency list to focus solely on project requirements.
  • 74. Dependencies One powerful aspect of Maven is in its handling of project relationships; that includes inheritance, aggregation (multi-module projects) and dependencies (it also includes transitive dependencies). Whats it transitive dependencies? Maven brings the dependencies of the project dependencies, allowing your dependency list to focus solely on project requirements. Dependency management has a long tradition of being a complicated mess for anything but the most trivial of projects. Maven solves both problems through a common local repository from which to link projects correctly, versions and all.
  • 75. Scopes compile provided runtime test system import Compile Test Runtime Classpath
  • 76. Scopes compile provided runtime test system import Compile Test Runtime Classpath This is the default scope, used if none is specified. Compile dependencies are available in all classpaths. Furthermore, those dependencies are propagated to dependent projects.
  • 77. Scopes compile provided runtime test system import Compile Test Runtime Classpath This is much like compile, but indicates you expect the JDK or a container to provide it at runtime. It is only available on the compilation and test classpath, and is not transitive.
  • 78. Scopes compile provided runtime test system import Compile Test Runtime Classpath This scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath.
  • 79. Scopes compile provided runtime test system import Compile Test Runtime Classpath This scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases.
  • 80. Scopes compile provided runtime test system import Compile Test Runtime Classpath This scope is similar to provided except that you have to provide the JAR which contains it explicitly.The artifact is always available and is not looked up in a repository.
  • 81. Scopes compile provided runtime test system import Compile Test Runtime Classpath This scope used to import dependencies defined in configuration of the other project
  • 82. Scopes compile provided runtime test system import Compile Test Runtime Classpath
  • 83. Repositories Local repository in %USER_HOME%/.m2/repository Remote repository
 Example: http://repo1.maven.org/maven2 or
 another internal company repository, like nexus.wdf.sap.corp The repository contains dependencies and plugins, can store any kind of artifact: jar, war, pom, ejb, ear. The repository can be managed by a“repository manager”like Nexus
  • 87. Lifecycle Maven Project pom.xml source code M2 local repo NEXUS fetches missing dependencies from the Internet into M2
  • 88. Lifecycle Maven Project pom.xml source code M2 local repo NEXUS fetches missing dependencies from the Internet into M2
  • 89. Lifecycle Maven Project pom.xml source code M2 local repo NEXUS target folder copies the dependencies
  • 90. Lifecycle Maven Project pom.xml source code M2 local repo NEXUS target folder build the project
  • 91. Lifecycle Maven Project pom.xml source code M2 local repo NEXUS target folder deploys artifact to local repository
  • 94. Aggregation Project A Project B Project C cd A
 mvn clean install
 cd .. cd B
 mvn clean install
 cd ..
 cd C mvn clean install Depends Depends }8 lines!!!
  • 97. Debugging maven Output full error stack trace:
 maven anygoal -e Output for debugging
 maven anygoal -X
  • 98. settings.xml The settings.xml file contains configuration of Maven execution. Settings in this file are settings which apply to many projects and which should not be bundled to any specific project, or distributed to an audience.These include values such as the local repository location, alternate remote repository servers, and authentication information.
  • 99. settings.xml The settings.xml file contains configuration of Maven execution. Settings in this file are settings which apply to many projects and which should not be bundled to any specific project, or distributed to an audience.These include values such as the local repository location, alternate remote repository servers, and authentication information. Maven provides 2 settings files:
 Local settings.xml at %USER_HOME%/.m2/settings.xml
 Global settings.xml at %M2_HOME%/conf/settings.xml
  • 100. settings.xml The settings.xml file contains configuration of Maven execution. Settings in this file are settings which apply to many projects and which should not be bundled to any specific project, or distributed to an audience.These include values such as the local repository location, alternate remote repository servers, and authentication information. Maven provides 2 settings files: Local settings.xml at %USER_HOME%/.m2/settings.xml Global settings.xml at %M2_HOME%/conf/settings.xml These files are not bundled with Maven project and don’t get distributed
  • 101. settings.xml The settings.xml file contains configuration of Maven execution. Settings in this file are settings which apply to many projects and which should not be bundled to any specific project, or distributed to an audience.These include values such as the local repository location, alternate remote repository servers, and authentication information. Maven provides 2 settings files: Local settings.xml at %USER_HOME%/.m2/settings.xml Global settings.xml at %M2_HOME%/conf/settings.xml These files are not bundled with Maven project and don’t get distributed If both files exists, their content get merged
  • 102. settings.xml The settings.xml file contains configuration of Maven execution. Settings in this file are settings which apply to many projects and which should not be bundled to any specific project, or distributed to an audience.These include values such as the local repository location, alternate remote repository servers, and authentication information. Maven provides 2 settings files: Local settings.xml at %USER_HOME%/.m2/settings.xml Global settings.xml at %M2_HOME%/conf/settings.xml These files are not bundled with Maven project and don’t get distributed If both files exists, their content get merged Local settings.xml overrides the global one
  • 103. settings.xml The settings.xml file contains configuration of Maven execution. Settings in this file are settings which apply to many projects and which should not be bundled to any specific project, or distributed to an audience.These include values such as the local repository location, alternate remote repository servers, and authentication information. Maven provides 2 settings files: Local settings.xml at %USER_HOME%/.m2/settings.xml Global settings.xml at %M2_HOME%/conf/settings.xml These files are not bundled with Maven project and don’t get distributed If both files exists, their content get merged Local settings.xml overrides the global one
  • 104. settings.xml The settings.xml file contains configuration of Maven execution. Settings in this file are settings which apply to many projects and which should not be bundled to any specific project, or distributed to an audience.These include values such as the local repository location, alternate remote repository servers, and authentication information. Maven provides 2 settings files: Local settings.xml at %USER_HOME%/.m2/settings.xml Global settings.xml at %M2_HOME%/conf/settings.xml These files are not bundled with Maven project and don’t get distributed If both files exists, their content get merged Local settings.xml overrides the global one
  • 105. Common criticism of maven Poor documentation - Lots of maven documentation is automatically generated and is generally pretty horrible. Simple things are pretty counterintuitive in maven, e.g. copying a file Maven adds to the number of places you need to look when something breaks - both your source code, local repository and the remote repository. Everything breaks if someone changes an artifactId or groupId Doesn’t work well if your network connectivity is unreliable or unavailable A huge output log
  • 106. Maven + NPM + Grunt eirslett/frontend-maven-plugin This plugin downloads/installs Node and NPM locally for your project, runs NPM install, installs bower dependencies, run Grunt and/or gulp and/or Karma. It's supposed to work onWindows, OS X and Linux.
  • 107. Maven + NPM + Grunt eirslett/frontend-maven-plugin This plugin downloads/installs Node and NPM locally for your project, runs NPM install, installs bower dependencies, run Grunt and/or gulp and/or Karma. It's supposed to work onWindows, OS X and Linux.
  • 108. Thanks