SlideShare une entreprise Scribd logo
1  sur  101
NormandyJUG 20 octobre 2009 Builders Battle  Maven / Ivy / Ant / Gradle / EasyAnt ...
Grégory Boissinot ,[object Object],[object Object],[object Object],[object Object],[object Object]
Jean-Louis Boudart ,[object Object],[object Object],[object Object],[object Object]
Xavier Hanin ,[object Object],[object Object]
Arnaud Héritier ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Programme ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
UN PEU D’ARCHÉOLOGIE ,[object Object]
Construction d’un war en 2002 ,[object Object],[object Object],[object Object]
Construction d’un war en 2002 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Construction d’un war en 2002 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
APACHE MAVEN ,[object Object]
Une première réponse : ANT ,[object Object],[object Object],[object Object],[object Object],[object Object]
Les limites de ANT ,[object Object],[object Object],[object Object],[object Object],[object Object]
La réutilisation de scripts ANT ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Quelques exemples ,[object Object],[object Object],[object Object]
LES INTÉRÊTS POUR UN PROJET ,[object Object]
Maven, le choix Projet ,[object Object],[object Object],[object Object],[object Object],[object Object]
Maven, le choix Projet ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
LES INTÉRÊTS POUR UNE ENTREPRISE ,[object Object]
Maven, le choix Entreprise ,[object Object],[object Object],[object Object],[object Object],[object Object]
Maven, le choix Entreprise ,[object Object],[object Object],[object Object],[object Object]
APACHE IVY ,[object Object]
Qu'est ce qu'Apache Ivy ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],1/2
Features ,[object Object],[object Object],[object Object],[object Object],1/2
Features ,[object Object],[object Object],[object Object],[object Object],1/2
Comparatif Ivy / Maven POM ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],1/2
L'esprit d'Ivy : La flexibilité ! ,[object Object],[object Object],[object Object],[object Object],1/2
L'esprit d'Ivy : La flexibilité ! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],1/2
EASYANT ,[object Object]
Qu’est ce qu'EasyAnt ? ,[object Object],[object Object],[object Object],[object Object],[object Object],1/2
Objectif ? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],1/2
Plugins éxistant ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],1/2
Features ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],1/2
Contribution connexes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],1/2
Prochaines versions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],1/2
EasyAnt4e :  intégration  dans eclipse ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],1/2
GRADLE ,[object Object]
Gradle en quelque mots ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Architecture CORE UI DOCS OPEN-API WRAPPER api project-reports code-quality groovy java maven osgi war jetty scala eclipse plugins build tools Ant Ivy Maven Ant Tasks checkstyle codeNarc webdav other dependencies librairies tierces Gradle Groovy
Notion de tâche ,[object Object],<!-- build.gradle --> task  distribution  <<{ println &quot;Distribution&quot; } task release ( dependsOn : 'distribution')<<{ println &quot;Release&quot; } > gradle  distribution Distribution > gradle  release Distribution Release Tâche  simple Accès à l'API Java
Les tâches ont une API Copy  myCopy =  task (myCopy,  type:Copy ) myCopy .from (file('resources')) myCopy .into (file('target')) myCopy .include ('**/*.txt', '**/*.xml') task  mycopy ( type:Copy ) mycopy{ description  ='Copies the resources dir' from (file('resources')) into (file('target')) include ('**/*.txt', '**/*.xml') } task  mycopy ( type:Copy ){ description  ='Copies the resources dir' from (file('resources')) into (file('target')) include ('**/*.txt', '**/*.xml') } Tâche  améliorée CustomTask Copy mycopy
Une API très riche task source( type:Jar ){ baseName='source' from sourceSets.main.java } task distrib( type:Zip ){ dependsOn(jar) baseName='dist' from sourceSets.main.java from jar.archivePath  } CustomTask Abstract ArchiveTask Zip Jar War Tar SourceTask task javadoc( type: Javadoc ) { source sourceSets.main.allJava } Javadoc
Plusieurs tâches par défaut <!-- build.xml --> <project  default=&quot;all&quot; > <target name=&quot;clean&quot;> <echo message=&quot;Cleaning&quot;/> </target> <target name=&quot;jar&quot;> <echo message=&quot;Packaging&quot;/> </target> <target name=&quot;all&quot;> <antcall target=&quot;clean&quot;/> <antcall target=&quot;jar&quot;/> </target> </project> <!-- build.gradle --> defaultTasks 'clean',   'jar' task clean << { println &quot;Cleaning&quot; } task jar << { println &quot;Packaging&quot; } > ant Cleaning Packaging > gradle Cleaning Packaging
Exécution unique et ordonnée compile compileTest test dist > ant test dist compile compileTest test compile compileTest test dist > gradle test dist :compile :compileTest :test :dist
Pour un projet Java/JEE CORE UI DOCS OPEN-API WRAPPER api project-reports code-quality groovy java maven osgi war jetty scala eclipse plugins build tools Ant Ivy Maven Ant Tasks checkstyle codeNarc webdav other dependencies librairies tierces Gradle Groovy
Build d'une librairie <!-- build.gradle --> usePlugin 'java' archivesBaseName  = 'core' version = '3.5'  manifest.mainAttributes ( 'Implementation-Version': version ) repositories { mavenCentral() } dependencies { compile  group: 'commons-collections',  name: 'commons-collections',  version: '3.2' testCompile  group: 'junit',    name: 'junit',    version: '4.+' } > gradle  compileJava > gradle  jar core-3.5.jar Gradle jar Configuration accessible  sous forme de propriétés
Build d'une webapp <!-- build.gradle --> usePlugin 'war' usePlugin 'jetty' archivesBaseName = 'web' version = '1.0' repositories { mavenCentral() } dependencies { compile &quot;commons-io : commons-io : 1.4&quot; compile (&quot;log4j : log4j : 1.2.15&quot;){ exclude(group:'javax.jms') exclude(group:'com.sun.jdmk') exclude(module:'jmxri') } } > gradle  war > gradle  jettyRun WEB-INF optionel JEE6  compatible web-2.4.war Gradle war
Phases de build ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],gradle.taskGraph.whenReady  {taskGraph -> if (taskGraph .hasTask (':release')) { version = '1.0' } else { version = '1.0-SNAPSHOT' } } Nombreux  hooks  disponibles
Intégration native avec Ant CORE UI DOCS OPEN-API WRAPPER api project-reports code-quality groovy java maven osgi war jetty scala eclipse plugins build tools Ant Ivy Maven Ant Tasks checkstyle codeNarc webdav other dependencies librairies tierces Gradle Groovy
Utilisation possible des tâches Ant <!-- build.gradle --> task generateStub << { ant {   def wsdl2java_classpath =  path  { fileset (dir: 'lib') { include(name: '*.jar') } } taskdef ( name: 'axisWsdl2java', classname:  'org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask', classpath: wsdl2java_classpath  ) axisWsdl2java( output:&quot;generated&quot;,  verbose:&quot;true&quot; , url:&quot;Exemple.wsdl&quot;) } } Utilisation de l'objet Groovy  AntBuilder
LES INTÉRÊTS POUR UNE ENTREPRISE Gradle
Gradle, un choix pertinent en Entreprise ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
LES PROBLEMES Gradle
Les problèmes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
LE COMBAT FINAL ,[object Object]
LES DOCUMENTATIONS DOCUMENTATIONS ? ,[object Object]
Quelques liens ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ouvrages ,[object Object],[object Object],[object Object],[object Object],[object Object]
Ouvrages ,[object Object],[object Object],[object Object],[object Object],[object Object]
Ouvrages ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Support ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
DOCUMENTATIONS ,[object Object]
Documentations / Contact ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],1/2
LES DOCUMENTATIONS ? Gradle
Quelques liens ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Support ,[object Object],[object Object],[object Object],[object Object]
LA COMMUNAUTÉ ,[object Object]
La communauté des utilisateurs ,[object Object],[object Object],[object Object],[object Object]
Le site web
Les téléchargements ,[object Object]
L’équipe projet ,[object Object],[object Object],[object Object],[object Object]
LA COMMUNAUTÉ ,[object Object]
Vie du projet ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],1/2
LA COMMUNAUTÉ Gradle
La communauté des utilisateurs ,[object Object]
L'équipe projet ,[object Object],[object Object],[object Object]
SOUS LE CAPOT ,[object Object]
Gradle fournit des cycles de vies (1/2) ,[object Object],Exemple  du plugin 'java'
Des conventions de répertoires ,[object Object],<!-- répertoires --> + build.gradle +src/main/java +src/main/resources +src/main/webapp +src/test/java +src/test/resources +build/classes +build/libs +build/reports +build/test-results <!-- build.gradle --> sourceSets{ main{ java { srcDir  'src/java' } resources { srcDir  'src/resources' } } main{ java { srcDir  'src2/java' } resources { srcDir  'src2/resources' } } } Très configurable Séparation  propre
Gestion des dépendances avec Ivy CORE UI DOCS OPEN-API WRAPPER api project-reports code-quality groovy java maven osgi war jetty scala eclipse plugins build tools Ant Ivy Maven Ant Tasks checkstyle codeNarc webdav other dependencies librairies tierces Gradle Groovy
Gestion des dépendances ,[object Object],[object Object],[object Object],Gradle VCS Repository Maven local/distant Repository Ivy local/distant Artifacts +  méta Maven  (pom.xml) Artifacts +  méta Ivy  (ivy.xml) Artifacts + méta gradle Ivy
Définition des repositories repositories { mavenCentral() mavenRepo urls:&quot;http://serveur/archiva/repo-group&quot; } repositories { flatDir  name: 'localRepository', dirs: 'lib' } repositories { add(  new org.apache.ivy.plugins.resolver.FileSystemResolver()){  name = 'repo' addArtifactPattern  &quot; $projectDir/lib/[module]_[revision].[ext] &quot; descriptor = 'optional' checkmodified = true } }
Déclaration des dépendances ,[object Object],dependencies { compile  &quot;log4j:log4j:1.2.14&quot; testCompile  &quot;junit:junit:4.7&quot; }  ,[object Object],dependencies { runtime  &quot;org.groovy:groovy:1.5.6@jar&quot; }  ,[object Object],dependencies { runtime module(&quot;commons-lang:commons-lang:2.4&quot;) { dependency(&quot;commons-io:commons-io:1.2&quot;) } } Dépendances transitives sans XML
Gradle et Ant: dans les deux sens  (1/2) <!-- build.xml --> <property  name=&quot;src.dir&quot;  value =&quot;src&quot; > <target  name=&quot;compile&quot; > <echo message=&quot;Compile,from Ant&quot;/> </target> <!-- build.gradle --> ant.importBuild 'build.xml' //Complément de la tâche compile compile <<   { println &quot;Added compiling from Gradle&quot; println &quot;SourceDir: ${ant.properties['src.dir']}&quot; } > gradle  compile :compile [ant:echo] Compile, from Ant Added compiling from Gradle SourceDir: src
Gradle et Ant: dans les deux sens  (2/2) <!-- build.xml --> <target name=&quot; deploy &quot;  depends=&quot;assemble&quot; > <echo message=&quot;Deploy, from Ant&quot;/> </target> <!-- build.gradle --> task  assemble  ( dependsOn: 'compile' ) << { println 'Assemble, from Gradle' } >  gradle   deploy :compile [ant:echo] Compile, from Ant Added compiling from Gradle :assemble Assemble, from Gradle :deploy [ant:echo] Deploy, from Ant
Gestion multi projet très avancée CORE UI DOCS OPEN-API WRAPPER api project-reports code-quality groovy java maven osgi war jetty scala eclipse plugins build tools Ant Ivy Maven Ant Tasks checkstyle codeNarc webdav other dependencies librairies tierces Gradle Groovy
Gestion multi projet  (1/3) ,[object Object],[object Object],[object Object],<!-- Structure de répertoires --> + build.gradle + settings.gradle +common/ +pz/ + build.gradle -biz/ - biz-auth/ common biz-auth pz depends depends war war jar <!-- settings.gradle --> include   &quot;common&quot;, &quot;pz&quot;, &quot;biz:auth&quot;
Gestion multi projet  (2/3) <!-- master build.gradle --> subprojects { usePlugin('java') group='org.jug.normandyjug' version='1.0' repositories{ mavenCentral() } dependencies { testCompile 'junit:junit:4.7' } } project(':biz:biz-auth') { dependencies{ compile project(':common') } usePlugin 'war' } <!-- pz/build.gradle --> usePlugin 'war' dependencies{ compile  project(':common') } cross project configuration
Gestion multi projet  (3/3) /web> gradle compileJava :common:compileJava :common:processResources :common:classes :common:jar :common:uploadDefaultInternal :pz:compileJava :biz:biz-auth:compileJava /web/biz/biz-auth> gradle compileJava :common:compileJava :common:processResources :common:classes :common:jar :common:uploadDefaultInternal :biz:biz-auth:compileJava /web/biz/biz-auth> gradle compileJava  -a :biz:biz-auth:compileJava Compilation  des projets  dépendants Utilisation  des jars  dans le cache
Gradle GUI ,[object Object],[object Object],[object Object],[object Object]
Publie dans une infra Maven et Ivy CORE UI DOCS OPEN-API WRAPPER api project-reports code-quality groovy java maven osgi war jetty scala eclipse plugins build tools Ant Ivy Maven Ant Tasks checkstyle codeNarc webdav other dependencies librairies tierces Gradle Groovy
Publication dans des repo Ivy usePlugin 'java' version='1.0' uploadArchives{ repositories{ flatDir( dirs:'destRepo') } } IVY API Gradle Repository Ivy Artifacts +  meta Ivy > gradle  uploadArchives upload Archives
Publication dans des repo Maven usePlugin 'java' usePlugin 'maven' group= 'org.jug.normandyjug' archivesBaseName= 'artefact-ex' version='1.0-SNAPSHOT' uploadArchives { repositories .mavenDeployer  { snapshotRepository (url:  &quot;http://serveur/archiva/repository/snapshots&quot;)  } > gradle  install > gradle  uploadArchives Repository Maven loca l Repository Maven distant Maven Ant Tasks Gradle Artifacts +  meta Maven Artifacts +  meta Maven install upload Archives
Production de plusieurs artefacts ,[object Object],<!-- sample/build.xml --> usePlugin 'java' task sourceJar(type: Jar)  task distrib(type: Zip) artifacts{ archives sourceJar, distrib } repositories{ flatDir name:'repo', dirs:'repo' } uploadArchives { repositories { add project.repositories.repo } }  > gradle  uploadArchives ivy.xml Gradle upload Archives Repository Ivy dist -1.0.zip sample -1.0.jar source -1.0.jar
Gestion simplifié des configurations usePlugin 'java' configurations{ sources master {  extendsFrom archives, sources } } artifacts{ sources sourceJar master  distrib } uploadArchives { repositories{ flatDir(dirs: file('repos'), name:'destRepo') } } uploadSources { repositories{ add project.uploadArchives.repositories.destRepo }  } uploadMaster .repositories=uploadSources.repositories Ajout automatique  de build[ConfigurationName]  et upload[ConfigurationName]
Agir simplement sur le cycle de vie ,[object Object],[object Object],[object Object],[object Object],compileTestJava.enabled=false processTestResources.enabled=false testClasses.enabled=false test.enabled=false
Portée des dépendances  (1/2) <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2;14</version> </dependency> <dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> <version>3.0</version>  <scope> provided </scope> </dependency> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.2</version> </dependency> <!-- Contenu de l'archive --> WEB-INF/lib - log4j-1.2.14.jar - commons-codec-1.2jar commons-httpclient Common-codec
Portée des dépendances  (2/2) ,[object Object],<build.gradle --> dependencies { compile &quot;log4j:log4j:1.2.14&quot; providedCompile  &quot;commons-httpclient:commons-httpclient:3.0&quot; compile &quot;commons-codec:commons-codec:1.2&quot; } <!-- Contenu de l'archive --> WEB-INF/lib - log4j-1.2.14.jar
Questions ?
Licence et droits d’auteurs ,[object Object],[object Object],[object Object],[object Object],[object Object]
Sponsors

Contenu connexe

Tendances

Présentation Maven
Présentation MavenPrésentation Maven
Présentation MavenSOAT
 
Presentation of GWT 2.4 (PDF version)
Presentation of GWT 2.4 (PDF version)Presentation of GWT 2.4 (PDF version)
Presentation of GWT 2.4 (PDF version)Celinio Fernandes
 
Presentation of GWT 2.4 (PowerPoint version)
Presentation of GWT 2.4 (PowerPoint version)Presentation of GWT 2.4 (PowerPoint version)
Presentation of GWT 2.4 (PowerPoint version)Celinio Fernandes
 
GWT Principes & Techniques
GWT Principes & TechniquesGWT Principes & Techniques
GWT Principes & TechniquesRachid NID SAID
 
Formation Gratuite Total Tests par les experts Java Ippon
Formation Gratuite Total Tests par les experts Java Ippon Formation Gratuite Total Tests par les experts Java Ippon
Formation Gratuite Total Tests par les experts Java Ippon Ippon
 
Presentation Rex Methodes Agiles
Presentation Rex Methodes AgilesPresentation Rex Methodes Agiles
Presentation Rex Methodes AgilesIppon
 
NightClazz Build Tools & Continuous Delivery Avancé
NightClazz Build Tools & Continuous Delivery AvancéNightClazz Build Tools & Continuous Delivery Avancé
NightClazz Build Tools & Continuous Delivery AvancéZenika
 
NightClazz Build Tools & Continuous Delivery
NightClazz Build Tools & Continuous DeliveryNightClazz Build Tools & Continuous Delivery
NightClazz Build Tools & Continuous DeliveryZenika
 
20091008 Tests Interaces Web Riches Selenium
20091008   Tests Interaces Web Riches Selenium20091008   Tests Interaces Web Riches Selenium
20091008 Tests Interaces Web Riches SeleniumGreenIvory
 
Node, Grunt et leurs copains qui font de l’accessibilité tout seuls !
Node, Grunt et leurs copains qui font de l’accessibilité tout seuls !Node, Grunt et leurs copains qui font de l’accessibilité tout seuls !
Node, Grunt et leurs copains qui font de l’accessibilité tout seuls !vincent aniort
 
Les nouveautés du Framework .NET 4.5
Les nouveautés du Framework .NET 4.5Les nouveautés du Framework .NET 4.5
Les nouveautés du Framework .NET 4.5Microsoft
 
Intégration continue transco
Intégration continue transcoIntégration continue transco
Intégration continue transcolaurent_opnworks
 
What's Next Replay - IC / Jenkins
What's Next Replay - IC / JenkinsWhat's Next Replay - IC / Jenkins
What's Next Replay - IC / JenkinsZenikaOuest
 
Tests ihm automatises avec selenium
Tests ihm automatises avec seleniumTests ihm automatises avec selenium
Tests ihm automatises avec seleniumsojavawest
 
Concept de l’Intégration Continue
Concept de l’Intégration ContinueConcept de l’Intégration Continue
Concept de l’Intégration ContinueFrédéric Sagez
 

Tendances (20)

Présentation Maven
Présentation MavenPrésentation Maven
Présentation Maven
 
Presentation of GWT 2.4 (PDF version)
Presentation of GWT 2.4 (PDF version)Presentation of GWT 2.4 (PDF version)
Presentation of GWT 2.4 (PDF version)
 
Maven
MavenMaven
Maven
 
Presentation of GWT 2.4 (PowerPoint version)
Presentation of GWT 2.4 (PowerPoint version)Presentation of GWT 2.4 (PowerPoint version)
Presentation of GWT 2.4 (PowerPoint version)
 
GWT Principes & Techniques
GWT Principes & TechniquesGWT Principes & Techniques
GWT Principes & Techniques
 
Formation Gratuite Total Tests par les experts Java Ippon
Formation Gratuite Total Tests par les experts Java Ippon Formation Gratuite Total Tests par les experts Java Ippon
Formation Gratuite Total Tests par les experts Java Ippon
 
Presentation Rex Methodes Agiles
Presentation Rex Methodes AgilesPresentation Rex Methodes Agiles
Presentation Rex Methodes Agiles
 
NightClazz Build Tools & Continuous Delivery Avancé
NightClazz Build Tools & Continuous Delivery AvancéNightClazz Build Tools & Continuous Delivery Avancé
NightClazz Build Tools & Continuous Delivery Avancé
 
Formation gwt
Formation gwtFormation gwt
Formation gwt
 
NightClazz Build Tools & Continuous Delivery
NightClazz Build Tools & Continuous DeliveryNightClazz Build Tools & Continuous Delivery
NightClazz Build Tools & Continuous Delivery
 
20091008 Tests Interaces Web Riches Selenium
20091008   Tests Interaces Web Riches Selenium20091008   Tests Interaces Web Riches Selenium
20091008 Tests Interaces Web Riches Selenium
 
Soiree Maven 2
Soiree Maven 2Soiree Maven 2
Soiree Maven 2
 
Node, Grunt et leurs copains qui font de l’accessibilité tout seuls !
Node, Grunt et leurs copains qui font de l’accessibilité tout seuls !Node, Grunt et leurs copains qui font de l’accessibilité tout seuls !
Node, Grunt et leurs copains qui font de l’accessibilité tout seuls !
 
Les nouveautés du Framework .NET 4.5
Les nouveautés du Framework .NET 4.5Les nouveautés du Framework .NET 4.5
Les nouveautés du Framework .NET 4.5
 
Jenkins Workflow
Jenkins WorkflowJenkins Workflow
Jenkins Workflow
 
Intégration continue transco
Intégration continue transcoIntégration continue transco
Intégration continue transco
 
What's Next Replay - IC / Jenkins
What's Next Replay - IC / JenkinsWhat's Next Replay - IC / Jenkins
What's Next Replay - IC / Jenkins
 
Tests ihm automatises avec selenium
Tests ihm automatises avec seleniumTests ihm automatises avec selenium
Tests ihm automatises avec selenium
 
Concept de l’Intégration Continue
Concept de l’Intégration ContinueConcept de l’Intégration Continue
Concept de l’Intégration Continue
 
Apache ANT
Apache ANTApache ANT
Apache ANT
 

Similaire à 20091020 - Normandy Jug - Builders Battle

20081023 - Paris Vi Master STL TA - Initiation Maven
20081023 - Paris Vi Master STL TA - Initiation Maven20081023 - Paris Vi Master STL TA - Initiation Maven
20081023 - Paris Vi Master STL TA - Initiation MavenArnaud Héritier
 
Chaine de production pipeline
Chaine de production   pipelineChaine de production   pipeline
Chaine de production pipelineNicolas wallerand
 
At2008 Grenoble Hugonnet Sanlaville Public
At2008 Grenoble Hugonnet Sanlaville PublicAt2008 Grenoble Hugonnet Sanlaville Public
At2008 Grenoble Hugonnet Sanlaville PublicEmmanuel Hugonnet
 
Présentation sur Maven 2 et petit retour d'expérience
Présentation sur Maven 2 et petit retour d'expériencePrésentation sur Maven 2 et petit retour d'expérience
Présentation sur Maven 2 et petit retour d'expérienceKhanh Maudoux
 
Spring boot anane maryem ben aziza syrine
Spring boot anane maryem ben aziza syrineSpring boot anane maryem ben aziza syrine
Spring boot anane maryem ben aziza syrineSyrine Ben aziza
 
Être productif avec JHipster - Devoxx France 2017
Être productif avec JHipster - Devoxx France 2017Être productif avec JHipster - Devoxx France 2017
Être productif avec JHipster - Devoxx France 2017Julien Dubois
 
Présentation de Django @ Orange Labs (FR)
Présentation de Django @ Orange Labs (FR)Présentation de Django @ Orange Labs (FR)
Présentation de Django @ Orange Labs (FR)Martin Latrille
 
Configurer GitHub Actions avec Docker et DotNET 8.pdf
Configurer GitHub Actions avec Docker et DotNET 8.pdfConfigurer GitHub Actions avec Docker et DotNET 8.pdf
Configurer GitHub Actions avec Docker et DotNET 8.pdfHamida Rebai Trabelsi
 
Spring Boot & Containers - Do's & Don'ts
Spring Boot & Containers - Do's & Don'tsSpring Boot & Containers - Do's & Don'ts
Spring Boot & Containers - Do's & Don'tsJulien Wittouck
 
Introduction à TeamCity
Introduction à TeamCityIntroduction à TeamCity
Introduction à TeamCityUlrich VACHON
 
Google App Engine For Java
Google App Engine For JavaGoogle App Engine For Java
Google App Engine For Javatcouery
 
WordCamp Lyon 2015 - WordPress, Git et l'intégration continue
 WordCamp Lyon 2015 - WordPress, Git et l'intégration continue WordCamp Lyon 2015 - WordPress, Git et l'intégration continue
WordCamp Lyon 2015 - WordPress, Git et l'intégration continueStéphane HULARD
 
Adama Coulibaly.pptx
Adama Coulibaly.pptxAdama Coulibaly.pptx
Adama Coulibaly.pptxIdrissaDembl
 
Javascript as a first programming language : votre IC prête pour la révolution !
Javascript as a first programming language : votre IC prête pour la révolution !Javascript as a first programming language : votre IC prête pour la révolution !
Javascript as a first programming language : votre IC prête pour la révolution !VISEO
 
Presentation du socle technique Java open source Scub Foundation
Presentation du socle technique Java open source Scub FoundationPresentation du socle technique Java open source Scub Foundation
Presentation du socle technique Java open source Scub FoundationStéphane Traumat
 
Partie 1_Matriser les bases PHP v0555555555555.pptx
Partie 1_Matriser les bases PHP v0555555555555.pptxPartie 1_Matriser les bases PHP v0555555555555.pptx
Partie 1_Matriser les bases PHP v0555555555555.pptxHamzaElgari
 
Scub Foundation, usine logicielle Java libre
Scub Foundation, usine logicielle Java libreScub Foundation, usine logicielle Java libre
Scub Foundation, usine logicielle Java libreStéphane Traumat
 
Agile Tour Paris 2014 : Ma stack d'outils Agiles, tout un programme !, Cedric...
Agile Tour Paris 2014 : Ma stack d'outils Agiles, tout un programme !, Cedric...Agile Tour Paris 2014 : Ma stack d'outils Agiles, tout un programme !, Cedric...
Agile Tour Paris 2014 : Ma stack d'outils Agiles, tout un programme !, Cedric...ENSIBS
 

Similaire à 20091020 - Normandy Jug - Builders Battle (20)

20081023 - Paris Vi Master STL TA - Initiation Maven
20081023 - Paris Vi Master STL TA - Initiation Maven20081023 - Paris Vi Master STL TA - Initiation Maven
20081023 - Paris Vi Master STL TA - Initiation Maven
 
Chaine de production pipeline
Chaine de production   pipelineChaine de production   pipeline
Chaine de production pipeline
 
At2008 Grenoble Hugonnet Sanlaville Public
At2008 Grenoble Hugonnet Sanlaville PublicAt2008 Grenoble Hugonnet Sanlaville Public
At2008 Grenoble Hugonnet Sanlaville Public
 
Présentation sur Maven 2 et petit retour d'expérience
Présentation sur Maven 2 et petit retour d'expériencePrésentation sur Maven 2 et petit retour d'expérience
Présentation sur Maven 2 et petit retour d'expérience
 
Spring boot anane maryem ben aziza syrine
Spring boot anane maryem ben aziza syrineSpring boot anane maryem ben aziza syrine
Spring boot anane maryem ben aziza syrine
 
Être productif avec JHipster - Devoxx France 2017
Être productif avec JHipster - Devoxx France 2017Être productif avec JHipster - Devoxx France 2017
Être productif avec JHipster - Devoxx France 2017
 
Présentation de Django @ Orange Labs (FR)
Présentation de Django @ Orange Labs (FR)Présentation de Django @ Orange Labs (FR)
Présentation de Django @ Orange Labs (FR)
 
Configurer GitHub Actions avec Docker et DotNET 8.pdf
Configurer GitHub Actions avec Docker et DotNET 8.pdfConfigurer GitHub Actions avec Docker et DotNET 8.pdf
Configurer GitHub Actions avec Docker et DotNET 8.pdf
 
Spring Boot & Containers - Do's & Don'ts
Spring Boot & Containers - Do's & Don'tsSpring Boot & Containers - Do's & Don'ts
Spring Boot & Containers - Do's & Don'ts
 
Introduction à TeamCity
Introduction à TeamCityIntroduction à TeamCity
Introduction à TeamCity
 
Gdd07 Gwt Dig
Gdd07 Gwt DigGdd07 Gwt Dig
Gdd07 Gwt Dig
 
Google App Engine For Java
Google App Engine For JavaGoogle App Engine For Java
Google App Engine For Java
 
WordCamp Lyon 2015 - WordPress, Git et l'intégration continue
 WordCamp Lyon 2015 - WordPress, Git et l'intégration continue WordCamp Lyon 2015 - WordPress, Git et l'intégration continue
WordCamp Lyon 2015 - WordPress, Git et l'intégration continue
 
Adama Coulibaly.pptx
Adama Coulibaly.pptxAdama Coulibaly.pptx
Adama Coulibaly.pptx
 
TFS
TFSTFS
TFS
 
Javascript as a first programming language : votre IC prête pour la révolution !
Javascript as a first programming language : votre IC prête pour la révolution !Javascript as a first programming language : votre IC prête pour la révolution !
Javascript as a first programming language : votre IC prête pour la révolution !
 
Presentation du socle technique Java open source Scub Foundation
Presentation du socle technique Java open source Scub FoundationPresentation du socle technique Java open source Scub Foundation
Presentation du socle technique Java open source Scub Foundation
 
Partie 1_Matriser les bases PHP v0555555555555.pptx
Partie 1_Matriser les bases PHP v0555555555555.pptxPartie 1_Matriser les bases PHP v0555555555555.pptx
Partie 1_Matriser les bases PHP v0555555555555.pptx
 
Scub Foundation, usine logicielle Java libre
Scub Foundation, usine logicielle Java libreScub Foundation, usine logicielle Java libre
Scub Foundation, usine logicielle Java libre
 
Agile Tour Paris 2014 : Ma stack d'outils Agiles, tout un programme !, Cedric...
Agile Tour Paris 2014 : Ma stack d'outils Agiles, tout un programme !, Cedric...Agile Tour Paris 2014 : Ma stack d'outils Agiles, tout un programme !, Cedric...
Agile Tour Paris 2014 : Ma stack d'outils Agiles, tout un programme !, Cedric...
 

Plus de Arnaud Héritier

Devops Recto-Verso @ DevoxxMA
Devops Recto-Verso @ DevoxxMADevops Recto-Verso @ DevoxxMA
Devops Recto-Verso @ DevoxxMAArnaud Héritier
 
Java is evolving rapidly: Maven helps you staying on track
Java is evolving rapidly:  Maven helps you staying on trackJava is evolving rapidly:  Maven helps you staying on track
Java is evolving rapidly: Maven helps you staying on trackArnaud Héritier
 
Sonar In Action 20110302-vn
Sonar In Action 20110302-vnSonar In Action 20110302-vn
Sonar In Action 20110302-vnArnaud Héritier
 
2014 August - eXo Software Factory Overview
2014 August - eXo Software Factory Overview2014 August - eXo Software Factory Overview
2014 August - eXo Software Factory OverviewArnaud Héritier
 
CRaSH @ JUGSummerCamp 2012 - Quickie
CRaSH @ JUGSummerCamp 2012 - QuickieCRaSH @ JUGSummerCamp 2012 - Quickie
CRaSH @ JUGSummerCamp 2012 - QuickieArnaud Héritier
 
LavaJUG-Maven 3.x, will it lives up to its promises
LavaJUG-Maven 3.x, will it lives up to its promisesLavaJUG-Maven 3.x, will it lives up to its promises
LavaJUG-Maven 3.x, will it lives up to its promisesArnaud Héritier
 
Hands on iOS developments with jenkins
Hands on iOS developments with jenkinsHands on iOS developments with jenkins
Hands on iOS developments with jenkinsArnaud Héritier
 
eXo Software Factory Overview
eXo Software Factory OvervieweXo Software Factory Overview
eXo Software Factory OverviewArnaud Héritier
 
Apache Maven - eXo TN presentation
Apache Maven - eXo TN presentationApache Maven - eXo TN presentation
Apache Maven - eXo TN presentationArnaud Héritier
 
Mobile developments at eXo
Mobile developments at eXoMobile developments at eXo
Mobile developments at eXoArnaud Héritier
 
Jenkins User Meetup - eXo usages of Jenkins
Jenkins User Meetup - eXo usages of JenkinsJenkins User Meetup - eXo usages of Jenkins
Jenkins User Meetup - eXo usages of JenkinsArnaud Héritier
 
ToursJUG-Maven 3.x, will it lives up to its promises
ToursJUG-Maven 3.x, will it lives up to its promisesToursJUG-Maven 3.x, will it lives up to its promises
ToursJUG-Maven 3.x, will it lives up to its promisesArnaud Héritier
 
YaJUG-Maven 3.x, will it lives up to its promises
YaJUG-Maven 3.x, will it lives up to its promisesYaJUG-Maven 3.x, will it lives up to its promises
YaJUG-Maven 3.x, will it lives up to its promisesArnaud Héritier
 
BordeauxJUG-Maven 3.x, will it lives up to its promises
BordeauxJUG-Maven 3.x, will it lives up to its promisesBordeauxJUG-Maven 3.x, will it lives up to its promises
BordeauxJUG-Maven 3.x, will it lives up to its promisesArnaud Héritier
 
ToulouseJUG-Maven 3.x, will it lives up to its promises
ToulouseJUG-Maven 3.x, will it lives up to its promisesToulouseJUG-Maven 3.x, will it lives up to its promises
ToulouseJUG-Maven 3.x, will it lives up to its promisesArnaud Héritier
 
Apache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentationApache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentationArnaud Héritier
 
LyonJUG - Maven 3.x, will it live up to its promises?
LyonJUG - Maven 3.x, will it live up to its promises?LyonJUG - Maven 3.x, will it live up to its promises?
LyonJUG - Maven 3.x, will it live up to its promises?Arnaud Héritier
 
Lorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - MavenLorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - MavenArnaud Héritier
 
Riviera JUG (20th April, 2010) - Maven
Riviera JUG (20th April, 2010) - MavenRiviera JUG (20th April, 2010) - Maven
Riviera JUG (20th April, 2010) - MavenArnaud Héritier
 
Lausanne Jug (08th April, 2010) - Maven
Lausanne Jug (08th April, 2010) - MavenLausanne Jug (08th April, 2010) - Maven
Lausanne Jug (08th April, 2010) - MavenArnaud Héritier
 

Plus de Arnaud Héritier (20)

Devops Recto-Verso @ DevoxxMA
Devops Recto-Verso @ DevoxxMADevops Recto-Verso @ DevoxxMA
Devops Recto-Verso @ DevoxxMA
 
Java is evolving rapidly: Maven helps you staying on track
Java is evolving rapidly:  Maven helps you staying on trackJava is evolving rapidly:  Maven helps you staying on track
Java is evolving rapidly: Maven helps you staying on track
 
Sonar In Action 20110302-vn
Sonar In Action 20110302-vnSonar In Action 20110302-vn
Sonar In Action 20110302-vn
 
2014 August - eXo Software Factory Overview
2014 August - eXo Software Factory Overview2014 August - eXo Software Factory Overview
2014 August - eXo Software Factory Overview
 
CRaSH @ JUGSummerCamp 2012 - Quickie
CRaSH @ JUGSummerCamp 2012 - QuickieCRaSH @ JUGSummerCamp 2012 - Quickie
CRaSH @ JUGSummerCamp 2012 - Quickie
 
LavaJUG-Maven 3.x, will it lives up to its promises
LavaJUG-Maven 3.x, will it lives up to its promisesLavaJUG-Maven 3.x, will it lives up to its promises
LavaJUG-Maven 3.x, will it lives up to its promises
 
Hands on iOS developments with jenkins
Hands on iOS developments with jenkinsHands on iOS developments with jenkins
Hands on iOS developments with jenkins
 
eXo Software Factory Overview
eXo Software Factory OvervieweXo Software Factory Overview
eXo Software Factory Overview
 
Apache Maven - eXo TN presentation
Apache Maven - eXo TN presentationApache Maven - eXo TN presentation
Apache Maven - eXo TN presentation
 
Mobile developments at eXo
Mobile developments at eXoMobile developments at eXo
Mobile developments at eXo
 
Jenkins User Meetup - eXo usages of Jenkins
Jenkins User Meetup - eXo usages of JenkinsJenkins User Meetup - eXo usages of Jenkins
Jenkins User Meetup - eXo usages of Jenkins
 
ToursJUG-Maven 3.x, will it lives up to its promises
ToursJUG-Maven 3.x, will it lives up to its promisesToursJUG-Maven 3.x, will it lives up to its promises
ToursJUG-Maven 3.x, will it lives up to its promises
 
YaJUG-Maven 3.x, will it lives up to its promises
YaJUG-Maven 3.x, will it lives up to its promisesYaJUG-Maven 3.x, will it lives up to its promises
YaJUG-Maven 3.x, will it lives up to its promises
 
BordeauxJUG-Maven 3.x, will it lives up to its promises
BordeauxJUG-Maven 3.x, will it lives up to its promisesBordeauxJUG-Maven 3.x, will it lives up to its promises
BordeauxJUG-Maven 3.x, will it lives up to its promises
 
ToulouseJUG-Maven 3.x, will it lives up to its promises
ToulouseJUG-Maven 3.x, will it lives up to its promisesToulouseJUG-Maven 3.x, will it lives up to its promises
ToulouseJUG-Maven 3.x, will it lives up to its promises
 
Apache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentationApache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentation
 
LyonJUG - Maven 3.x, will it live up to its promises?
LyonJUG - Maven 3.x, will it live up to its promises?LyonJUG - Maven 3.x, will it live up to its promises?
LyonJUG - Maven 3.x, will it live up to its promises?
 
Lorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - MavenLorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - Maven
 
Riviera JUG (20th April, 2010) - Maven
Riviera JUG (20th April, 2010) - MavenRiviera JUG (20th April, 2010) - Maven
Riviera JUG (20th April, 2010) - Maven
 
Lausanne Jug (08th April, 2010) - Maven
Lausanne Jug (08th April, 2010) - MavenLausanne Jug (08th April, 2010) - Maven
Lausanne Jug (08th April, 2010) - Maven
 

20091020 - Normandy Jug - Builders Battle

  • 1. NormandyJUG 20 octobre 2009 Builders Battle Maven / Ivy / Ant / Gradle / EasyAnt ...
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39. Architecture CORE UI DOCS OPEN-API WRAPPER api project-reports code-quality groovy java maven osgi war jetty scala eclipse plugins build tools Ant Ivy Maven Ant Tasks checkstyle codeNarc webdav other dependencies librairies tierces Gradle Groovy
  • 40.
  • 41. Les tâches ont une API Copy myCopy = task (myCopy, type:Copy ) myCopy .from (file('resources')) myCopy .into (file('target')) myCopy .include ('**/*.txt', '**/*.xml') task mycopy ( type:Copy ) mycopy{ description ='Copies the resources dir' from (file('resources')) into (file('target')) include ('**/*.txt', '**/*.xml') } task mycopy ( type:Copy ){ description ='Copies the resources dir' from (file('resources')) into (file('target')) include ('**/*.txt', '**/*.xml') } Tâche améliorée CustomTask Copy mycopy
  • 42. Une API très riche task source( type:Jar ){ baseName='source' from sourceSets.main.java } task distrib( type:Zip ){ dependsOn(jar) baseName='dist' from sourceSets.main.java from jar.archivePath } CustomTask Abstract ArchiveTask Zip Jar War Tar SourceTask task javadoc( type: Javadoc ) { source sourceSets.main.allJava } Javadoc
  • 43. Plusieurs tâches par défaut <!-- build.xml --> <project default=&quot;all&quot; > <target name=&quot;clean&quot;> <echo message=&quot;Cleaning&quot;/> </target> <target name=&quot;jar&quot;> <echo message=&quot;Packaging&quot;/> </target> <target name=&quot;all&quot;> <antcall target=&quot;clean&quot;/> <antcall target=&quot;jar&quot;/> </target> </project> <!-- build.gradle --> defaultTasks 'clean', 'jar' task clean << { println &quot;Cleaning&quot; } task jar << { println &quot;Packaging&quot; } > ant Cleaning Packaging > gradle Cleaning Packaging
  • 44. Exécution unique et ordonnée compile compileTest test dist > ant test dist compile compileTest test compile compileTest test dist > gradle test dist :compile :compileTest :test :dist
  • 45. Pour un projet Java/JEE CORE UI DOCS OPEN-API WRAPPER api project-reports code-quality groovy java maven osgi war jetty scala eclipse plugins build tools Ant Ivy Maven Ant Tasks checkstyle codeNarc webdav other dependencies librairies tierces Gradle Groovy
  • 46. Build d'une librairie <!-- build.gradle --> usePlugin 'java' archivesBaseName = 'core' version = '3.5' manifest.mainAttributes ( 'Implementation-Version': version ) repositories { mavenCentral() } dependencies { compile group: 'commons-collections', name: 'commons-collections', version: '3.2' testCompile group: 'junit', name: 'junit', version: '4.+' } > gradle compileJava > gradle jar core-3.5.jar Gradle jar Configuration accessible sous forme de propriétés
  • 47. Build d'une webapp <!-- build.gradle --> usePlugin 'war' usePlugin 'jetty' archivesBaseName = 'web' version = '1.0' repositories { mavenCentral() } dependencies { compile &quot;commons-io : commons-io : 1.4&quot; compile (&quot;log4j : log4j : 1.2.15&quot;){ exclude(group:'javax.jms') exclude(group:'com.sun.jdmk') exclude(module:'jmxri') } } > gradle war > gradle jettyRun WEB-INF optionel JEE6 compatible web-2.4.war Gradle war
  • 48.
  • 49. Intégration native avec Ant CORE UI DOCS OPEN-API WRAPPER api project-reports code-quality groovy java maven osgi war jetty scala eclipse plugins build tools Ant Ivy Maven Ant Tasks checkstyle codeNarc webdav other dependencies librairies tierces Gradle Groovy
  • 50. Utilisation possible des tâches Ant <!-- build.gradle --> task generateStub << { ant { def wsdl2java_classpath = path { fileset (dir: 'lib') { include(name: '*.jar') } } taskdef ( name: 'axisWsdl2java', classname: 'org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask', classpath: wsdl2java_classpath ) axisWsdl2java( output:&quot;generated&quot;, verbose:&quot;true&quot; , url:&quot;Exemple.wsdl&quot;) } } Utilisation de l'objet Groovy AntBuilder
  • 51. LES INTÉRÊTS POUR UNE ENTREPRISE Gradle
  • 52.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 65.
  • 66.
  • 67.
  • 68.
  • 70.
  • 71.
  • 72.
  • 73.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80. Gestion des dépendances avec Ivy CORE UI DOCS OPEN-API WRAPPER api project-reports code-quality groovy java maven osgi war jetty scala eclipse plugins build tools Ant Ivy Maven Ant Tasks checkstyle codeNarc webdav other dependencies librairies tierces Gradle Groovy
  • 81.
  • 82. Définition des repositories repositories { mavenCentral() mavenRepo urls:&quot;http://serveur/archiva/repo-group&quot; } repositories { flatDir name: 'localRepository', dirs: 'lib' } repositories { add( new org.apache.ivy.plugins.resolver.FileSystemResolver()){ name = 'repo' addArtifactPattern &quot; $projectDir/lib/[module]_[revision].[ext] &quot; descriptor = 'optional' checkmodified = true } }
  • 83.
  • 84. Gradle et Ant: dans les deux sens (1/2) <!-- build.xml --> <property name=&quot;src.dir&quot; value =&quot;src&quot; > <target name=&quot;compile&quot; > <echo message=&quot;Compile,from Ant&quot;/> </target> <!-- build.gradle --> ant.importBuild 'build.xml' //Complément de la tâche compile compile << { println &quot;Added compiling from Gradle&quot; println &quot;SourceDir: ${ant.properties['src.dir']}&quot; } > gradle compile :compile [ant:echo] Compile, from Ant Added compiling from Gradle SourceDir: src
  • 85. Gradle et Ant: dans les deux sens (2/2) <!-- build.xml --> <target name=&quot; deploy &quot; depends=&quot;assemble&quot; > <echo message=&quot;Deploy, from Ant&quot;/> </target> <!-- build.gradle --> task assemble ( dependsOn: 'compile' ) << { println 'Assemble, from Gradle' } > gradle deploy :compile [ant:echo] Compile, from Ant Added compiling from Gradle :assemble Assemble, from Gradle :deploy [ant:echo] Deploy, from Ant
  • 86. Gestion multi projet très avancée CORE UI DOCS OPEN-API WRAPPER api project-reports code-quality groovy java maven osgi war jetty scala eclipse plugins build tools Ant Ivy Maven Ant Tasks checkstyle codeNarc webdav other dependencies librairies tierces Gradle Groovy
  • 87.
  • 88. Gestion multi projet (2/3) <!-- master build.gradle --> subprojects { usePlugin('java') group='org.jug.normandyjug' version='1.0' repositories{ mavenCentral() } dependencies { testCompile 'junit:junit:4.7' } } project(':biz:biz-auth') { dependencies{ compile project(':common') } usePlugin 'war' } <!-- pz/build.gradle --> usePlugin 'war' dependencies{ compile project(':common') } cross project configuration
  • 89. Gestion multi projet (3/3) /web> gradle compileJava :common:compileJava :common:processResources :common:classes :common:jar :common:uploadDefaultInternal :pz:compileJava :biz:biz-auth:compileJava /web/biz/biz-auth> gradle compileJava :common:compileJava :common:processResources :common:classes :common:jar :common:uploadDefaultInternal :biz:biz-auth:compileJava /web/biz/biz-auth> gradle compileJava -a :biz:biz-auth:compileJava Compilation des projets dépendants Utilisation des jars dans le cache
  • 90.
  • 91. Publie dans une infra Maven et Ivy CORE UI DOCS OPEN-API WRAPPER api project-reports code-quality groovy java maven osgi war jetty scala eclipse plugins build tools Ant Ivy Maven Ant Tasks checkstyle codeNarc webdav other dependencies librairies tierces Gradle Groovy
  • 92. Publication dans des repo Ivy usePlugin 'java' version='1.0' uploadArchives{ repositories{ flatDir( dirs:'destRepo') } } IVY API Gradle Repository Ivy Artifacts + meta Ivy > gradle uploadArchives upload Archives
  • 93. Publication dans des repo Maven usePlugin 'java' usePlugin 'maven' group= 'org.jug.normandyjug' archivesBaseName= 'artefact-ex' version='1.0-SNAPSHOT' uploadArchives { repositories .mavenDeployer { snapshotRepository (url: &quot;http://serveur/archiva/repository/snapshots&quot;)  } > gradle install > gradle uploadArchives Repository Maven loca l Repository Maven distant Maven Ant Tasks Gradle Artifacts + meta Maven Artifacts + meta Maven install upload Archives
  • 94.
  • 95. Gestion simplifié des configurations usePlugin 'java' configurations{ sources master { extendsFrom archives, sources } } artifacts{ sources sourceJar master distrib } uploadArchives { repositories{ flatDir(dirs: file('repos'), name:'destRepo') } } uploadSources { repositories{ add project.uploadArchives.repositories.destRepo } } uploadMaster .repositories=uploadSources.repositories Ajout automatique de build[ConfigurationName] et upload[ConfigurationName]
  • 96.
  • 97. Portée des dépendances (1/2) <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2;14</version> </dependency> <dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> <version>3.0</version> <scope> provided </scope> </dependency> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.2</version> </dependency> <!-- Contenu de l'archive --> WEB-INF/lib - log4j-1.2.14.jar - commons-codec-1.2jar commons-httpclient Common-codec
  • 98.
  • 100.