SlideShare a Scribd company logo
Maven “ Tutto” quello che NON avreste MAI voluto sapere... ( http://maven.apache.org/ ) JUG-Genova Fabio Bonfante Carlo Bonamico
L'origine... Maven 1.x Condizioni dello sviluppatore dopo un uso intensivo di Maven 1 su progetti di grandi dimensioni (Fortunatamente con Maven 2 è tutta un'altra cosa...)
L'evoluzione... Maven 2 Condizioni dello sviluppatore dopo un uso intensivo di maven 2 (La situazione è nettamente migliorata!)
Cos'è Maven Maven is essentially a project management and comprehension tool and as such provides a way to help with managing: Builds Documentation Reporting Dependencies SCMs Releases, Distribution
Installazione e configurazione Unzip M2_HOME –  path/to/installed-maven MAVEN_OPTS –  opzioni JVM <user>/.m2/settings.xml <user>/.m2/repository –  posizione di default del repository locale
Concetti base: Ciclo di Build Build Lifecycle Phases  (principali) validate   - validate the project is correct and all necessary information is available compile  - compile the source code of the project test  - test the compiled source 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 its distributable format, such as a JAR.
Concetti base: Ciclo di Build integration-test  - process and deploy the package if necessary into an environment where integration tests can be run verify  - run any checks to verify the package is valid and meets quality criteria install  - install the package into the local repository, for use as a dependency in other projects locally deploy  - done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.
Concetti base: POM Fasi “extra” del ciclo di build clean  : cleans up artifacts created by prior builds site  : generates site documentation for this project Project Object Model (POM, pom.xml) Definisce il progetto, le sue dipendenze e come deve essere compilato.
Concetti Base:  Standard Directory Layout src/main/java Application/Library sources src/main/resources  Application/Library resources src/main/filters  Resource filter files src/main/assembly  Assembly descriptors src/main/config  Configuration files src/main/webapp   Web application sources src/test/java  Test sources src/test/resources  Test resources src/test/filters  Test resource filter files src/site Site
Build with Maven... (shell) Creare un progetto mvn archetype:create -DgroupId=ge.jug.samples -DartifactId=zeroapp Compilarlo:  mvn package Eseguirlo java -cp target/zeroapp-1.0-SNAPSHOT.jar ge.jug.samples.App
Build with Maven Uno sguardo al POM... Ogni cosa è una plug-in... <build> <plugins> < plugin > <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> < configuration > <source>1.5</source> <target>1.5</target> </ configuration > </ plugin > </plugins> </build>
Build with Maven Build di più progetti +-  pom.xml +- my-app | +-  pom.xml | +- src |  +- main |  +- java +- my-webapp | +-  pom.xml | +- src |  +- main |  +- webapp
Build with Maven Struttura del POM radice <project ....> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany.app</groupId> <version>1.0-SNAPSHOT</version> <artifactId>app</artifactId> <packaging> pom </packaging> <modules> <module>my-app</module> <module>my-webapp</module> </modules> </project>
Build with Maven... testing By default the tests included are: **/*Test.java **/Test*.java **/*TestCase.java And the default excludes are: **/Abstract*Test.java **/Abstract*TestCase.java
Build with Maven <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.4-SNAPSHOT</version> <configuration> <includes> <include>**/*QueryService.java </include> </includes> <excludes> <exclude>**/FillDBTest.java</exclude> </excludes> </configuration>
Build with Maven Aggiunta di file di risorse <build> <resources> <resource>  <directory>src/main/resources</directory> <filtering>true</filtering> </resource> </resources> </build>
Integrazione con Eclipse Generazione file di progetto per Eclipse mvn eclipse:eclipse Plugin disponibili Maven Integration for Eclipse http://m2eclipse.sonatype.org/update/ Q for Eclipse http://q4e.googlecode.com/svn/trunk/updatesite/
Integrazione con Netbeans Tools > Plugins
Riferimenti Maven home page http://maven.apache.org/ Maven: The Definitive Guide http://www.sonatype.com/book/ Better build with Maven http://www.mergere.com/m2book_download.jsp
Ad

