Reputation: 51
Which of the following files should be version controlled? And why?
Upvotes: 3
Views: 1031
Reputation: 97399
The simple rule in Maven is: Everything which is in target folder should not be put under version control and the folder itself neither, cause everything in that folder is created from the sources code src/main/ src/test etc. and from the pom.xml file itself.
Files like .project and .classpath should not be versioned, cause they will be generated by an import of a project into Eclipse so usually no need to put them into version control furthermore they are specific to Eclipse. In rare situations in can be usefull to put them under version control.
The build.properties files is specific for Maven 1 it might be a good idea to put it into version control.
Upvotes: 4
Reputation: 7305
None. Although I would consider managing the "build.property" file as Maven Build Profiles. Thus, the file could eventually be version controlled indirectly through the pom.xml file.
Upvotes: 1
Reputation: 16392
None of the above. Not only can each of those files be re-created, but they are most likely environment (dev and runtime) specific and they'll take up a lot of space in your repository.
Upvotes: 8