How to install Maven artifact with sources from command line?

前端 未结 4 1784
旧巷少年郎
旧巷少年郎 2020-12-22 17:52

How to install Maven artifact with sources?

so later I don\'t need to open a project in eclipse to see some code.

EDIT: I do know I can add

相关标签:
4条回答
  • 2020-12-22 17:56

    Please use mvn source:jar install to install the Maven artifacts.

    0 讨论(0)
  • 2020-12-22 18:06

    Simple, get your sources and JavaDocs:

    mvn dependency:resolve -Dclassifier=javadoc
    mvn dependency:resolve -Dclassifier=sources
    
    0 讨论(0)
  • 2020-12-22 18:07

    To download sources for your dependencies:

    mvn eclipse:eclipse -DdownloadSources=true
    

    To attach sources to an installation:

    mvn source:jar install
    

    It's also preferable to use the goal source:jar-no-fork in your pom as described on the maven-source-plugin page.

    0 讨论(0)
  • 2020-12-22 18:15

    It is quite easy with eclipse, right click the project in project explorer view, click maven menu item , then click download sources..

    0 讨论(0)
提交回复
热议问题