I have a large Java Web Application project using Maven and I need to start a new project that will share most of the same code (so I don\'t have to repeat work), but not all of
Install the shared code, using your current packaging setting of jar:
mvn install
Then, you can create a dependency in the child pom.xml (the code that is not shared) from whatever repository you are installing to.
This is good practice in general not only to avoid repeating work but also in case you want to change the implementation of the shared resources. You can change the logic in one place, install it to the repository, and other projects that depend on that code will use the new code the next time they are compiled.