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 233353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:05:38+00:00 2026-05-11T20:05:38+00:00

I need to build a jar file that includes (other, external projects’) Maven artefacts.

  • 0

I need to build a jar file that includes (other, external projects’) Maven artefacts.

The artefacts are to be included just like stuff in src/main/resources, without any processing. Even though they happen to be jar files themselves, they are not compile time dependencies for my code and should not be added to the classpath, at neither the compile, the test, or the runtime stages.

I can get this done by downloading the files and placing them into src/main/resources, but I would rather have them resolved using the Maven repository.

  • 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-05-11T20:05:38+00:00Added an answer on May 11, 2026 at 8:05 pm

    Here’s an example of what you can add to your pom– it’ll copy the artifact with the specified ID from the specified project into the location you specify.

    <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>copy</id>
                <goals>
                  <goal>copy-dependencies</goal>
                </goals>
                <configuration>
                  <artifactItems>
                    <artifactItem>
                      <groupId>id.of.the.project.group.to.include</groupId>
                      <artifactId>id-of-the-project's-artifact-to-include</artifactId>
                      <version>${pom.version}</version>
                    </artifactItem>
                  </artifactItems>
                  <includeArtifactIds>id-of-the-project's-artifact-to-include</includeArtifactIds>
                  <outputDirectory>${project.build.directory}/etc-whatever-you-want-to-store-the-dependencies</outputDirectory>
                </configuration>
              </execution>
        </executions>
    </plugin>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use Maven to create an executable jar file that includes the
Problem: I'd like to specify the main class in a jar file that I
I need to build something that starts serving a H.264 encoded video to a
I have a external jar file named xxx.jar. I use xxx.jar in my GWT
I have an ANT build that I need to setup so on deployment of
I have just found a nice look that I would like to use for
I need to create a jar file using eclipse IDE. But I am facing
I'm trying to build a client jar file to access a webservice. I'm including
My project has many dependencies that I've referenced from other projects. I am now
So my maven project depends on a jar that is NOT in any maven

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.