More Related Content

What's hot (20)

BSA Academy 2016. PHP 7. What's new?
BSA Academy 2016. PHP 7. What's new?BSA Academy 2016. PHP 7. What's new?
BSA Academy 2016. PHP 7. What's new?
Binary Studio
 
JBoss AS 7 따라잡기
JBoss AS 7 따라잡기JBoss AS 7 따라잡기
JBoss AS 7 따라잡기
jbugkorea
 
What's new in Java 11
What's new in Java 11What's new in Java 11
What's new in Java 11
Michel Schudel
 
Test::Kantan - Perl and Testing
Test::Kantan - Perl and TestingTest::Kantan - Perl and Testing
Test::Kantan - Perl and Testing
Tokuhiro Matsuno
 
Perl6 meets JVM
Perl6 meets JVMPerl6 meets JVM
Perl6 meets JVM
Tokuhiro Matsuno
 
Server::Starter meets Java
Server::Starter meets JavaServer::Starter meets Java
Server::Starter meets Java
Tokuhiro Matsuno
 
Wt unit 3
Wt unit 3 Wt unit 3
Wt unit 3
team11vgnt
 
Connecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRubyConnecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRuby
Nick Sieger
 
Clojure in real life 17.10.2014
Clojure in real life 17.10.2014Clojure in real life 17.10.2014
Clojure in real life 17.10.2014
Metosin Oy
 
Scalalable Language for a Scalable Web
Scalalable Language for a Scalable WebScalalable Language for a Scalable Web
Scalalable Language for a Scalable Web
Timothy Perrett
 
Using Java from Ruby with JRuby IRB
Using Java from Ruby with JRuby IRBUsing Java from Ruby with JRuby IRB
Using Java from Ruby with JRuby IRB
Hiro Asari
 
JRuby in Java Projects
JRuby in Java ProjectsJRuby in Java Projects
JRuby in Java Projects
jazzman1980
 
Zend Framework 2 Components
Zend Framework 2 ComponentsZend Framework 2 Components
Zend Framework 2 Components
Shawn Stratton
 
JBoss Negotiation in AS7
JBoss Negotiation in AS7JBoss Negotiation in AS7
JBoss Negotiation in AS7
Josef Cacek
 
Reasonable RPC with Remotely
Reasonable RPC with RemotelyReasonable RPC with Remotely
Reasonable RPC with Remotely
Timothy Perrett
 
Rollup v.s Webpack: shallow compare the next generation ES6 bundlers
Rollup v.s Webpack: shallow compare the next generation ES6 bundlersRollup v.s Webpack: shallow compare the next generation ES6 bundlers
Rollup v.s Webpack: shallow compare the next generation ES6 bundlers
Yao Nien Chung
 
Mojolicious and REST
Mojolicious and RESTMojolicious and REST
Mojolicious and REST
Jonas Brømsø
 
You suck at Memory Analysis
You suck at Memory AnalysisYou suck at Memory Analysis
You suck at Memory Analysis
Francisco Ribeiro
 
Perl6 web-app
Perl6 web-appPerl6 web-app
Perl6 web-app
Tokuhiro Matsuno
 
Plongée dans l'écosystème Laravel
Plongée dans l'écosystème LaravelPlongée dans l'écosystème Laravel
Plongée dans l'écosystème Laravel
Gabriel Pillet 🐙
 
BSA Academy 2016. PHP 7. What's new?
BSA Academy 2016. PHP 7. What's new?BSA Academy 2016. PHP 7. What's new?
BSA Academy 2016. PHP 7. What's new?
Binary Studio
 
JBoss AS 7 따라잡기
JBoss AS 7 따라잡기JBoss AS 7 따라잡기
JBoss AS 7 따라잡기
jbugkorea
 
