I implemented some CSV reading functionality to my Java program, for which I required adding a Maven dependency.Should changes to pom.xml be part of the commit for the CSV reading functionality, or should it be a separate commit?I'm leaning towards the dependency being part of a logical unit of code, and thus should be in the same commit. I am however new to using Maven, so I'm not aware if there are any unwritten rules regarding changes to pom.xml.
Should adding Maven dependencies be a separate git commit?
git;maven
You should add the Maven dependency when you add the code, otherwise the project won't compile because you would refer to a CSV reading class in your .java file that doesn't exist on the classpath.Maven is there to handle your dependencies, and make sure that the classes you use are on the classpath so they can be loaded when your project requires them.I would consider the code, and any additional resources required by the code, as a single unit of work. That includes modifications to the pom.xml as well any extra files (sound files, images, SSL certificates, etc).