Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9175925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:59:49+00:00 2026-06-17T16:59:49+00:00

While I combine maven and vim , I can’t find a way to download

  • 0

While I combine maven and vim , I can’t find a way to download all sources that my project depends to a specified directory and unpack them together.

So that i can generate tags easy.

Does someone know how to ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:59:50+00:00Added an answer on June 17, 2026 at 4:59 pm

    You could use the maven-eclipse-plugin plugin to download the sources, and give you a list of the source jars that are available (some of your dependencies might not have sources available).

    The dependency plugin can also download sources, but it’s harder to get the list of jars you need.

    You could try something like this:

    dir=target/sources
    mkdir -p $dir
    mvn eclipse:eclipse -DdownloadSources
    sed -rn '/sourcepath/{s/.*sourcepath="M2_REPO.([^"]*).*/\1/;p}' .classpath | \
      (cd $dir && xargs -i jar xf ~/.m2/repository/{})
    

    This runs mvn eclipse:eclipse -DdownloadSources, which will download the sources, and write a .classpath file to the local directory. This file contains the paths to your source jars. It looks a bit like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
      <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
      <classpathentry kind="output" path="target/classes"/>
      <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
      <classpathentry kind="var" path="M2_REPO/net/sourceforge/findbugs/jsr305/1.3.7/jsr305-1.3.7.jar"/>
      <classpathentry kind="var" path="M2_REPO/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0.jar" sourcepath="M2_REPO/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0-sources.jar"/>
    </classpath>
    

    In my example, you can see that there are sources for the JCIP annotations jar, but not the FindBugs JSR305 jar.

    The sed command extracts the paths of the source jars (relative to your maven local repository). The xargs command then unpacks each source jar into $dir.

    The eclipse plugin creates the files .classpath and .project and a directory .settings – you can delete these if you never use Eclipse.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How can you combine two arrays? I have variable $data1 that contains
One that's been bugging me for a while. How would I combine these three
How could I combine all of the comments that appear in $row[comment] below into
HI there! I've run into some problem while learning to combine .sh files and
im not sure how can i combine these two arrays together: $query = mysql_query(SELECT
How do I combine numerous PDF blob files into a single PDF so that
I have been working with a Visual Studio Addin project for a while. The
While thinking about how to best combine search results from different resources on a
I am looking for efficient way to combine multiple hashsets (based on object key)
Took me a while to find this bug in my code. Trying to create

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.