This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I hope there should be one way to get the source using maven.
ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
I assume you mean the source code for your dependencies. If the dependency source is deployed to the remote repository, you can get it using the Dependency plugin, specifying that you want the "source" classifers, like this:
You never mentioned Eclipse in your original question, so how was I supposed to know? This makes your question one about Eclipse, so I am moving your post.
If you are using m2eclipse, and you have a Maven project, m2eclipse automatically downloads and attaches source JAR files. (Check you project's Build Path, under the Libraries tab expand Maven Dependecnies and then look under each JAR, many of them should have Source Attachment entries - see the attached image.) Of course, the source JARs must be available in the repository for this to work automatically. If there is no source JAR, you can always select Source Attachment, click the Edit button, and then browse to the source location (which you will have to provide yourself).