Test::Kantan - Perl and Testing
Test::Kantan - Perl and TestingTest::Kantan - Perl and Testing
Test::Kantan - Perl and Testing
Tokuhiro Matsuno
 
Server::Starter meets Java
Server::Starter meets JavaServer::Starter meets Java
Server::Starter meets Java
Tokuhiro Matsuno
 
Connecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRubyConnecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRuby
Nick Sieger
 
Clojure in real life 17.10.2014
Clojure in real life 17.10.2014Clojure in real life 17.10.2014
Clojure in real life 17.10.2014
Metosin Oy
 
Scalalable Language for a Scalable Web
Scalalable Language for a Scalable WebScalalable Language for a Scalable Web
Scalalable Language for a Scalable Web
Timothy Perrett
 
Using Java from Ruby with JRuby IRB
Using Java from Ruby with JRuby IRBUsing Java from Ruby with JRuby IRB
Using Java from Ruby with JRuby IRB
Hiro Asari
 
JRuby in Java Projects
JRuby in Java ProjectsJRuby in Java Projects
JRuby in Java Projects
jazzman1980
 
Zend Framework 2 Components
Zend Framework 2 ComponentsZend Framework 2 Components
Zend Framework 2 Components
Shawn Stratton
 
JBoss Negotiation in AS7
JBoss Negotiation in AS7JBoss Negotiation in AS7
JBoss Negotiation in AS7
Josef Cacek
 
Reasonable RPC with Remotely
Reasonable RPC with RemotelyReasonable RPC with Remotely
Reasonable RPC with Remotely
Timothy Perrett
 
Rollup v.s Webpack: shallow compare the next generation ES6 bundlers
Rollup v.s Webpack: shallow compare the next generation ES6 bundlersRollup v.s Webpack: shallow compare the next generation ES6 bundlers
Rollup v.s Webpack: shallow compare the next generation ES6 bundlers
Yao Nien Chung
 
Plongée dans l'écosystème Laravel
Plongée dans l'écosystème LaravelPlongée dans l'écosystème Laravel
Plongée dans l'écosystème Laravel
Gabriel Pillet 🐙
 

Viewers also liked (17)

Jewellery Verticals Students Submissions
Jewellery Verticals   Students SubmissionsJewellery Verticals   Students Submissions
Jewellery Verticals Students Submissions
Jigyasa
 
BibliothekarInnen gestalten digitale Wissensräume
BibliothekarInnen gestalten digitale WissensräumeBibliothekarInnen gestalten digitale Wissensräume
BibliothekarInnen gestalten digitale Wissensräume
Ralf Stockmann
 
97暑招生
97暑招生97暑招生
97暑招生
rivegauche
 
Exotic Spp
Exotic SppExotic Spp
Exotic Spp
mweber
 
Books&Music Verticals Students Submissions
Books&Music Verticals   Students SubmissionsBooks&Music Verticals   Students Submissions
Books&Music Verticals Students Submissions
Jigyasa
 
What If
What IfWhat If
What If
Rajib Das Sharma
 
Fashion Appael Verticals Student Submission
Fashion Appael Verticals   Student SubmissionFashion Appael Verticals   Student Submission
Fashion Appael Verticals Student Submission
Jigyasa
 
Watches Verticals Students Submissions
Watches Verticals   Students SubmissionsWatches Verticals   Students Submissions
Watches Verticals Students Submissions
Jigyasa
 
Food Retail Verticals Students Submissions
Food Retail Verticals   Students SubmissionsFood Retail Verticals   Students Submissions
Food Retail Verticals Students Submissions
Jigyasa
 
The Rosary - Glorious Mysteries (Sundays & Wednesdays)
The Rosary - Glorious Mysteries (Sundays & Wednesdays)The Rosary - Glorious Mysteries (Sundays & Wednesdays)
The Rosary - Glorious Mysteries (Sundays & Wednesdays)
jerikaye
 
