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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:56:55+00:00 2026-05-21T04:56:55+00:00

I want to add a jar file through the systemPath from the local file-system

  • 0

I want to add a jar file through the systemPath from the local file-system relative to my project directory structure, not on a remote repository. I added the dependency declaration but maven doesn’t do anything else with it.

In the declaration below, I want the jar file copied to my target web-inf/lib directory and also jarred as part of the war file. At present, that doesn’t happen. How would I get the jar file copied to my war file?

This is the output from debug maven mode:

DEBUG] cglib:cglib-nodep:jar:2.2:test (setting scope to: compile)^M
DEBUG] Retrieving parent-POM: org.objenesis:objenesis-parent:pom:1.2 for project: null:objenesis:ja
DEBUG]   org.objenesis:objenesis:jar:1.2:test (selected for test)^M
DEBUG]   org.javap.web:testRunWrapper:jar:1.0.0:system (selected for system)^M
DEBUG] Plugin dependencies for:
...


<dependency>
    <groupId>org.javap.web</groupId>
    <artifactId>testRunWrapper</artifactId>
    <version>1.0</version>
    <scope>system</scope>
    <systemPath>${basedir}/lib/testRunWrapper.jar</systemPath>
</dependency>
<plugin>
    <artifactId>maven-war-plugin</artifactId>
    <configuration>                 
        <webResources>
            <resource>
                <directory>WebContent</directory>
            </resource>
        </webResources>
    </configuration>
</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-05-21T04:56:55+00:00Added an answer on May 21, 2026 at 4:56 am

    OK, I did this: Note the directory structure at the bottom.
    With the approach below, the jar file from the relative project path is treated as a first class citizen like the other jars. The listing below corrects my original problem. With the pom.xml listing below, the jar file is copied to my target directory.

    <repositories>
        <repository>
            <id>JBoss</id>
            <name>JBoss Repository</name>
            <layout>default</layout>
            <url>http://repository.jboss.org/maven2</url>
        </repository>
    
        <repository>
           <id>my-local-repo</id>
           <url>file://${basedir}/lib/repo</url>
        </repository>
    </repositories>
    
    <dependency>
        <groupId>testRunWrapper</groupId>
        <artifactId>testRunWrapper</artifactId>
        <version>1.0.0</version>            
    </dependency>
    

    $ find repo
    repo
    repo/testRunWrapper
    repo/testRunWrapper/testRunWrapper
    repo/testRunWrapper/testRunWrapper/1.0.0
    repo/testRunWrapper/testRunWrapper/1.0.0/testRunWrapper-1.0.0.jar
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create registry key through java program to add the jar file
I want to add a external third party jar file in the inbuilt android
I want to add to a jar file some resources. I profiled it and
I want to add mysql tables into my jar file. How can I do
I want add some resource files (non-code text-based files) to the jar file in
I have an xslt that I want to add to my jar file when
I have numbers in javascript from 01(int) to 09(int) and I want add 1(int)
I want to add the classpath through a command line call. The call looks
I want to add some compiled classes (.class files) to directories(packages) in current Jar
I have this webprojec to which I have to add a jar from another

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.