Maven is most used as build and dependency management tool. The pom.xml is its configuration file, which also contains the dependencies.
Apache Maven is a software project management and comprehension tool.
Based on the concept of a project object model (POM), Maven can manage
a project's build, reporting and documentation from a central piece of
information.
https://maven.apache.org/
You do not need Maven, but it just makes building the application and (test-)reporting easier. You could do everything with plain Java technically.
Git is just a version control system, pushing code to a version control system does not integrate it. It just manages code merges, but not if it works integrated.
Continuous integration jobs monitor a version control system and when a code change occurs it retrieves the changes and builds the system. Afterwards you could run unit-tests or deploy it to a test-environment to run Selenium-tests against it. Its primary goal is to verify the code builds and no developers are blocked when pulling the latest code from version control. The second feature is to run the automated-tests to check the code did not break some functionality.
The total flow looks something like this:
- Developer pushed code changes to a git-repository
- Jenkins pulls the code changes
- Jenkins fires a job that fires a Maven command which:
- pulls the latest dependencies
- builds the Java application
- runs the unit-tests
- Jenkins deploys to a test-environment (this step might not be optional, depending on how the Selenium-tests start the application)
- Jenkins runs a (Maven) command to start the Selenium-tests against the test-environment