Search code examples
javamavenrolesuser-rolesrestrictions

Restrict modifications to certain files when building the project with Maven


What is intended is to give everyone access to the source code but to restrict what they modify.

So what first came to mind is if there's any way to, when building the plugin/project, some sort of restriction is applied to the files that have been modified and if some unnauthorized modifications have been made the build fails.

An example would be that only some users may modify the java files, but all users can modify XML configurations and build the jar.

Or if this isn't possible what alternative do I have to restrict source code modifications?


Solution

  • Don't do this in maven, do this in your version control system.

    Either use one where you can give different levels of access to different users or just use the fact that it's a version control system and if anyone makes changes they shouldn't roll the changes back out and tell them not to do it again.