Maven - robbiehume/CS-Notes GitHub Wiki

  • Maven directory structure;   Introduction to the Maven Standard Directory Layout
  • Maven quick overview
  • Building Java Projects with Maven
  • Maven is a build tool that helps with building and documenting an Java project
    • A build tool generates source code, documentation from the code, compiles the code, and packages the compiled code into JAR files
      • JAR (Java ARchive) file is the Java zip file format
    • A build tool also installs packaged code in repositories (local, server, or central)
  • Maven is based on the POM (project object model)
    • POM is an XML file that has all the info regarding project and config details
    • It also includes the code and plugins used by Maven in a project
    • pom.xml: specifies and loads important project data, such as configuration, build profiles, and dependencies
  • Problems Maven solves:
    • Getting the right JAR files for each project, as there may be different versions of separate packages
    • Prevents us from having to manually download dependencies from its official website
    • Also helps create the right project structure which is essential for execution
    • Helps with building and deploying the project to make it work
  • Can go to www.mvnrepository.com to see list of dependencies and how to add them to your pom.xml