Eclipse+maven View source code and Javadoc

Source: Internet
Author: User

method One: through Eclipse

1. Set up maven first

2. Through the MAVEN under the jar package source code

Select Pom.xml--> Right-click-->run as-->maven build...--> in the total package directory

"Base Directory" input the project's working range address---"goals" input dependency:sources--

Tick "Update snapshots" and "Skip Tests"--RUN

Start downloading the source code for all the jars in the entire project until you see BUILD SUCCESS.

Please be patient while the packet is poor. If it succeeds:

See if it is successful, such as.

When the automatic compilation action of Eclipse is triggered, the source code and Javadoc are automatically downloaded.

After the download is complete, right-click-maven-update Project. In fact, the function of update project is to find the reporsitory in the coordinates directory there are no source and Javadoc files, if any, add to eclipse's build path. Note that this operation, and before there is not checked "Download Artifact Sources" and "Download Artifact JavaDoc" are not related, but completely look at the coordinates of the directory there is no corresponding file.

In addition, the automatic compilation of Eclipse, not 100% will trigger the download source code and Javadoc this action. It is possible that the combination of the two is not very good.

Reference: resolve Eclipse left key cannot view the source code of MAVEN third party package

method Two: through Maven Command

MVN dependency:sources

MVN Dependency:resolve-dclassifier=javadoc

How to use the command: first go to the appropriate Pom.xml directory, and then execute the above command:

The first command is to try to download the source code of the files that are dependent on pom.xml.

The second command: is to try to download the corresponding Javadocs

However, it is possible that some files do not have source code or Javadocs

After execution, update project in Eclipse to associate to eclipse.

Eclipse+maven View source code and Javadoc

Related Article

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.