nabeelmukhtar / github-java-sdk

This project aims to provide a Java wrapper for Github API.
http://develop.github.com/
64 stars 22 forks source link

fix pom.xml so all libraries are taken from maven and not the lib folder #1

Open hielkehoeve opened 14 years ago

hielkehoeve commented 14 years ago

Currently your sources carry library files which is bad practice if you use maven. The best approach is to link them as dependencies in in the pom.xml.

nabeelmukhtar commented 14 years ago

The library files are included for people building the project with eclipse. The dependencies are also present in pom file (core/pom.xml). Are you facing any problem using maven with the library?

hielkehoeve commented 14 years ago

Ah I see. Current setup is working but this is just a suggestion.

If you use maven it is not needed to a) include the libraries with the sources and b) include the .project and .classpath files with the sources. Maven can download the proper libraries to the maven repo folder and generate the .project and .classpath files for the user. This way it is easier to upgrade to new libraries and the size of the checkout is smaller.

briantopping commented 13 years ago

m2eclipse is the way to get eclipse to download libraries from the maven repository.

briantopping commented 13 years ago

It does appear that the POM uses the central repository for all dependencies.

Something to consider: There are several ways to generate IDE projects (.project and .classpath for eclipse) from POMs without checking them in to SCM. When they are generated for the local machine directly from the POM by plugin, there is no chance of local paths getting stored in the configuration. It also sets up the IDE to use the dependencies directly from the local Maven repository. So the lib folder is unnecessary and in fact unwanted, since changes in the POM now need to have additional files added for eclipse users (a pain for IntelliJ users, for instance, and vis-a-vis).

I typically document how to generate the IDE files using either a Maven plugin or an IDE plugin, and put ignore files in SCM to keep people from accidentally checking in the IDE configuration. That keeps the project IDE agnostic and everyone more productive.