Skip to content

sit/maven-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

A hands-on introduction to Maven

The goal of this repository is to provide you with a small set of exercises that will help you learn key concepts in Maven and how to use them.

What is Maven?

  • Build tool that also tries to do many other things (like manage web sites)
  • Favors convention (with configuration) over explicit rules
    • "Build me a jar out of stuff in src/main/java" vs
    • "Run javac if these files change, then run jar cf foo.jar"
  • Based on a plugin architecture to allow extensibility
  • Executes a series of build phases ("lifecycle stages")

Exercises

The following exercises are intended to allow you to explore basic features of Maven live on your own computer. You should not need to use an IDE. You should be able to use a terminal and text editor (vim/nano/emacs/Atom/SublimeText/etc) to edit files. You will also probably need to search the web for various bits of information about Maven.

  1. Maven basics
  2. Java essentials

Other build tools

  • gmake and automake
    • Make. So great that we built a tool to generate Makefiles!
  • ant:
    • Do you like writing build scripts in XML?
  • gradle:
    • "Modern Open-Source Enterprise Build Automation"
    • Adopted by Android
    • Highly configurable DSL based on Groovy, processes dependency graph
  • pants or buck or Bazel:
    • Flexible beyond Java, fast incremental builds
    • Open Source versions of things built at Twitter and Facebook

Problems with Maven

  • Not fast:
    • Does not know how to incremental build (may be smarter now, but it will run tests on unchanged sources)
    • Not particularly parallelizable, no locking of m2/repository
  • Not flexible:
    • Rely on poorly documented, hard to understand plugins
  • Not natively multi-module:
    • Try running mvn in a sub-directory

Resources

About

Learn Maven with some hands-on exercises

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages