Maven download source code and javadoc command

Source: Internet
Author: User
1: Download the source code and javadocs using Maven commands.

When using Maven in IDE, if you want to view the source code and javadoc of the classes in the referenced jar package, you need to download these source codes using Maven commands before introducing them, the MVN command can easily achieve this goal:

mvn dependency:sourcesmvn dependency:resolve -Dclassifier=javadoc

Command usage: first enter the corresponding Pom. xml directory, and then execute the preceding command:

The first command is to download the source code of the file that is dependent on POM. xml.

The second command is to download the corresponding javadocs

However, some files may not have source code or javadocs

Reference

2: Open the maven configuration file setting. XML (.../. m2/settings. XML) by adding the configuration file. Add the following Configuration:
<profiles><profile>    <id>downloadSources</id>    <properties>        <downloadSources>true</downloadSources>        <downloadJavadocs>true</downloadJavadocs>               </properties></profile></profiles><activeProfiles>  <activeProfile>downloadSources</activeProfile></activeProfiles>
3: Configure eclipsewindow> preferences> Maven and checking the "Download artifact sources" and "Download artifact javadoc" Options

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.