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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:14:12+00:00 2026-05-20T22:14:12+00:00

Can Maven create two jars specified in one pom.xml: one jar with my app

  • 0

Can Maven create two jars specified in one pom.xml: one jar with my app but without dependencies, and second jar ONLY with dependencies? I’d like to have two separate jars, but I want to run jar with my app and this app has to ‘see’ all dependencies in second jar. Everything I want to have in one eclipse project, only in result of one run of mvn:package I’d like to create separate jars…Is it possible? Now I use maven-jar-plugin to create jar with app, where I specify the classpath by add line in configuration of maven-jar-plugin:

<addClasspath>true</addClasspath>

Before I have used maven-assebly-plugin to create jar-with-dependencies, but now I have to create separate jar-s….

Thanks in advance, seishin

  • 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-20T22:14:13+00:00Added an answer on May 20, 2026 at 10:14 pm

    Here’s how I’d do it:

    • use dependency:unpack to
      unpack all dependencies to a common
      folder,
    • use the assembly plugin to create a
      new JAR
      from the unpacked dependencies
    • provide a custom manifest to your project’s jar that
      links to the dependency jar
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use Maven to create two separate jars for my project. One
In Maven I can create a self-contained shaded jar, and this is exactly what
I have two set of integration tests in one maven project - automatic and
How can I create maven property with the classpath as part of it ?
I can't find a way to automatically deploy dependencies of a maven project on
The past week or two I've been studying Maven, and I like it, but
Is there something for Maven that I can use to create placeholders (e.g. a
I would like to create a Maven Parent POM file with a groupId of
I have Eclipse: eclipse-jee-juno-win32 . I need to create Maven project with it, but
Can Maven copy local file to a remote server using SSH? I want to

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.