project management and automation: using maven and grunt to accelerate development
DESCRIPTION
My presentation slides from the UCAR Software Engineering Assembly Conference April 7, 2014. Original Reveal.js slides here: https://mrhanlon.com/slides/sea2014TRANSCRIPT
![Page 1: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/1.jpg)
Project Management and AutomationUsing Maven and Grunt to accelerate development
Matthew Hanlon • SEA Conference • April 7, 2014
TEXAS ADVANCED COMPUTING CENTERPowering Discoveries that Change the World
![Page 2: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/2.jpg)
Introduction
![Page 3: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/3.jpg)
Web and MobileApplications
![Page 4: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/4.jpg)
Building tools and applications to makescientists more productive.7 Developers (and hiring!)
10+ projects
![Page 5: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/5.jpg)
LiferayJavaScript
Spring
Restlets
JSRPHPJava
Drupal
PortletsSQL
JSONXMLjQuery
MySQL Nodejs
PostgreSQL
NoSQLCakePHP
MongoDB
Python
CodeIgniter
CouchDB
DjangoRESTSOAP
Web services
[ made with: ]https://www.jasondavies.com/wordcloud/
![Page 6: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/6.jpg)
Without process
![Page 7: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/7.jpg)
Boring
![Page 8: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/8.jpg)
What's the big deal?
![Page 9: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/9.jpg)
Too many results in published scientificpapers are not reproducible
The data is unavailableThe environment no longer existsThe code is broken!
![Page 10: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/10.jpg)
Reproducibility in Computer Science
That's only a 20%
success rate!
[ source: ]http://reproducibility.cs.arizona.edu/
![Page 11: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/11.jpg)
Why doesn't the code build?Missing dependenciesMysterious configuration parametersCompile errorsAnd of course, there is no documentation
![Page 12: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/12.jpg)
How can we fix that?Automate the boring stuffMake the rest worth it
![Page 13: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/13.jpg)
Tools for automationand process
Apache MavenGrunt.jsBowerSass/CompassDoxygen
![Page 14: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/14.jpg)
MavenManaging project build, reporting, and documentation.
![Page 15: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/15.jpg)
POM.xmlThe Project Object Model
Projectinformation
Name, version, URL, developers, contributors, licensing,organization
Build settings Build process, dependencies, non-code resource handling,reporting
Environmentsettings
Source control, repositories, distribution, issuemanagement
![Page 16: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/16.jpg)
PluginsBasics: Compiler, Resources, JavaDocs, Eclipse, IntelliJ IDEAAdvanced: Exec, SiteCommunity: Doxygen, Liferay, Jetty
![Page 17: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/17.jpg)
<?xml version="1.0" encoding="UTF-8"?><project> <modelVersion>4.0.0</modelVersion> <groupId>com.github.mrhanlon</groupId> <artifactId>sea2014-demo</artifactId> <version>1.0-SNAPSHOT</version> <packaging>war</packaging> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-orm</artifactId> <version>${spring.version}</version> <type>jar</type> <scope>compile</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${spring.version}</version> <type>jar</type> <scope>test</scope> </dependency> <dependency> <groupId>cglib</groupId> <artifactId>cglib-nodep</artifactId> <version>${cglib.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>javax.servlet</groupId>
![Page 18: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/18.jpg)
$ mvn install[INFO] Scanning for projects...[INFO][INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder [INFO][INFO] ------------------------------------------------------------------------[INFO] Building module1 1.0-SNAPSHOT[INFO] ------------------------------------------------------------------------[INFO][INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ module1 ---[INFO] Deleting /Users/mrhanlon/workspace/github/mrhanlon/sea2014-demo/module1/target[INFO][INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ module1 ---[INFO] Using 'UTF-8' encoding to copy filtered resources.[INFO] skip non existing resourceDirectory /Users/mrhanlon/workspace/github/mrhanlon/sea2014-demo/module1/src/main/resources[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ module1 ---[INFO] Compiling 1 source file to /Users/mrhanlon/workspace/github/mrhanlon/sea2014-demo/module1/target/classes[INFO][INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ module1 ---[INFO] Using 'UTF-8' encoding to copy filtered resources.[INFO] skip non existing resourceDirectory /Users/mrhanlon/workspace/github/mrhanlon/sea2014-demo/module1/src/test/resources[INFO][INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ module1 ---[INFO] Compiling 1 source file to /Users/mrhanlon/workspace/github/mrhanlon/sea2014-demo/module1/target/test[INFO][INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ module1 ---[INFO] Surefire report directory: /Users/mrhanlon/workspace/github/mrhanlon/sea2014-demo/module1/target/surefire
------------------------------------------------------- T E S T S-------------------------------------------------------Running com.github.mrhanlon.AppTestTests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.035 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
![Page 19: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/19.jpg)
GruntThe JavaScript Task Runner
(It's not just for JavaScript!)
![Page 20: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/20.jpg)
Gruntfile.jsDeclarative JSON/JavaScript configuration file
Executes tasks in Node.js runtimeLoads of community plugins:
jslint/jshintfile taskswatchcompasslibrary/framework support
![Page 21: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/21.jpg)
'use strict';
module.exports = function(grunt) {
// Project configuration. grunt.initConfig({ // Metadata. pkg: grunt.file.readJSON('tiny-pubsub.jquery.json'), banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %>\n' + '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' + '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' + ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n', // Task configuration. clean: { src: ['dist'] }, concat: { options: { banner: '<%= banner %>', stripBanners: true }, dist: { src: ['src/<%= pkg.name %>.js'], dest: 'dist/ba-<%= pkg.name %>.js' }, }, uglify: { options: { banner: '<%= banner %>' }, dist: { src: '<%= concat.dist.dest %>', dest: 'dist/ba-<%= pkg.name %>.min.js' }, }, qunit: { files: ['test/**/*.html'] }, jshint: {
![Page 22: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/22.jpg)
$ gruntRunning "jshint:gruntfile" (jshint) task>> 1 file lint free.
Running "jshint:src" (jshint) task>> 1 file lint free.
Running "jshint:test" (jshint) task>> 1 file lint free.
Running "qunit:files" (qunit) taskTesting test/tiny-pubsub.html....OK>> 4 assertions passed (23ms)
Running "clean:files" (clean) taskCleaning "dist"...OK
Running "concat:dist" (concat) taskFile "dist/ba-tiny-pubsub.js" created.
Running "uglify:dist" (uglify) taskFile "dist/ba-tiny-pubsub.min.js" created.Uncompressed size: 389 bytes.Compressed size: 119 bytes gzipped (185 bytes minified).
Done, without errors.
$_
![Page 23: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/23.jpg)
BowerFront-end package management
package agnostic
runs over git
![Page 24: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/24.jpg)
Declarative JSON configuration{ "name": "vislab-reservation-portlet", "version": "1.0.0", "dependencies": { "modernizr": "~2.6.2", "jqueryui-timepicker-addon": "1.4.3", "mustache": "~0.8.1", "datejs": "*", "fullcalendar": "~1.6.4" }}
![Page 25: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/25.jpg)
Sass/Compass"Expressive" CSS
![Page 26: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/26.jpg)
@mixin box-sizing($bs) { $bs: unquote($bs); @include experimental(box-sizing, $bs, -moz, -webkit, not -o, not -ms, not -khtml, official );}
* { @include box-sizing(border-box);}
.alert { border: 1px solid black;}
.alert-error { @extend .alert; color: red; border-color: red;}
![Page 27: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/27.jpg)
DoxygenGenerating documentation for annotated sources
Tons of language supportExtensions for other languages
(like JavaScript!)
![Page 28: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/28.jpg)
Demo
![Page 29: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/29.jpg)
So what's next?
![Page 30: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/30.jpg)
Get up and running in minutes$> git clone <repo url> my-dev-env$> cd my-dev-env$> git submodule init$> git submodule update$> mvn install$> mvn liferay:deploy
![Page 31: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/31.jpg)
![Page 32: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/32.jpg)
The Second Law of ThermodynamicsThe entropy of an isolated system never decreases,
because isolated systems always evolve towardthermodynamic equilibrium a state with maximum
entropy.
![Page 33: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/33.jpg)
![Page 34: Project Management and Automation: Using Maven and Grunt to accelerate development](https://reader035.vdocuments.mx/reader035/viewer/2022080209/54c783174a79599a2f8b460d/html5/thumbnails/34.jpg)
Fin.@mattorantimatt
TEXAS ADVANCED COMPUTING CENTERPowering Discoveries that Change the World