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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:30:48+00:00 2026-05-17T17:30:48+00:00

I work with Maven and I want to do a build with packaging ear

  • 0

I work with Maven and I want to do a build with packaging ear, i want to add a dependency with scope system and also with specifing the systemPath of the jar like follow:

<dependency> 
  <groupId>group1</groupId> 
  <artifactId>group1</artifactId> 
  <version>1</version> 
  <scope>system</scope> 
  <systemPath>D:\Buildear\Jars\file.jar</systemPath> 
</dependency> 

But I don’t found the jar in my generater ear!!!

Help please.

  • 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-17T17:30:48+00:00Added an answer on May 17, 2026 at 5:30 pm

    I work with Maven and I want to do a build with packaging ear, I want to add a dependency with scope system (…). But I don’t found the jar in my generater ear!!!

    Yes, that’s just what you get when (ab)using a system scoped dependency which is supposed to be always available by definition. I wrote many times about this, for example in this previous answer that I’m quoting below:

    I already wrote many, many,
    really many times about this
    here on SO and in 99% of the cases,
    system scoped dependencies should be
    avoided. And I’ll repeat what the
    Dependency Scopes mini guide says
    one more time:

    • system: This dependency is required in some phase of your
      project’s lifecycle, but is
      system-specific. Use of this scope
      is discouraged: This is considered an
      “advanced” kind of feature and should
      only be used when you truly understand
      all the ramifications of its use,
      which can be extremely hard if not
      actually impossible to quantify.

      This scope by definition renders your
      build non-portable. It may be
      necessary in certain edge cases. The
      system scope includes the
      <systemPath> element which points to
      the physical location of this
      dependency on the local machine. It is
      thus used to refer to some artifact
      expected to be present on the given
      local machine an not in a repository;
      and whose path may vary
      machine-to-machine. The systemPath
      element can refer to environment
      variables in its path: ${JAVA_HOME}
      for instance.

    So, instead of using the system
    scope, either:

    • Add your libraries to your local repository via install:install-file.
      This is a quick and dirty way to get
      things working, it might be an option
      if you’re alone but it makes your
      build non portable.
    • Install and run an “enterprise repository” like Nexus, Archiva, or
      Artifactory and add your libraries via
      deploy:deploy-file. This is the
      ideal scenario.
    • Setup a file based repository as described in this previous answer
      and put your libraries in there. This
      is the best compromise if you
      don’t have a corporate repository but
      need to work as a team and don’t want
      to sacrifice portability.

    Please, stop using the system scope.

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

Sidebar

Related Questions

I would like to build two different versions of a WAR in Maven (I
In Maven, I have a codebase that I want to build that needs to
For each job in our jenkins server I also want to build the javadoc.
I want to ignore some build errors at a specific directory by using maven's
I have started to work on maven project recently. The piece of code I
We're using Maven at work at quite regularly we get the error message The
The Maven Buildnumber plugin doesn't appear to work with GIT yet. Is there a
At work I'm dipping my toes in managing project dependencies with maven. We use
For a project at work, we're considering using the Maven plugin for Eclipse to
work on SQL Server 2000. want to Automated Email Notifications using SQL Server Job

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.