Paint Industry Vertical Students Submissions
Paint Industry Vertical   Students SubmissionsPaint Industry Vertical   Students Submissions
Paint Industry Vertical Students Submissions
Jigyasa
 
Automobile Verticals Student Submissions
Automobile Verticals   Student SubmissionsAutomobile Verticals   Student Submissions
Automobile Verticals Student Submissions
Jigyasa
 
台北縣三重社區大學「非正規教育課程」
台北縣三重社區大學「非正規教育課程」台北縣三重社區大學「非正規教育課程」
台北縣三重社區大學「非正規教育課程」
rivegauche
 
REST con Jersey
REST con JerseyREST con Jersey
REST con Jersey
Fabio Bonfante
 
Furniture Verticals Students Submissions
Furniture Verticals   Students SubmissionsFurniture Verticals   Students Submissions
Furniture Verticals Students Submissions
Jigyasa
 
Construction & Stone Industry Verticals Students Submissions
Construction & Stone Industry Verticals   Students SubmissionsConstruction & Stone Industry Verticals   Students Submissions
Construction & Stone Industry Verticals Students Submissions
Jigyasa
 
Footwear&Accessories Verticals Students Submissions
Footwear&Accessories Verticals   Students SubmissionsFootwear&Accessories Verticals   Students Submissions
Footwear&Accessories Verticals Students Submissions
Jigyasa
 
Jewellery Verticals Students Submissions
Jewellery Verticals   Students SubmissionsJewellery Verticals   Students Submissions
Jewellery Verticals Students Submissions
Jigyasa
 
BibliothekarInnen gestalten digitale Wissensräume
BibliothekarInnen gestalten digitale WissensräumeBibliothekarInnen gestalten digitale Wissensräume
BibliothekarInnen gestalten digitale Wissensräume
Ralf Stockmann
 
Exotic Spp
Exotic SppExotic Spp
Exotic Spp
mweber
 
Books&Music Verticals Students Submissions
Books&Music Verticals   Students SubmissionsBooks&Music Verticals   Students Submissions
Books&Music Verticals Students Submissions
Jigyasa
 
Fashion Appael Verticals Student Submission
Fashion Appael Verticals   Student SubmissionFashion Appael Verticals   Student Submission
Fashion Appael Verticals Student Submission
Jigyasa
 
Watches Verticals Students Submissions
Watches Verticals   Students SubmissionsWatches Verticals   Students Submissions
Watches Verticals Students Submissions
Jigyasa
 
Food Retail Verticals Students Submissions
Food Retail Verticals   Students SubmissionsFood Retail Verticals   Students Submissions
Food Retail Verticals Students Submissions
Jigyasa
 
The Rosary - Glorious Mysteries (Sundays & Wednesdays)
The Rosary - Glorious Mysteries (Sundays & Wednesdays)The Rosary - Glorious Mysteries (Sundays & Wednesdays)
The Rosary - Glorious Mysteries (Sundays & Wednesdays)
jerikaye
 
Paint Industry Vertical Students Submissions
Paint Industry Vertical   Students SubmissionsPaint Industry Vertical   Students Submissions
Paint Industry Vertical Students Submissions
Jigyasa
 
Automobile Verticals Student Submissions
Automobile Verticals   Student SubmissionsAutomobile Verticals   Student Submissions
Automobile Verticals Student Submissions
Jigyasa
 
台北縣三重社區大學「非正規教育課程」
台北縣三重社區大學「非正規教育課程」台北縣三重社區大學「非正規教育課程」
台北縣三重社區大學「非正規教育課程」
rivegauche
 
Furniture Verticals Students Submissions
Furniture Verticals   Students SubmissionsFurniture Verticals   Students Submissions
Furniture Verticals Students Submissions
Jigyasa
 
Construction & Stone Industry Verticals Students Submissions
Construction & Stone Industry Verticals   Students SubmissionsConstruction & Stone Industry Verticals   Students Submissions
Construction & Stone Industry Verticals Students Submissions
Jigyasa
 
