One of the jar files that I use in my code is not in the maven repository(and yes I tried to avoid using it). I have installed it locally so when I build the project it gets picked up by maven. I also put instructions in my README so anyone who wants to build my code can see how to add the jar to their local repository.

The question is, should I check this jar into my git source control?

I know normally you don’t check jars into source when using maven and git but in this case it seems like it might be a better idea than saying, find this jar on the internet.

I am the only developer in my group so setting up a company hosted repository for just this single jar is overkill.

1 Answer 1


If it is just a single JAR file, then I don't think version controlling it will be apocalyptic.

If however, you start adding more and more external JAR files to your app, then you should consider using a repo manager like artifactory to deal with this whether you opt to use Gradle/Maven/ANT.

If you have a build script, you can further simplify the task of building the app by automating the process of checking out the JAR from GIT and making it available. This might be a little easier as it puts the onus on you, the author, to manage the dependency opposed to the library user. You can also upgrade the library behind the scenes without the user being aware of it (unless there is no network connection..).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.