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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:38:02+00:00 2026-06-12T03:38:02+00:00

This is some output of my ‘mvn package’ command: [INFO] — maven-jar-plugin:2.3.1:jar (default-jar) @

  • 0

This is some output of my ‘mvn package’ command:

[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ my-project ---
[INFO] Building jar: /Users/sfrazer/projects/my-project/target/my-project-0.0.1.jar
[INFO] 
[INFO] --- maven-assembly-plugin:2.2-beta-5:single (jar-with-dependencies) @ my-project ---
[INFO] Building jar: /Users/sfrazer/projects/my-project/target/my-project-0.0.1-jar-with-dependencies.jar

The second jar is the correct one that I specified to build but I’m at a loss as to why the first one is being created. So I have two questions:

1) Why is the first JAR being created?

2) How do I make the second JAR be named the way the first one is?

the pom.xml is very long, but here’s the relavent part for building the second JAR:

<plugin>
  <artifactId>maven-assembly-plugin</artifactId>
  <configuration>
    <archive>
      <manifest>
        <mainClass>my.package.App</mainClass>
      </manifest>
    </archive>
    <descriptorRefs>
      <descriptorRef>jar-with-dependencies</descriptorRef>
    </descriptorRefs>
  </configuration>
  <executions>
    <execution>
      <id>jar-with-dependencies</id>
      <phase>package</phase>
      <goals>
        <goal>single</goal>
      </goals>
    </execution>
  </executions>
</plugin>
  • 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-12T03:38:03+00:00Added an answer on June 12, 2026 at 3:38 am

    Because the jar-with-dependencies execution is defined as an extra execution, not a replacement of the regular jar goal, which is part of a regular package or install run.

    Some people tried to disable it in this question, but in general, when making a jar with all dependencies included with maven, the “normal jar” is just packaged alongside with it/left untouched.

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

Sidebar

Related Questions

Suppose there is a System A which gives some output. This output is used
This code will output some blinks on divs when we do the mouse over.
Often when writing PHP I'll have it output some HTML like this - echo
In my jsf webapplication i'm using a messages.properties to output some text. This text
There is this output of objdump on some object file: $ objdump -h main.o
This is for debugging purpose. I've got a for loop that generates some output
I'm trying to format some strings for output on the command-line, report style, and
In my MVC3 Project I use some output caching with the OutputCache attribute set
I have some output, which looks like this: blah blah garbage text more garbage
I want to have some output like this where the width of column1 is

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.