Successfully reported this slideshow.
Your SlideShare is downloading. ×

Introduction to Maven, Sep. 2016, ESRF

Ad

Apache MavenApache Maven
● What is Apache Maven
● Why to use Maven
● Maven in Tango
● Live demo

Ad

What is MavenWhat is Maven
● Dependency management
● Build automation
● Project management
● Project generator
Google: mav...

Ad

Why to use Maven?Why to use Maven?
● IDE integration
● Very well defined project lifecycle
● Plugins (!!!)
● Infrastructur...

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Upcoming SlideShare
SlideShare 101
SlideShare 101
Loading in …3
×

Check these out next

1 of 15 Ad
1 of 15 Ad
Advertisement

More Related Content

Advertisement

Introduction to Maven, Sep. 2016, ESRF

  1. 1. Apache MavenApache Maven ● What is Apache Maven ● Why to use Maven ● Maven in Tango ● Live demo
  2. 2. What is MavenWhat is Maven ● Dependency management ● Build automation ● Project management ● Project generator Google: maven wiki
  3. 3. Why to use Maven?Why to use Maven? ● IDE integration ● Very well defined project lifecycle ● Plugins (!!!) ● Infrastructure (Maven Central, Bintray …) (!!!!) ● Already used almost everywhere (JavaWorld) ● Can handle almost any situation (c++)
  4. 4. Maven in TangoMaven in Tango ● Soleil uses maven ● HZG uses maven ● SKA (???) V10 Tango goal: ● Mavenize every Java project
  5. 5. Dependency managementDependency management Artifactory (bintray.com) <dependency> <groupId>org.tango</groupId> <artifactId>JTangoServer </artifactId> <version>9.2.2</version> </dependency> Java Maven artifact (jar, war, zip, tar.gz, etc) Maven artifact bundle: ● Compiled classes ● Source code ● Javadoc ● Pom.xml
  6. 6. Build automation&PluginsBuild automation&Plugins Project lifecycle: ● Clean ● Compile ● Test ● Package ● Integration Test ● Install ● Deploy Test Package Debian package Plugin
  7. 7. Project managementProject management Parent POM projA projB projA projB BOM POM projA Multi Module POM BOM POM projB 1 2 3
  8. 8. Project generationProject generation (maven archetype)(maven archetype) Project Template (archetype) Project Java Maven artifact (jar, war, zip, tar.gz, etc)
  9. 9. D E M OD E M O
  10. 10. X-EnvironmentX-Environment
  11. 11. Packaging&DeploymentPackaging&Deployment * Every component is an independent single Executable jar file! * Dedicated profile for each configuration.
  12. 12. D E M OD E M O
  13. 13. SummarySummary ● Understand dependency management mechanism ● Learn project lifecycle ● Never invent a wheel ● Mavenize Tango Java projects
  14. 14. Thank you!Thank you!

Editor's Notes

  • Dependency management – automatically manages classpath (for test, build, runtime); infrastructure
    Build automation – command line utils; fixed lifecycle; plugins
    Project management – multimodule ptojects; hierarchy; bill of materials (can easily define complex dependencies)
    Project generator – generate project from template; speedup project setup (in addition to POGO)
  • Maven provides natural way to handle Java projects, unlike make (which may be not known for new Java developers)
    Can easily handle complex projects, i.e. takes care of dependencies, versioning etc
  • To attract new Java developers
  • Plugins:
    - assembly → zip, tar.gz (aka distrib/source)
    - debian package (in the picture)
    - release
  • POM is a XML description of the project
    BOM – bill of materials, typically a number of libraries with fixed versions
  • Simple tango server (Uca)
    Tango server with native library (Uca)
    Xenv
    Tango-maven-archetype
  • Now I will present you this maven project:
    Highlight 3 features: 1) add/remove component; 2) beamline specific configuration; 3) integration tests
  • Simple tango server (Uca)
    Tango server with native library (Uca)
    Xenv
    Tango-maven-archetype

×