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

  • Home
  • SEARCH
  • 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 9154005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:21:46+00:00 2026-06-17T12:21:46+00:00

If the version of a project foo is 1.0-SNAPSHOT , should running the command

  • 0

If the version of a project foo is 1.0-SNAPSHOT, should running the command

 mvn install -Dclassifier=bar

install foo-1.0-SNAPSHOT-bar.jar in my local .m2 directory? I tried doing this but it installs foo-1.0-SNAPSHOT.jar and maven install plugin doesn’t give too much detail about the -Dclassifier option.

Is there a way to install (locally) a jar with a classifier?

  • 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-17T12:21:47+00:00Added an answer on June 17, 2026 at 12:21 pm

    That -Dclassifier parameter is associated with the install:install-file goal, which is not the goal executed by the install phase of the default build lifecycle. Rather, it is used to install secondary artifacts in an ad hoc command line fashion. In other words, it’s for sticking stuff in the repository outside the context of a normal running maven build.

    When you invoke the default build lifecycle with mvn install, he install phase executes the [install:install][1] goal. So, when you executed mvn install -Dclassifier=bar, you executed the default built lifecycle, and that parameter was not used for anything.

    The install:install goal, as it states in the docs, installs the primary artifact as well as an secondary, aka attached, artifacts. The jar produced by your build is the primary artifact. It does NOT have a classifier. All of the attached artifacts require a fourth maven coordinate to uniquely identify them from the primary artifact. This coordinate is the classifier.

    You have no need for a classifier unless you have attached artifacts. Where do attached artifacts come from? They are things that your build produces in addition to the primary artifact. So, it could be something built by the assembly plugin. It could be another jar containing the source files of your project, etc. The classifier is determined by the mechanism that attaches the secondary artifact, e.g. the assembly plugin.

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

Sidebar

Related Questions

Suppose you have the following code: (ns foo) (defmacro defproject [project-name version & args]
Say my SVN repository looks like: project/ trunk/ README foo/ bar.sh and I have
I have a version controlled project located at ~/webapps/django/myproject and media files located at
I have a Zend Framework project using version 1.10.8 with Doctrine 1.2.4.I use Zend_Auth
While my ASP.NET project uses version 3.5 of the framework , the event log
I've got a website project under version control that relies on files from an
Do I need to add the @2x version to the project in Xcode or
On github, I forked an old version of another project. I made some changes
Short version: I have a Django project under development & testing (not yet into
I am using Mercurial version control for my project. Everything like push , pull

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.