No, you don't need maven.
Maven is a build automation tool as ant and gradle are, generally, but not limited to, jvm based projects.
Nexus is an artifact repository, but some others exists.
Artifact repositories software have different set of features (license, different storage options, different repositories type support like gems or npm ..., search support, web interface ...).
I know that once a developer pushes a code to git, Jenkins should take it and run the test case on it.
If it is success then push it to production? Am I right? I'm not sure about the flow.
Generally, in order to achieve continuous deployment, which is what you are asking for precisely here, you would:
- setup a hook when you commit
- have a continuous integration tool that receive the hook
- the CI does whatever needs to be done for the project to be tested / build / runnable
- the CI deploys the previously built software
Jenkins, for example, supports pipeline as code, it would allow you to put a
Jenkinsfile in your repository, that would tell Jenkins how to do step 3 and 4 (travis and circleCI and others CI also supports this).
You can tell your CI in steps 3 to upload some artifacts to an artifact repository and on step 4, to retrieve them in order to deploy the software, but you don't need to.
My advice would be to design your CD system the simplest way you can, don't introduce not necessary parts like an artifact repository if you don't need it, add it when you face a problem that needs it.
As a first step, your CI, can during the deployment steps, simply copy your artifacts to the target server.