How to install Maven artifact with sources from command line?

前端 未结 4 1788
旧巷少年郎
旧巷少年郎 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 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.

提交回复
热议问题