How to download sources for an specific JAR dependency of a Maven project

Pablo Matias Gomez :

I want to do this because when I try to download the sources for a dependency with Eclipse it just does nothing and I want to know what's going on.

I read some posts and articles:

But none of these shows how to do this for a single dependency..

If I do it for all the dependecies in my project it may take a while and it is not what I want.

I want to execute a command like this:

mvn dependency:sources

But applied to only one of the project dependencies.

Is this possible?

Pablo Matias Gomez :

I just found out how to do this in the plugin's documentation:

http://maven.apache.org/plugins/maven-dependency-plugin/sources-mojo.html

I solved this using the following command:

mvn dependency:sources -DincludeGroupIds=com.example.api.agents -DincludeArtifactIds=api-agent-spark

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

How to download sources for a jar with Maven?

From Java

How to download maven dependency as *.jar file?

From Java

<Maven>How to add class files as dependency (not jar) in maven project?

From Java

How to add local project (not jar) as a dependency to a Maven project

From Java

How to specify "sources" JAR for local JAR dependency?

From Dev

Cannot download sources from jar in intellij with maven

From Dev

Eclipse - How to add a project as a Maven dependency to another, instead of adding as a jar?

From Dev

How to define the maven dependency, if jar is already included in project

From Dev

Generating jar of a maven project with all sources

From Java

How to use Maven pom to download jar files only to a specific directory?

From Java

how to copy dependency sources to a directory in maven

From Dev

Maven shaded jar used as external project dependency

From Dev

how to add jar dependency in maven?

From Dev

Download a dependency from a specific repository in Maven

From Java

How to have Maven build dependency from local Maven project instead of download?

From Java

How can I force Idea and Maven download all sources for my project?

From Java

How to invoke a axis2 web service project added as jar dependency to another Maven project?

From Java

In Maven: how to attach sources to tools.jar

From Dev

Copy dependency of a maven project to specific folder

From Dev

How to add dependency to maven project? (How to find out GroupID / ArtifactID from external jar file)

From Dev

How do I download an uber jar dependency to a specific local location/folder?

From Java

How do I include a dependency's test jar into a Maven project's deployment?

From Java

How to find the usage of a jar imported by maven dependency?

From Java

How to get path to dependency jar with maven

From Dev

How to download javadocs and sources for jar using Gradle 2.0?

From Java

maven copy a particular dependency jar to a specific directory in the .war file

From Dev

How to use a simple maven project as a dependency in GWT maven project?

From Dev

How can I use a Maven project as a dependency to another Maven project?

From Dev

How to add a maven project as a dependency to another one

Related Related

  1. 1

    How to download sources for a jar with Maven?

  2. 2

    How to download maven dependency as *.jar file?

  3. 3

    <Maven>How to add class files as dependency (not jar) in maven project?

  4. 4

    How to add local project (not jar) as a dependency to a Maven project

  5. 5

    How to specify "sources" JAR for local JAR dependency?

  6. 6

    Cannot download sources from jar in intellij with maven

  7. 7

    Eclipse - How to add a project as a Maven dependency to another, instead of adding as a jar?

  8. 8

    How to define the maven dependency, if jar is already included in project

  9. 9

    Generating jar of a maven project with all sources

  10. 10

    How to use Maven pom to download jar files only to a specific directory?

  11. 11

    how to copy dependency sources to a directory in maven

  12. 12

    Maven shaded jar used as external project dependency

  13. 13

    how to add jar dependency in maven?

  14. 14

    Download a dependency from a specific repository in Maven

  15. 15

    How to have Maven build dependency from local Maven project instead of download?

  16. 16

    How can I force Idea and Maven download all sources for my project?

  17. 17

    How to invoke a axis2 web service project added as jar dependency to another Maven project?

  18. 18

    In Maven: how to attach sources to tools.jar

  19. 19

    Copy dependency of a maven project to specific folder

  20. 20

    How to add dependency to maven project? (How to find out GroupID / ArtifactID from external jar file)

  21. 21

    How do I download an uber jar dependency to a specific local location/folder?

  22. 22

    How do I include a dependency's test jar into a Maven project's deployment?

  23. 23

    How to find the usage of a jar imported by maven dependency?

  24. 24

    How to get path to dependency jar with maven

  25. 25

    How to download javadocs and sources for jar using Gradle 2.0?

  26. 26

    maven copy a particular dependency jar to a specific directory in the .war file

  27. 27

    How to use a simple maven project as a dependency in GWT maven project?

  28. 28

    How can I use a Maven project as a dependency to another Maven project?

  29. 29

    How to add a maven project as a dependency to another one

HotTag

Archive