Footwear&Accessories Verticals Students Submissions
Footwear&Accessories Verticals   Students SubmissionsFootwear&Accessories Verticals   Students Submissions
Footwear&Accessories Verticals Students Submissions
Jigyasa
 
Ad

Similar to Maven (20)

Maven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patternsMaven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patterns
elliando dias
 
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
elliando dias
 
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
Renato Primavera
 
Using Maven2
Using Maven2Using Maven2
Using Maven2
elliando dias
 
Maven
MavenMaven
Maven
Марія Русин
 
Apache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentationApache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentation
Arnaud Héritier
 
Introduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS worldIntroduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS world
Dmitry Bakaleinik
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
Sandeep Chawla
 
Maven basics
Maven basicsMaven basics
Maven basics
Vijay Krishnan Ramaswamy
 
Maven
MavenMaven
Maven
feng lee
 
Maven
MavenMaven
Maven
Shraddha
 
Maven 2 features
Maven 2 featuresMaven 2 features
Maven 2 features
Angel Ruiz
 
Maven
MavenMaven
Maven
Nishant Arora
 
20091112 - Mars Jug - Apache Maven
20091112 - Mars Jug - Apache Maven20091112 - Mars Jug - Apache Maven
20091112 - Mars Jug - Apache Maven
Arnaud Héritier
 
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
 
A-Z_Maven.pdf
A-Z_Maven.pdfA-Z_Maven.pdf
A-Z_Maven.pdf
Mithilesh Singh
 
Exploring Maven SVN GIT
Exploring Maven SVN GITExploring Maven SVN GIT
Exploring Maven SVN GIT
People Strategists
 
Using Maven 2
Using Maven 2Using Maven 2
Using Maven 2
andyhot
 
Groovy Maven Builds
Groovy Maven BuildsGroovy Maven Builds
Groovy Maven Builds
Evgeny Goldin
 
Learning Maven by Example
Learning Maven by ExampleLearning Maven by Example
Learning Maven by Example
Hsi-Kai Wang
 
Maven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patternsMaven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patterns
elliando dias
 
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
elliando dias
 
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
Renato Primavera
 
Apache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentationApache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentation
Arnaud Héritier
 
Introduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS worldIntroduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS world
Dmitry Bakaleinik
 
Maven 2 features
Maven 2 featuresMaven 2 features
Maven 2 features
Angel Ruiz
 
20091112 - Mars Jug - Apache Maven
20091112 - Mars Jug - Apache Maven20091112 - Mars Jug - Apache Maven
20091112 - Mars Jug - Apache Maven
Arnaud Héritier
 
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
 
Using Maven 2
Using Maven 2Using Maven 2
Using Maven 2
andyhot
 
Learning Maven by Example
Learning Maven by ExampleLearning Maven by Example
Learning Maven by Example
Hsi-Kai Wang
 
Ad

Recently uploaded (20)

Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtBuckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Lynda Kane
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
Leading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael JidaelLeading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael Jidael
Michael Jidael
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Learn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step GuideLearn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step Guide
Marcel David
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Datastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptxDatastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptx
kaleeswaric3
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
Lynda Kane
 
Automation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From AnywhereAutomation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From Anywhere
Lynda Kane
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtBuckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Lynda Kane
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
Leading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael JidaelLeading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael Jidael
Michael Jidael
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Learn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step GuideLearn the Basics of Agile Development: Your Step-by-Step Guide
Learn the Basics of Agile Development: Your Step-by-Step Guide
Marcel David
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Datastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptxDatastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptx
kaleeswaric3
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
Lynda Kane
 
Automation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From AnywhereAutomation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From Anywhere
Lynda Kane
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 

