<commit_before>---
topic: Maven
desc: A build tool for Java plus a package manager
---

The short version:

* Maven adds package management to the functions that you get with Ant.
* By package management, I mean that instead of you having to manage the process of obtaining all the .jar files for third party library that
  your project may depend on (and the .jars that *those* files depend on, and so on...), maven manages that for you.

Similarities with Ant:

* Both Ant and Maven provide a way to manage the process of compiling, making jars, producing javadoc, running your code.
* Both use XML as the format
* Built in Java, so its ostensibly portable like Java (Makefiles are very Unix centric)
* Both are maintained by the Apache Software Foundation

Differences between Maven and Ant:

* `pom.xml` instead of `build.xml`
* command to run the tool is `mvn` instead of `ant`
* The directory structures for Ant is somewhat flexible, but Maven has definite expectations.  
    * With Ant, you can decide how to organize your directories, and configure your build.xml file accordingly
    * With Maven, you need to do things Maven's way, or you'll be sorry.    We'll ok, so strictly speaking
      [that's not true, according to the Maven FAQ](https://maven.apache.org/general.html#dir-struct), but it certainly
      is easier to just organize things according to the Maven defaults.<commit_msg>Update maven.md<commit_after>---
topic: Maven
desc: A build tool for Java plus a package manager
category_prefix: "Maven: "
---

The short version:

* Maven adds package management to the functions that you get with Ant.
* By package management, I mean that instead of you having to manage the process of obtaining all the .jar files for third party library that
  your project may depend on (and the .jars that *those* files depend on, and so on...), maven manages that for you.

Similarities with Ant:

* Both Ant and Maven provide a way to manage the process of compiling, making jars, producing javadoc, running your code.
* Both use XML as the format
* Built in Java, so its ostensibly portable like Java (Makefiles are very Unix centric)
* Both are maintained by the Apache Software Foundation

Differences between Maven and Ant:

* `pom.xml` instead of `build.xml`
* command to run the tool is `mvn` instead of `ant`
* The directory structures for Ant is somewhat flexible, but Maven has definite expectations.  
    * With Ant, you can decide how to organize your directories, and configure your build.xml file accordingly
    * With Maven, you need to do things Maven's way, or you'll be sorry.    We'll ok, so strictly speaking
      [that's not true, according to the Maven FAQ](https://maven.apache.org/general.html#dir-struct), but it certainly
      is easier to just organize things according to the Maven defaults.
{'fraction_non_alphanumeric': 0.06181561285764747, 'fraction_numerical': 0.0, 'mean_word_length': 3.9337979094076654, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2921011', 'n_tokens_mistral': 758, 'n_tokens_neox': 721, 'n_words': 428}