Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Convention Over Configuration - Maven 3, Polyglot Maven, Gradle and Ant

4,339 views

Published on

A brief comparison of Convention-over-Configuration features of popular build tools.

Published in: Technology
  • accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes.........ACCESS WEBSITE Over for All Ebooks ..... (Unlimited) ......................................................................................................................... Download FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes.........ACCESS WEBSITE Over for All Ebooks ..... (Unlimited) ......................................................................................................................... Download FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes ,Download or read Ebooks here ... ......................................................................................................................... Download FULL PDF EBOOK here { http://bit.ly/2m6jJ5M }
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THI5 BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THI5 BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Convention Over Configuration - Maven 3, Polyglot Maven, Gradle and Ant

  1. 1. Tomek's Blog http://kaczanowscy.pl/tomek A brief comparison of Convention-over-Configuration features of popular build tools: Ant Maven 3 Polyglot Maven Gradle Based on very simple Java 1.5 project with two dependencies: commons-lang 2.5 jUnit 4.8.2
  2. 2. <?xml version=&quot;1.0&quot;?> <project name=&quot;simple&quot; default=&quot;dist&quot; basedir=&quot;.&quot;> <property name=&quot;src&quot; location=&quot;src/main/java&quot;/> <property name=&quot;srcTest&quot; location=&quot;src/test/java&quot;/> <property name=&quot;build&quot; location=&quot;build&quot;/> <property name=&quot;dist&quot; location=&quot;${build}/lib&quot;/> <property name=&quot;version&quot; value=&quot;1.0-SNAPSHOT&quot; /> <path id=&quot;classpath.compile&quot;> <pathelement location=&quot;libs/commons-lang-2.5.jar&quot;/> </path> <path id=&quot;classpath.test&quot;> <pathelement location=&quot;libs/junit-4.8.2.jar&quot;/> <pathelement location=&quot;libs/commons-lang-2.5.jar&quot;/> <pathelement location=&quot;${srcTest}&quot;/> <pathelement location=&quot;${build}/classes&quot;/> <pathelement location=&quot;${build}/test-classes&quot;/> </path> <target name=&quot;init&quot;> <mkdir dir=&quot;${build}/classes&quot;/> <mkdir dir=&quot;${build}/test-classes&quot;/> </target> <target name=&quot;compile&quot; depends=&quot;init&quot;> <javac srcdir=&quot;${src}&quot; destdir=&quot;${build}/classes&quot;> <classpath refid=&quot;classpath.compile&quot;/> </javac> </target> <target name=&quot;testCompile&quot; depends=&quot;compile&quot;> <javac srcdir=&quot;${srcTest}&quot; destdir=&quot;${build}/test-classes&quot;> <classpath refid=&quot;classpath.test&quot;/> </javac> </target> <target name=&quot;test&quot; depends=&quot;testCompile&quot;> <junit fork=&quot;yes&quot; haltonfailure=&quot;yes&quot;> <batchtest fork=&quot;yes&quot;> <fileset dir=&quot;${srcTest}&quot;> <include name=&quot;**/*Test.java&quot;/> </fileset> </batchtest> <classpath refid=&quot;classpath.test&quot;/> <formatter type=&quot;plain&quot;/> </junit> </target> <target name=&quot;dist&quot; depends=&quot;test&quot;> <mkdir dir=&quot;${dist}&quot;/> <jar jarfile=&quot;${dist}/coc-comparison-${version}.jar&quot; basedir=&quot;${build}/classes&quot;/> </target> <target name=&quot;clean&quot;> <delete dir=&quot;${build}&quot;/> </target> </project> Tomek's Blog http://kaczanowscy.pl/tomek Convention Over Configuration
  3. 3. <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> <project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;> <modelVersion>4.0.0</modelVersion> <groupId>grId</groupId> <artifactId>coc-comparison</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.5</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.1</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> </plugins> </build> </project> <?xml version=&quot;1.0&quot;?> <project name=&quot;simple&quot; default=&quot;dist&quot; basedir=&quot;.&quot;> <property name=&quot;src&quot; location=&quot;src/main/java&quot;/> <property name=&quot;srcTest&quot; location=&quot;src/test/java&quot;/> <property name=&quot;build&quot; location=&quot;build&quot;/> <property name=&quot;dist&quot; location=&quot;${build}/lib&quot;/> <property name=&quot;version&quot; value=&quot;1.0-SNAPSHOT&quot; /> <path id=&quot;classpath.compile&quot;> <pathelement location=&quot;libs/commons-lang-2.5.jar&quot;/> </path> <path id=&quot;classpath.test&quot;> <pathelement location=&quot;libs/junit-4.8.2.jar&quot;/> <pathelement location=&quot;libs/commons-lang-2.5.jar&quot;/> <pathelement location=&quot;${srcTest}&quot;/> <pathelement location=&quot;${build}/classes&quot;/> <pathelement location=&quot;${build}/test-classes&quot;/> </path> <target name=&quot;init&quot;> <mkdir dir=&quot;${build}/classes&quot;/> <mkdir dir=&quot;${build}/test-classes&quot;/> </target> <target name=&quot;compile&quot; depends=&quot;init&quot;> <javac srcdir=&quot;${src}&quot; destdir=&quot;${build}/classes&quot;> <classpath refid=&quot;classpath.compile&quot;/> </javac> </target> <target name=&quot;testCompile&quot; depends=&quot;compile&quot;> <javac srcdir=&quot;${srcTest}&quot; destdir=&quot;${build}/test-classes&quot;> <classpath refid=&quot;classpath.test&quot;/> </javac> </target> <target name=&quot;test&quot; depends=&quot;testCompile&quot;> <junit fork=&quot;yes&quot; haltonfailure=&quot;yes&quot;> <batchtest fork=&quot;yes&quot;> <fileset dir=&quot;${srcTest}&quot;> <include name=&quot;**/*Test.java&quot;/> </fileset> </batchtest> <classpath refid=&quot;classpath.test&quot;/> <formatter type=&quot;plain&quot;/> </junit> </target> <target name=&quot;dist&quot; depends=&quot;test&quot;> <mkdir dir=&quot;${dist}&quot;/> <jar jarfile=&quot;${dist}/coc-comparison-${version}.jar&quot; basedir=&quot;${build}/classes&quot;/> </target> <target name=&quot;clean&quot;> <delete dir=&quot;${build}&quot;/> </target> </project> Tomek's Blog http://kaczanowscy.pl/tomek Convention Over Configuration
  4. 4. <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> <project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;> <modelVersion>4.0.0</modelVersion> <groupId>grId</groupId> <artifactId>coc-comparison</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.5</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.1</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> </plugins> </build> </project> <?xml version=&quot;1.0&quot;?> <project name=&quot;simple&quot; default=&quot;dist&quot; basedir=&quot;.&quot;> <property name=&quot;src&quot; location=&quot;src/main/java&quot;/> <property name=&quot;srcTest&quot; location=&quot;src/test/java&quot;/> <property name=&quot;build&quot; location=&quot;build&quot;/> <property name=&quot;dist&quot; location=&quot;${build}/lib&quot;/> <property name=&quot;version&quot; value=&quot;1.0-SNAPSHOT&quot; /> <path id=&quot;classpath.compile&quot;> <pathelement location=&quot;libs/commons-lang-2.5.jar&quot;/> </path> <path id=&quot;classpath.test&quot;> <pathelement location=&quot;libs/junit-4.8.2.jar&quot;/> <pathelement location=&quot;libs/commons-lang-2.5.jar&quot;/> <pathelement location=&quot;${srcTest}&quot;/> <pathelement location=&quot;${build}/classes&quot;/> <pathelement location=&quot;${build}/test-classes&quot;/> </path> <target name=&quot;init&quot;> <mkdir dir=&quot;${build}/classes&quot;/> <mkdir dir=&quot;${build}/test-classes&quot;/> </target> <target name=&quot;compile&quot; depends=&quot;init&quot;> <javac srcdir=&quot;${src}&quot; destdir=&quot;${build}/classes&quot;> <classpath refid=&quot;classpath.compile&quot;/> </javac> </target> <target name=&quot;testCompile&quot; depends=&quot;compile&quot;> <javac srcdir=&quot;${srcTest}&quot; destdir=&quot;${build}/test-classes&quot;> <classpath refid=&quot;classpath.test&quot;/> </javac> </target> <target name=&quot;test&quot; depends=&quot;testCompile&quot;> <junit fork=&quot;yes&quot; haltonfailure=&quot;yes&quot;> <batchtest fork=&quot;yes&quot;> <fileset dir=&quot;${srcTest}&quot;> <include name=&quot;**/*Test.java&quot;/> </fileset> </batchtest> <classpath refid=&quot;classpath.test&quot;/> <formatter type=&quot;plain&quot;/> </junit> </target> <target name=&quot;dist&quot; depends=&quot;test&quot;> <mkdir dir=&quot;${dist}&quot;/> <jar jarfile=&quot;${dist}/coc-comparison-${version}.jar&quot; basedir=&quot;${build}/classes&quot;/> </target> <target name=&quot;clean&quot;> <delete dir=&quot;${build}&quot;/> </target> </project> Tomek's Blog http://kaczanowscy.pl/tomek project { modelVersion '4.0.0' artifactId 'coc-comparison' groupId 'grId' version '1.0-SNAPSHOT' dependencies { dependency('commons-lang:commons-lang:2.5') dependency('junit:junit:4.8.2') } build { plugins { plugin { groupId 'org.apache.maven.plugins' artifactId 'maven-compiler-plugin' configuration { source '1.5' target '1.5' } } } } } Convention Over Configuration Polyglot
  5. 5. apply plugin: 'java' version=&quot;1.0-SNAPSHOT&quot; group=&quot;grId&quot; archivesBaseName=&quot;coc-comparison&quot; repositories { mavenCentral() } dependencies { compile 'commons-lang:commons-lang:2.5' testCompile 'junit:junit:4.8.1' } <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> <project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;> <modelVersion>4.0.0</modelVersion> <groupId>grId</groupId> <artifactId>coc-comparison</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.5</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.1</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> </plugins> </build> </project> <?xml version=&quot;1.0&quot;?> <project name=&quot;simple&quot; default=&quot;dist&quot; basedir=&quot;.&quot;> <property name=&quot;src&quot; location=&quot;src/main/java&quot;/> <property name=&quot;srcTest&quot; location=&quot;src/test/java&quot;/> <property name=&quot;build&quot; location=&quot;build&quot;/> <property name=&quot;dist&quot; location=&quot;${build}/lib&quot;/> <property name=&quot;version&quot; value=&quot;1.0-SNAPSHOT&quot; /> <path id=&quot;classpath.compile&quot;> <pathelement location=&quot;libs/commons-lang-2.5.jar&quot;/> </path> <path id=&quot;classpath.test&quot;> <pathelement location=&quot;libs/junit-4.8.2.jar&quot;/> <pathelement location=&quot;libs/commons-lang-2.5.jar&quot;/> <pathelement location=&quot;${srcTest}&quot;/> <pathelement location=&quot;${build}/classes&quot;/> <pathelement location=&quot;${build}/test-classes&quot;/> </path> <target name=&quot;init&quot;> <mkdir dir=&quot;${build}/classes&quot;/> <mkdir dir=&quot;${build}/test-classes&quot;/> </target> <target name=&quot;compile&quot; depends=&quot;init&quot;> <javac srcdir=&quot;${src}&quot; destdir=&quot;${build}/classes&quot;> <classpath refid=&quot;classpath.compile&quot;/> </javac> </target> <target name=&quot;testCompile&quot; depends=&quot;compile&quot;> <javac srcdir=&quot;${srcTest}&quot; destdir=&quot;${build}/test-classes&quot;> <classpath refid=&quot;classpath.test&quot;/> </javac> </target> <target name=&quot;test&quot; depends=&quot;testCompile&quot;> <junit fork=&quot;yes&quot; haltonfailure=&quot;yes&quot;> <batchtest fork=&quot;yes&quot;> <fileset dir=&quot;${srcTest}&quot;> <include name=&quot;**/*Test.java&quot;/> </fileset> </batchtest> <classpath refid=&quot;classpath.test&quot;/> <formatter type=&quot;plain&quot;/> </junit> </target> <target name=&quot;dist&quot; depends=&quot;test&quot;> <mkdir dir=&quot;${dist}&quot;/> <jar jarfile=&quot;${dist}/coc-comparison-${version}.jar&quot; basedir=&quot;${build}/classes&quot;/> </target> <target name=&quot;clean&quot;> <delete dir=&quot;${build}&quot;/> </target> </project> Tomek's Blog http://kaczanowscy.pl/tomek project { modelVersion '4.0.0' artifactId 'coc-comparison' groupId 'grId' version '1.0-SNAPSHOT' dependencies { dependency('commons-lang:commons-lang:2.5') dependency('junit:junit:4.8.2') } build { plugins { plugin { groupId 'org.apache.maven.plugins' artifactId 'maven-compiler-plugin' configuration { source '1.5' target '1.5' } } } } } Convention Over Configuration Polyglot
  6. 6. Thank you Tomek Kaczanowski http://kaczanowscy.pl/tomek

×