Add a dependency in Maven
问题 How do I take a jar file that I have and add it to the dependency system in maven 2? I will be the maintainer of this dependency and my code needs this jar in the class path so that it will compile. 回答1: You'll have to do this in two steps: 1. Give your JAR a groupId, artifactId and version and add it to your repository. If you don't have an internal repository, and you're just trying to add your JAR to your local repository, you can install it as follows, using any arbitrary groupId