Wednesday, July 25, 2012

Attaching Source code with Maven

Initially I use to download the source jars and then use to attach them to project. Then started adding source jar as dependencies to pom for dev profile. Recently I found a maven command which does i it seamlessly for us.

I ran below commands to download and attach the source code of all the projects in Eclipse for me.

mvn dependency:sources

mvn eclipse:eclipse -DdownloadSources=true 

Boom! refresh all project in Eclipse and the source code must be attached to your project.                    
Enjoy looking into source
Manisha

No comments:

Post a Comment