Maven

  • 1. Maven “ Tutto” quello che NON avreste MAI voluto sapere... ( http://maven.apache.org/ ) JUG-Genova Fabio Bonfante Carlo Bonamico
  • 2. L'origine... Maven 1.x Condizioni dello sviluppatore dopo un uso intensivo di Maven 1 su progetti di grandi dimensioni (Fortunatamente con Maven 2 è tutta un'altra cosa...)
  • 3. L'evoluzione... Maven 2 Condizioni dello sviluppatore dopo un uso intensivo di maven 2 (La situazione è nettamente migliorata!)
  • 4. Cos'è Maven Maven is essentially a project management and comprehension tool and as such provides a way to help with managing: Builds Documentation Reporting Dependencies SCMs Releases, Distribution
  • 5. Installazione e configurazione Unzip M2_HOME – path/to/installed-maven MAVEN_OPTS – opzioni JVM <user>/.m2/settings.xml <user>/.m2/repository – posizione di default del repository locale
  • 6. Concetti base: Ciclo di Build Build Lifecycle Phases (principali) validate - validate the project is correct and all necessary information is available compile - compile the source code of the project test - test the compiled source 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 its distributable format, such as a JAR.
  • 7. Concetti base: Ciclo di Build integration-test - process and deploy the package if necessary into an environment where integration tests can be run verify - run any checks to verify the package is valid and meets quality criteria install - install the package into the local repository, for use as a dependency in other projects locally deploy - done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.
  • 8. Concetti base: POM Fasi “extra” del ciclo di build clean : cleans up artifacts created by prior builds site : generates site documentation for this project Project Object Model (POM, pom.xml) Definisce il progetto, le sue dipendenze e come deve essere compilato.
  • 9. Concetti Base: Standard Directory Layout src/main/java Application/Library sources src/main/resources Application/Library resources src/main/filters Resource filter files src/main/assembly Assembly descriptors src/main/config Configuration files src/main/webapp Web application sources src/test/java Test sources src/test/resources Test resources src/test/filters Test resource filter files src/site Site
  • 10. Build with Maven... (shell) Creare un progetto mvn archetype:create -DgroupId=ge.jug.samples -DartifactId=zeroapp Compilarlo: mvn package Eseguirlo java -cp target/zeroapp-1.0-SNAPSHOT.jar ge.jug.samples.App
  • 11. Build with Maven Uno sguardo al POM... Ogni cosa è una plug-in... <build> <plugins> < plugin > <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> < configuration > <source>1.5</source> <target>1.5</target> </ configuration > </ plugin > </plugins> </build>
  • 12. Build with Maven Build di più progetti +- pom.xml +- my-app | +- pom.xml | +- src | +- main | +- java +- my-webapp | +- pom.xml | +- src | +- main | +- webapp
  • 13. Build with Maven Struttura del POM radice <project ....> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany.app</groupId> <version>1.0-SNAPSHOT</version> <artifactId>app</artifactId> <packaging> pom </packaging> <modules> <module>my-app</module> <module>my-webapp</module> </modules> </project>
  • 14. Build with Maven... testing By default the tests included are: **/*Test.java **/Test*.java **/*TestCase.java And the default excludes are: **/Abstract*Test.java **/Abstract*TestCase.java
  • 15. Build with Maven <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.4-SNAPSHOT</version> <configuration> <includes> <include>**/*QueryService.java </include> </includes> <excludes> <exclude>**/FillDBTest.java</exclude> </excludes> </configuration>
  • 16. Build with Maven Aggiunta di file di risorse <build> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> </resources> </build>
  • 17. Integrazione con Eclipse Generazione file di progetto per Eclipse mvn eclipse:eclipse Plugin disponibili Maven Integration for Eclipse http://m2eclipse.sonatype.org/update/ Q for Eclipse http://q4e.googlecode.com/svn/trunk/updatesite/
  • 18. Integrazione con Netbeans Tools > Plugins
  • 19. Riferimenti Maven home page http://maven.apache.org/ Maven: The Definitive Guide http://www.sonatype.com/book/ Better build with Maven http://www.mergere.com/m2book_download.jsp