Overview of Maven and its concepts
Maven and its ecosystem
Good and bad practices
Usecases
Maven, and the future of Maven 3.x
---
Delta prez @GenevaJug :
New slides : 64,65,90,95
Updated slides : 49-51;66;91;92;118
Thx @fcamblor
Overview of Maven and its concepts
Maven and its ecosystem
Good and bad practices
Usecases
Maven, and the future of Maven 3.x
---
Delta prez @GenevaJug :
New slides : 64,65,90,95
Updated slides : 49-51;66;91;92;118
Thx @fcamblor
This is a introduction to Maven 2. For more information visit http://jpereira.eu/2012/05/03/an-introduction-to-maven-2/
If you want to download the editable presentation contact me (find my contacts on my blog)
This presentation provides a comprehensive overview of Maven 3 including lifecycles and a detail of the default lifecycle and the associated phases within.
The presentation walks you through Apache maven and how to do a build management for java based applications. It starts with basic introduction on the technology and how it plays an important role for build management. The presentation then talks about details on how the maven works and its philosophy to creating builds. Furthermore, it also covers in detail the plugins based architecture to better understand how to use maven effectively.
Apache Maven at GenevaJUG by Arnaud HéritierGenevaJUG
Arnaud Héritier, membre des communautés Apache Maven et Codehaus Mojo et auteur du livre Apache Maven, vient nous parler de l’utilisation de Maven en entreprise et des nouveautés de la version 3.x.
Software Factory Manager pour eXo Platform, Arnaud nous présentera son retour d’expérience de l’utilisation de Maven dans une forge logicielle professionnelle : ce que Maven apporte à chaque étape de la construction d’un logiciel.
Nous aborderons ainsi successivement comment maven intervient pour chacune de ces étapes:
le build du projet sur le poste du développeur
la gestion des dépendances et des dépôts
la mise en place de l’intégration continue
l’utilisation des métriques et des rapports de qualité
le déploiement continu
A brief overview on Apache Maven2. About the lifecycle, core concepts and how to setup a project. Presented with demos about Eclipse integration and reporting customization.
This is a introduction to Maven 2. For more information visit http://jpereira.eu/2012/05/03/an-introduction-to-maven-2/
If you want to download the editable presentation contact me (find my contacts on my blog)
This presentation provides a comprehensive overview of Maven 3 including lifecycles and a detail of the default lifecycle and the associated phases within.
The presentation walks you through Apache maven and how to do a build management for java based applications. It starts with basic introduction on the technology and how it plays an important role for build management. The presentation then talks about details on how the maven works and its philosophy to creating builds. Furthermore, it also covers in detail the plugins based architecture to better understand how to use maven effectively.
Apache Maven at GenevaJUG by Arnaud HéritierGenevaJUG
Arnaud Héritier, membre des communautés Apache Maven et Codehaus Mojo et auteur du livre Apache Maven, vient nous parler de l’utilisation de Maven en entreprise et des nouveautés de la version 3.x.
Software Factory Manager pour eXo Platform, Arnaud nous présentera son retour d’expérience de l’utilisation de Maven dans une forge logicielle professionnelle : ce que Maven apporte à chaque étape de la construction d’un logiciel.
Nous aborderons ainsi successivement comment maven intervient pour chacune de ces étapes:
le build du projet sur le poste du développeur
la gestion des dépendances et des dépôts
la mise en place de l’intégration continue
l’utilisation des métriques et des rapports de qualité
le déploiement continu
A brief overview on Apache Maven2. About the lifecycle, core concepts and how to setup a project. Presented with demos about Eclipse integration and reporting customization.
The presentation is related to the firm where I rebuilt an existing non-maven project to the maven-based project with the best willingness of a proper modularity designs.
The Demos in this presentation are related to source code which is not attached.
Extending Build to the Client: A Maven User's Guide to Grunt.jsPetr Jiricka
Maven is now established as the de facto standard build tool for Java web applications. But what if the application makes extensive use of modern client-side technologies like AngularJS or Ember framework, CSS processors like SASS/LESS, Bower package manager, what if we need to compress and minify JavaScript and CSS files? In that case it makes sense to have a dedicated build infrastructure for the client.
Enter Grunt.js, a build tool specifically made for the client side. In this BOF, we will explore combining the use of Maven for the server side with Grunt.js for the client.
Java is evolving rapidly: Maven helps you staying on trackArnaud Héritier
Java evolution is getting faster these days, and that's a great thing. Nowadays, one jave version is deprecated every 2 years:
- Java 5:october 2009
- Java 6: february 2013
- Java 7: march 2015 (really? already?)
- Java 8: march 2017 (with that one, you'll discover new types of incompatibilities...)
And you, or your applications, how do you manage upgrades?
Come and see how Apache Maven and its tooling (Animal Sniffer, Toolchains, ...) help you upgrade with confidence, at your own pace and without headaches.
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...Martin Bergljung
In this talk you will learn how to set up an Alfresco SDK 3.0 multi module project that could be used in a larger consulting project context. Extension modules will be standalone and versioned and released independently in the Nexus 3 Repository Manager. The talk also includes a look at defining a Parent POM and an Aggregator POM for your SDK 3 project solution.
Quand java prend de la vitesse, apache maven vous garde sur les railsArnaud Héritier
Le rythme d’évolution (et donc de support) de Java s’accélère ces dernières années (et nous n’allons pas nous plaindre). Désormais une nouvelle version de Java est dépréciée tous les deux ans!
* Java 5 : Octobre 2009
* Java 6 : Février 2013
* Java 7 : Avril 2015 (QUOI ? DEJA ? MAINTENANT ?)
* Java 8 : Mars 2017 (incompatibilité source vs binaire, vous allez découvrir...)
Mais vous, ou plutôt vos applications, comment gérez vous leurs transitions d’une version de Java à une autre ?
Découvrez dans cette session comment Apache Maven, et son outillage (toolchain, animal-sniffer, …) vous aident à jongler entre différentes versions de Java sans douleur pour vos projets.
Tools and processes used at eXo to develop our mobile applications (iOS & Android) including continuous integration and deployment.
Tips and tricks to setup all the infrastructure involved in them.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Lausanne Jug (08th April, 2010) - Maven
1. Apache Maven – JUG Lausanne – April 8th, 2010
Arnaud Héritier
eXo Platform
Software Factory Manager
2. Arnaud Héritier
● Software Factory Manager
eXo platform
- In charge of tools and
methods
● Committer since 2004 and
member of the Project
Management Committee
● Coauthor of « Apache
Maven » published by
Pearson (in French)
Licensed under a Creative Commons license
● http://aheritier.net
4. Overview
● Definition ● Maven or not Maven, that
● History is the question !
- Maven, the project choice
● Concepts
- Maven, the corporate choice
- Conventions
- Competitors
- POM
- Reactor and Modules
- Inheritance
- Artifact Repository
- Dependency
- Version
- Profiles
Build Lifecycle And Plugins
Licensed under a Creative Commons license
5. Ecosystem
● Repository Managers ● Continuous Integration
● Quality Management ● IDE
- Tests Automation - Eclipse
- Quality Metrics Reports - Idea IntelliJ
- Project Reports - Netbeans
- Sonar
Licensed under a Creative Commons license
6. Good & Bad Practices
● K.I.S.S.
● Project Organization
● POM
● Development
Licensed under a Creative Commons license
7. Usecases
● Secure your credentials
● Build a part of your project using reactor options
● Automate your release process
- (at least the technical part)
● Setup a global mirror
Licensed under a Creative Commons license
8. Back to the future
● Maven 2.x
● Maven 3.x
● Community
Licensed under a Creative Commons license
10. Definition
● Apache Maven is a software project management
and comprehension tool.
● Based on the concept of a project object model
(POM)
- Maven can manage a project's build, binaries,
reporting and documentation from a central piece of
information.
Licensed under a Creative Commons license
11. History
● Initiated in 2001 by Jason Van Zyl in Alexandria, an
Apache Jakarta project,
● Moved to Turbine few months after,
● Became a Top Level Project in 2003.
● Maven 2.0 released in September 2005
● Maven 3.0 … coming soon !!!
Licensed under a Creative Commons license
15. Reactor
● Split your project in <project>!
sub-modules ...!
<modules>!
● Maven computes the <module>moduleA</module>!
build order from <module>moduleB</module>!
dependencies <module>moduleC</module>!
between sub- <module>moduleD</module>!
modules. <module>moduleE</module> !
● Modules have to be <module>moduleF</module>!
defined in the POM </modules>!
...!
- No auto-discovery for </project>!
performance reasons
Licensed under a Creative Commons license
16. Inheritance
● Share settings between
projects/modules
● By default the parent
project is supposed to be
in the parent directory (../)
<parent>!
<groupId>net.aheritier.sample</groupId>!
<artifactId>my-parent</artifactId>!
<version>1.0.0-SNAPSHOT<version>!
</parent>!
Licensed under a Creative Commons license
17. Inheritance
Use a technical inheritance to organize sub-modules
Use assembly to package batchs
Insert README in all artifacts
Use clirr to validate backward compatibility
Licensed under a Creative Commons license
18. Artifact Repository
● By default :
- A central repository
● http://repo1.maven.org/
maven2
● Several dozen of Gb of OSS
libraries
- A local repository
● ${user.home}/.m2/repository
● All artifacts
- Used by maven and its
plugins
- Used by your projects
(dependencies)
- Produced by your projects
Licensed under a Creative Commons license
19. Artifact Repository
● By default Maven
downloads artifacts
required by the project or
itself from central
● Downloaded artifacts are
stored in the local
repository
● Used to store :
- Project’s binaries
- Project’s dependencies
- Maven and plug-ins binaries
Licensed under a Creative Commons license
21. Dependencies
● Declaratives
- groupId + artifactId + version (+ classifier)
- Type (packaging) : jar, war, pom, ear, …
● Transitives
- Lib A needs Lib B
- Lib B needs Lib C
- Thus Lib A needs Lib C
Licensed under a Creative Commons license
22. Dependencies
● Scope
- Compile (by default) : Required to build and run the
application
- Runtime : not required to build the application but
needed at runtime
● Ex : taglibs
- Provided : required to build the application but not
needed at runtime (provided by the container)
● Ex : Servlet API, Driver SGBD, …
- Test : required to build and launch tests but not needed
by the application itself to build and run
● Ex : Junit, TestNG, DbUnit, …
- System : local library with absolute path
● Ex : software products
Licensed under a Creative Commons license
23. Dependencies
● Define all dependencies you are using
- and no more !
● If you have optional dependencies
- Perhaps you should have optional modules instead
● Cleanup your dependencies with
- mvn dependency:analyze!
● Study your dependencies with
- mvn dependency:tree!
- mvn dependency:list!
Licensed under a Creative Commons license
24. Versions
● Project and dependency versions
● Two different version variants
SNAPSHOT version
● The version number ends with –SNAPSHOT
● The project is in development
● Deliveries are changing over the time and are overridden
after each build
● Artifacts are deployed with a timestamp on remote
repositories
RELEASE version
● The version number doesn’t end with –SNAPSHOT
● Binaries won’t change
Licensed under a Creative Commons license
26. Versions
● About SNAPSHOT dependencies
- Maven allows the configuration of an update policy.
The update policy defines the recurrence of checks if
there is a new SNAPSHOT version available on the
remote repository :
● always
● daily (by default)
● interval:X (a given period in minutes)
● never
- Must not be used in a released project
● They can change thus the release also
● The release plugin will enforce it
Licensed under a Creative Commons license
27. Versions
● Range
- From … to …
- Maven automatically searches for the corresponding
version (using the update policy for released artifacts)
- To use with caution
● Risk of non reproducibility of the build
● Risk of side effects on projects depending on yours.
Licensed under a Creative Commons license
28. Versions
● Use the versions plugin to update all versions of your
project and its modules
mvn versions:set –DnewVersion=A.B.C-SNAPSHOT!
Licensed under a Creative Commons license
29. Profiles
● Allow to modify the default behavior of Maven by
overriding/adding some settings
● Use mvn help:active-profiles to debug
● Explicit activation or deactivation
mvn <phases or goals> !
-PprofileId1,-profileId2 !
-P!profileId3!
Licensed under a Creative Commons license
30. Profiles
● activeByDefault = If no other profile is activated
● Activation through Maven settings
<settings>!
...!
<activeProfiles>!
<activeProfile>profile-1</activeProfile>!
</activeProfiles>!
...!
</settings>!
Licensed under a Creative Commons license
31. Profiles
● Activation based on environment variables
<profiles>!
<profiles>!
<profile>!
<profile>!
<activation>!
<activation>!
<property>!
<property>!
<name>run-its</name>!
<name>!skip-enforce</name>!
<value>true</value>!
</property>!
</property>!
</activation>!
</activation>!
...!
...!
</profile>!
</profile>!
</profiles>!
</profiles>!
Licensed under a Creative Commons license
33. Profiles
● Activation on present or missing files
<profiles>!
<profile>!
<activation>!
<file>!
<missing>${project.build.directory}/generated-sources/
axistools/wsdl2java/</missing>!
</file>!
</activation>!
...!
</profile>!
</profiles>!
Licensed under a Creative Commons license
34. Build Lifecycle And Plugins
● Plugin based architecture
for a great extensibility
● Standardized lifecycle to
build all types of
archetypes
Licensed under a Creative Commons license
35. Build Lifecycle And Plugins
Default Lifecycle Clean Lifecycle Site Lifecycle
validate pre-clean pre-site
initialize
clean site
generate-sources post-clean post-site
process-sources
site-deploy
generate-resources
process-resources
compile
process-classes
generate-test-sources
process-test-sources
generate-test-resources
process-test-resources
test-compile
process-test-classes
test
prepare-package
package
pre-integration-test
integration-test
post-integration-test
verify
install
deploy Licensed under a Creative Commons license
36. Build Lifecycle And Plugins
● Many plugins
- Packaging
- Reporting
- IDE integration
- Miscellaneous tools integration
● Many locations
- maven.apache.org
- mojo.codehaus.org
- code.google.com
- …
Licensed under a Creative Commons license
37. Apache Maven
MAVEN OR NOT MAVEN,
THAT IS THE QUESTION !
Licensed under a Creative Commons license
38. Maven, the project’s choice
● Application’s architecture
- The project has the freedom to divide the application in
modules
- Maven doesn’t limit the evolution of the application
architecture
● Dependencies management
- Declarative : Maven automatically downloads them and
builds the classpath
- Transitive : We define only what the module needs
itself
Licensed under a Creative Commons license
39. Maven, the project’s choice
● Centralizes and automates - Builds
all development facets - Tests
(build, tests, releases) - Packages
● One thing it cannot do for - Deploys
you : to develop - Documents
- Checks and reports about
the quality of developments
Licensed under a Creative Commons license
40. Maven, the corporate’s choice
● Widely adopted and known
- Many developers
● Developments are standardized
● Decrease of costs
- Reuse of knowledge
- Reuse of configuration fragments
- Reuse of process and code fragments
● Product quality improvement
- Reports and monitoring
Licensed under a Creative Commons license
41. Competitors
● Ant + Ivy, Easy Ant, Gant, Gradle, Buildr…
● Script oriented
- You can do what you want !
● Reuse many of Maven conventions (directories
layout, …) and services (repositories) but without
enforcing them
● The risk for them : Not being able to evolve due
to the too high level of customization proposed
to the user.
- We tried on Maven 1 and it died because of that. It was
impossible to create a set of tests to cover all usages.
- It’s like providing a framework without public API
Licensed under a Creative Commons license
42. With scripts oriented builds
You can have But often you have
(if you have good skills) (moreover after years …)
Licensed under a Creative Commons license
43. With Maven
We dream to deliver But today we have too often
(Maven 3.x) (Maven 2.x)
Licensed under a Creative Commons license
45. Maven’s ecosytem
● Maven alone is nothing
● You can integrate it with many tools
- A large set of plug-ins is already available
- You can define your own plug-ins
Licensed under a Creative Commons license
48. Secure your builds
● Deploy a repository manager to proxy externals
repositories to :
- Avoid external network outages
- Avoid external repository unavailabilities
- To reduce your company’s external network usage
- To increase the speed of artifact downloads
● Additional services offered by such servers :
- Artifacts procurement to filter what is coming from the
outside
- Staging repository to validate your release before
deploying it
Licensed under a Creative Commons license
49. Nexus at eXo for productivity
Licensed under a Creative Commons license
50. Nexus at eXo for collaboration
● Deploy 3rd Party Artifacts
● Collaborate with Internal
Repositories
● Distribute to the community
with Public Repositories
● Distribute to customers
with Private Repositories
Licensed under a Creative Commons license
51. Nexus at eXo for quality
● Ease the Burden on Central and others remote
repositories
● Gain Predictability and Scalability
● Control and Audit Dependencies and Releases
● Stage releases
Licensed under a Creative Commons license
53. Tests Automation
● Use automated tests as often as you can
● Many tools are available through Maven
- JUnit, TestNG – unit tests,
- Selenium, Canoo – web GUI test,
- Fitnesse, Greenpepper – functional tests,
- SoapUI – web services tests
- JMeter – performances tests
- And many more frameworks are available to reply your
needs
Licensed under a Creative Commons license
54. Quality Metrics
● Extract quality metrics from your project and
monitor them :
- Code style (CheckStyle)
- Bad practices or potential bugs (PMD, FindBugs, Clirr)
- Tests coverage (Cobertura, Emma, Clover)
- …
● You can use blocking rules
- For example, I break the build if the upward
compatibility of public APIs is broken
● You can use reports
- Reports are available in a web site generated by
Maven
- Or in a quality dashboard like Sonar
Licensed under a Creative Commons license
60. Continuous Integration
● Setup a continuous integration server to :
- Have a neutral and unmodified environment to run your
tests
- Quickly react when
● The build fails (compilation failure for example)
● A test fails
● A quality metric is bad
- Continuously improve the quality of your project and
your productivity
● Many products
- Hudson, Bamboo, TeamCity, Continuum,
Cruisecontrol, …
Licensed under a Creative Commons license
61. Hudson, how the weather is ?
Licensed under a Creative Commons license
62. Hudson : build, test, check
Licensed under a Creative Commons license
64. Eclipse
● Integration from maven (eclipse:eclipse)
- Allow many customizations
- Support many versions/variants of eclipse
- Support many usages (ear …)
- Doesn’t support projects with “pom” packaging
- Few support from dev team
- Many bugs in classpath management
- Asynchronous
● You have to regenerate and reload project each time you
change a POM)
Licensed under a Creative Commons license
65. Eclipse
● Integration from eclipse (m2eclipse)
- Synchronous
- Nice UI and services to edit POMs
- Support projects with “pom” packaging
- Doesn’t support all usages like EAR with WTP
- Doesn’t support very well a large number of modules
- Slow down eclipse on large projects because of a lack
of support of incremental build in Maven 2.x and its
plugins
Licensed under a Creative Commons license
73. K.I.S.S.
● Keep It Simple, Stupid
● Start from scratch
- Do not copy/paste what you find without understanding
● Use only what you need
- It’s not because maven offers many features that you
need to use them
● Filtering
● Modules
● Profiles
● …
Licensed under a Creative Commons license
75. Project bad practices
● Ignore Maven conventions
- Except if your are migrating from something else and
the target has to be to follow them.
- Except if they are not compatible with your IDE
● Different versions in sub-modules
- In that case they are standalone projects.
● Too many inheritance levels
- It makes the POMs maintenance more complex
- Where should I set this plugin parameter ? In which parent ?
Licensed under a Creative Commons license
76. Project bad practices
● Have too many modules
- Is there a good reason ?
● Technical constraint ?
● Team organization ?
- It increases the build time
● Many more artifacts to generate
● Dependencies resolution more complex
- It involves more complex developments
● More modules to import in your IDE
● More modules to update …
Licensed under a Creative Commons license
77. Project good practices
● Use the default
inheritance :
- The reactor project is also
the parent of its modules.
- Configuration is easier :
● No need to redefine SCM
settings, site distribution
settings …
Licensed under a Creative Commons license
79. POM bad practices
● Dependencies :
- DON’T confuse dependencies and
dependencyManagement
● Plugins :
- DON’T confuse plugins and pluginManagement
- DON’T use AntRun plugin everywhere
- DON’T let Maven choose plugins versions for you
Licensed under a Creative Commons license
80. POM bad practices
● Profiles :
- DON’T create environment dependant builds
- DON’T rely on dependencies coming from profiles
(there is no transitive activation of profiles)
● Reporting and quality
- DON’T activate on an existing project all reports with
default configuration
- DON’T control formatting rules without giving settings
for IDEs.
● DON’T put everything you find in your POM.
Licensed under a Creative Commons license
81. POM good practices
● Set versions of dependencies in project parent’s
dependencyManagement
● Set dependencies (groupId, artifactId, scope) in
each module they are used
● Use the dependency plugin (from apache) and
versions plugin (from mojo) to analyze, cleanup
and update your dependencies.
Licensed under a Creative Commons license
83. Development bad practices
● DON’T spend your time in the terminal,
● DON’T exchange libraries through emails,
● DON’T always use "-Dmaven.test.skip=true”
● DON’T manually do releases
Licensed under a Creative Commons license
84. Development good practices
● Keep up-to-date your version of Maven
- For example in 2.1 the time of dependencies/modules
resolution decreased a lot (Initialization of a project of
150 modules passed from 8 minutes to less than 1)
● Use the reactor plugin (Maven < 2.1) or native
reactor command line options (Maven >= 2.1) to
rebuild only a subpart of your project :
- All modules depending on module XXX
- All modules used to build XXX
● Try to not use Maven features not supported by
your IDE (resources filtering with the plugin
eclipse:eclipse)
Licensed under a Creative Commons license
87. Secure your credentials
● Generate a private key
-
arnaud@leopard:~$ mvn --encrypt-master-password toto
{dZPuZ74YTJ0HnWHGm4zgfDlruYQNda1xib9vAVf2vvY=}
● We save the private key in ~/.m2/settings-security.xml
<settingssecurity>!
<master>{dZPuZ74YTJ0HnWHGm4zgfDlruYQNda1xib9vAVf2vvY=}</master>!
</settingssecurity>!
Licensed under a Creative Commons license
88. Secure your credentials
● You can move this key to another drive ~/.m2/settings.xml
- <settingsSecurity>
<relocation>/Volumes/ArnaudUsbKey/secure/settings-security.xml</relocation>
</settingsSecurity>!
● You create an encrypted version of your server
password
- arnaud@mbp-arnaud:~$ mvn --encrypt-password titi
{SbC9Fl2jA4oHZtz5Fcefp2q1tMXEtBkz9QiKljPiHss=}!
● You register it in your settings
- <settings>
...
<servers>
...
<server>
<id>mon.server</id>
<username>arnaud</username>
<password>{SbC9Fl2jA4oHZtz5Fcefp2q1tMXEtBkz9QiKljPiHss=}</password>
</server>
...
</servers>
...
</settings>!
Licensed under a Creative Commons license
89. Apache Maven
BUILD A PART OF YOUR PROJECT
Licensed under a Creative Commons license
90. Using Reactor Options
● Options added in maven 2.1
● Available in 2.0.x with the maven-reactor-plugin
- But syntax is longer
● Allow to control what you want to build in your
project
Licensed under a Creative Commons license
91. Using Reactor Options
- arnaud@mbp-arnaud:~$ mvn install
[INFO] ------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Project ....................... SUCCESS [2.132s]
[INFO] ModuleA ....................... SUCCESS [5.574s]
[INFO] ModuleB ....................... SUCCESS [0.455s]
[INFO] ModuleC ....................... SUCCESS [0.396s]
[INFO] ModuleD ....................... SUCCESS [0.462s]
[INFO] ModuleE ....................... SUCCESS [0.723s]
[INFO] ModuleF ....................... SUCCESS [0.404s]
!
● Builds everything from A to F
Licensed under a Creative Commons license
92. Using Reactor Options
- arnaud@mbp-arnaud:~$ mvn install –pl
moduleE,moduleB
[INFO] -------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] ModuleB .................. SUCCESS [2.774s]
[INFO] ModuleE .................. SUCCESS [1.008s]
● Builds only modules B and E
● Following dependencies order
● -pl --project-list: Build the
specified reactor projects instead
of all projects
Licensed under a Creative Commons license
93. Using Reactor Options
- arnaud@mbp-arnaud:~$ mvn install –pl moduleD -am
[INFO] ------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] ModuleA ................. SUCCESS [4.075s]
[INFO] ModuleB ................. SUCCESS [0.468s]
[INFO] ModuleC ................. SUCCESS [0.354s]
[INFO] ModuleD ................. SUCCESS [0.384s]
● Builds module D (-pl) and all
modules it uses as dependencies
● -am --also-make: If a project list
is specified, also make projects
that the list depends on
● Usecase : Build all modules
required for a war, ear, …
Licensed under a Creative Commons license
94. Using Reactor Options
- arnaud@mbp-arnaud:~$ mvn install –pl moduleD -amd
[INFO] ------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] ModuleD ................. SUCCESS [4.881s]
[INFO] ModuleE ................. SUCCESS [0.478s]
[INFO] ModuleF ................. SUCCESS [0.427s]
● Builds module D (-pl) and all
modules which depend on it
● -amd --also-make-dependents: If
a project list is specified, also
make projects that depend on
projects on the list
● Usecase : Check that a change in
a module didn’t break others
which are using it
Licensed under a Creative Commons license
95. Using Reactor Options
- arnaud@mbp-arnaud:~$ mvn install –rf moduleD
[INFO] ------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] ModuleD ................. SUCCESS [9.707s]
[INFO] ModuleE ................. SUCCESS [0.625s]
[INFO] ModuleF ................. SUCCESS [0.679s]
[INFO] Project ................. SUCCESS [2.467s]
● Restarts all the build from module
D (-rf)
● -rf,--resume-from <arg> :
Resume reactor from specified
project
● Usecase : The build failed a 1st
time in module D, you fixed it, and
restart the build were it was to end
it.
Licensed under a Creative Commons license
97. Release of a webapp in 2002
● Limited usage of eclipse
- No WTP (Only some features in WSAD),
- No ability to produce WARs
Licensed under a Creative Commons license
98. Release of a webapp in 2002
● Many manual tasks
- Modify settings files
- Package JARs
- Copy libraries (external and internal) in a « lib »
directory
- Package WAR (often with a zip command)
- Tag the code (CVS)
- Send the package on the integration server using FTP
- Deploy the package with AS console
Licensed under a Creative Commons license
99. Release of a webapp in 2002
● One problem : The are ● How long did it take ?
always problems - When everything is ok : 15
- Error in config files minutes
- Missing dependencies - When there’s a problem : ½
- Missing file day or more
- Last minute fix which created a bug
- And many other possibilies ..
Licensed under a Creative Commons license
100. Maven Release Plugin
● Automates the release process from tagging
sources to binaries delivery
● Release plugin main goals:
- Prepare : To update maven versions and information in
POMs and tag the code
- Perform : To deploy binaries in a maven repository
● After that you can just automate the deployment on
the AS using cargo for example.
Licensed under a Creative Commons license
102. Configuration and Prerequisites
● Project version (must be a SNAPSHOT version)
● Dependencies and plugins versions mustn’t be
SNAPSHOTs
Licensed under a Creative Commons license
103. Troubleshooting Releases
● Common errors during release:
- Build with release profile was tested before and fails
- Local modifications
- Current version is not a SNAPSHOT
- SNAPSHOTs in dependencies and/or plugins
- Missing some configuration (scm, distribMgt, …)
- Tag already exists
- Unable to deploy project to the Repository
- Connection problems
Licensed under a Creative Commons license
104. SCM configuration
● SCM binaries have to be in the PATH
● SCM credentials have to already be stored or you have to
pass them in command line with :
–Dusername=XXX –Dpassword=XXX
<scm>!
<connection>scm:svn:http://svn.acme.com/myproject/trunk</connection>!
<developerConnection>scm:svn:https://svn.acme.com/myproject/trunk</developerConnection>!
<url>http://fisheye.acme.com/browse/myproject/trunk</url>!
</scm>!
Licensed under a Creative Commons license
105. Distribution Management
● Where you want to upload released binaries
● The url of a repository dedicated for your project/
corporate maven deliveries in your repository manager
<project>!
<distributionManagement>!
<repository>!
<id>repository.acme.com</id>!
<url>${acme.releases.repo.url}</url>! This id will be used in user’s
</repository>! maven settings
. . .! (~/.m2/settings.xml)
</distributionManagement>!
. . . !
<properties>!
<acme.releases.repo.url>http://repo.acme.com/acme-releases</acme.releases.repo.url>!
. . .!
</properties>! Often useful to have a property
</project>! to test the release process on a
fake repository, to validate a
repo manager ...
Licensed under a Creative Commons license
106. Repository credentials
● One server entry is required per different repository id in
distribution management of projects
● In a corporate environment, use a unique id for all
repositories hosted on repository managers using same
credentials (corporate LDAP …)
<settings>!
...!
<servers>!
<server>!
<id>repository.acme.com</id>!
<username>aheritier</username>! This id is the one defined in
<password>{ABCDEFGHIJKLMNOPQRSTUVWYZ}</password>! distributionManagement entry of
</server>! the project to release
...!
</servers>!
...!
</settings>!
Licensed under a Creative Commons license
107. Default Release Profile in Super POM
● This profile is used when you generate binaries of the
release with “mvn release:perform”
● By default, generates sources and javadocs jars for each
module.
<profile>!
<id>release-profile</id>!
<activation>!
<property>!
<name>performRelease</name>!
<value>true</value>! This activation could be used in
</property>! profiles you want to activate in
</activation>! the release process
<build>!
<plugins>!
...!
</plugins>! Configuration to generate
</build>! sources and javadoc jars with
</profile>! basic setting
Licensed under a Creative Commons license
108. Custom release profile
<project>!
...!
<build>!
<pluginManagement>!
<plugins>!
<plugin>!
<groupId>org.apache.maven.plugins</groupId>!
<artifactId>maven-release-plugin</artifactId>!
<version>2.0</version>!
<configuration>!
<useReleaseProfile>false</useReleaseProfile>!
<releaseProfiles>myreleaseprofile</releaseProfiles>! Don’t use the default profile
</configuration>!
</plugin>!
</plugins>!
Use our customized profile
</pluginManagement>!
</build>!
...!
<profiles>!
<profile>!
<id>myreleaseprofile</id>!
<build>!
...! Our customized profile
</build>!
</profile>! Customize the behavior of
</profiles>! the build for a release
...! Take care to test is before
</project>!
the release !!
Licensed under a Creative Commons license
110. Why should we setup a global mirror ?
● To simplify users and projects settings
● To control where binaries are coming from
- To not rely on project’s repositories
- To use only the corporate repository manager
● To improve build performances
- By reducing the number of requests to find a missing
artefact
Licensed under a Creative Commons license
111. How should we setup a global mirror ?
<setting>
<mirrors>
<mirror>
<id>global-mirror</id>
<mirrorOf>external:*</mirrorOf>
<url>http://repo.acme.com/public</url>
</mirror>
Send all requests to this url
</mirrors>
<profiles>
<profile>
<id>mirror</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
Use « central » id to override
<snapshots><enabled>true</enabled></snapshots> default maven configuration
</repository>
</repositories> Enable snapshots
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>mirror</activeProfile>
</activeProfiles>
</settings> ! make the profile active all the
time
Licensed under a Creative Commons license
114. Apache Maven 2.0.x
● bugs fix
● Last release : 2.0.11
● No other release of 2.0.x in the future
Licensed under a Creative Commons license
115. Apache Maven 2.x
● Evolutions, new features
● Several important new features in 2.1 like
- Parallel downloads
- Encrypted passwords
- Reactor command line options
● Last release : 2.2.1
Licensed under a Creative Commons license
116. Apache Maven 3.x
● Do not be afraid !!!!!
● Full compatibility with maven 2.x projects
- Or at least at 99,99999%
● Availability in 2010 (2nd half)
● Why Maven 3.X ?
- To build new foundations for the future
- The major part of the code was reviewed / rewritten
● How POMs are constructed
● How the lifecycle is executed
● How the plugin manager executes
● How artifacts are resolved
● How it can be embedded
● How dependency injection is done
● …
Licensed under a Creative Commons license
117. Apache Maven 3.x - robustness
● Error & integrity reporting
- Much improved error reporting where we will provide
links to each identifiable problem we know of. There
are currently 42 common things that can go wrong.
- Don't allow builds where versions come from non-
project sources like local settings and CLI parameters
- Don't allow builds where versions come from profiles
that have to be activated manually
● Backward compatibility
- Several thousands of integration tests
Licensed under a Creative Commons license
118. Apache Maven 3.x - performances
● Many optimizations
● New support of parallel builds of modules
● New incremental (partial) build
- To improve IDE integration
Licensed under a Creative Commons license
119. Apache Maven 3.x – new features
● Any-source POM
- If you don’t like XML, choose another DSL
● Versionless parent elements
- If you don’t use versions or release plugins to
automatically update them
● Mixins
- a compositional form of Maven POM configuration
● Global excludes
Licensed under a Creative Commons license
120. Apache Maven 3.x
● What it will change for maven developers ?
- Lifecycle extension points
- Plugin extension points
- Incremental build support
- Queryable lifecycle
- Extensible reporting
- Bye bye Plexus, welcome JSR 330 & Google Guice
- Well defined and documented APIs
Licensed under a Creative Commons license
121. Apache Maven 3.x – New tools
● mvnsh
- A cross-platform shell
dedicated to maven
● Tycho
- Maven ready for OSGI and
Eclipse developments
Licensed under a Creative Commons license
122. In Apache Maven 3.0 ?
● A backward compatibility near to 100% for projects
and plugins
● A totally new implementation
- A greater robustness with a better reporting and more
readable logs
- Performances improvements and new parallel builds
- A better integration for others tools like IDE or
continuous integration servers
● No change in current POM format
Licensed under a Creative Commons license
124. Users Mailing List
● users@maven.apache.org
- Traffic statistics cover a total
of 1697 days.
- Current subscribers: 1861
- Current digest subscribers:
47
- Total posts (1697 days):
80633 ● Blue :
- Mean posts per day: 47.52
- Number of subscribers
● http://pulse.apache.org/
● Red :
- Number of messages per
day
Licensed under a Creative Commons license
125. Apache Maven Web Site
Licensed under a Creative Commons license
126. Dowloads
● Per month downloads
● http://people.apache.org/~vgritsenko/stats/projects/
maven.html
Licensed under a Creative Commons license
127. The team
● 60 committers,
● More than 30 active in 2009,
● Several organizations like Sonatype, deliver
resources and professional support,
● A community less isolated : more interactions with
Eclipse, Jetty,
Licensed under a Creative Commons license
130. Conclusion
● Today, Maven is widely adopted in corporate
environments,
● It provides many services,
● It has an important and really active community of
users and developers
● Many resources to learn to use it and a
professional support are available
● A product probably far from being perfect but on
rails for the future. Maven 3.0 is a new start.
● Many things to do
- We need you !
Licensed under a Creative Commons license
132. Licence et copyrights
● Photos and logos belong to their respective
authors/owners
● Content under Creative Commons 3.0
- Attribution — You must attribute the work in the manner specified by the
author or licensor (but not in any way that suggests that they endorse you or
your use of the work).
- Noncommercial — You may not use this work for commercial
purposes.
- Share Alike — If you alter, transform, or build upon this work, you may
distribute the resulting work only under the same or similar license to this one.
● http://creativecommons.org/licenses/by-nc-sa/3.0/us/
Licensed under a Creative Commons license
135. Some links
● The main web site :
- http://maven.apache.org
● Project’s team wiki :
- http://docs.codehaus.org/display/MAVEN
● Project’s users wiki :
- http://docs.codehaus.org/display/MAVENUSER
Licensed under a Creative Commons license
136. Books
● Nicolas De loof
Arnaud Héritier
- Published by Pearson
- Collection Référence
- Based on our own
experiences with Maven.
- From beginners to experts.
- In French only
Licensed under a Creative Commons license
137. Books
● Sonatype / O’Reilly :
- The Definitive Guide
- http://www.sonatype.com/
books
- Free download
- Available in several
languages
Licensed under a Creative Commons license
138. Books
● Exist Global
- Better builds with Maven
- http://www.maestrodev.com/
better-build-maven
- Free download
Licensed under a Creative Commons license
140. Support
● Mailing lists
- http://maven.apache.org/mail-lists.html
● IRC
- irc.codehaus.org - #maven
● Forums
- http://www.developpez.net/ forum maven
- In French
● Dedicated support
- Sonatype and many others companies
Licensed under a Creative Commons license