Automatically download and correlate source (source) after Maven introduces dependencies

Source: Internet
Author: User

http://justke123.iteye.com/blog/981627

There's a tricky problem with Maven:

is to add dependencies because there is no download and associated source code, resulting in automatic prompt cannot appear the correct method name, and do not install the anti-compiler in the case can not enter the method to see the implementation of the internal.

In fact, the Eclipse Maven plugin provides this functionality, but there may be many developers do not pay attention to this feature, so this share to those who are not very clear about this feature of the students, configuration is very simple, Just tick the windows-preferences-maven-download Artifact Sources this option to do it.

=====

http://japi.iteye.com/blog/1320003

The method that enables Maven2 to download its source code package while downloading the dependent package:

1. Use the MAVEN command: mvn dependency:sources to download the source code for the dependent package.

2. Use parameters:-ddownloadsources=true to download the source code jar. -ddownloadjavadocs=true Download the Javadoc package.

MVN dependency:sources-ddownloadsources=true-ddownloadjavadocs=true

Eclipse

MVN -ddownloadsources=true -ddownloadjavadocs=true-doutputdirectory=target/eclipse-classes eclipse: Eclipse

The key is the RED flag option ~ ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.