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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:21:39+00:00 2026-05-20T15:21:39+00:00

So, I have a war project with several dependent jars that are not available

  • 0

So, I have a war project with several dependent jars that are not available in any repository. Up until recently, I’d been keeping them in src/main/webapp/WEB-INF/lib, and adding them to the pom with system scope.

I get that that’s problematic, so I’m looking to clean up my build. I’ve semi-manually installed the jars into my .m2/repository via the install:install-file plugin. That’s great for me, but what about the other people on my team? We’re tiny, and setting up Nexus isn’t really an option for us. I’ve resorted to adding comments to the pom.xml explaining how to run install:install-file for each jar.

I’m OK with the install:install-file solution, but I’d still like to include these artifacts in my project’s version control, and not merely have them sprinkled about my filesystem.

Keeping them in src/main/webapp/WEB-INF/lib doesn’t work, since that automatically adds them to the resulting war artifact (digression: if maven would simply go ahead and add them to the classpath here I’d be done, no need for install:install-file!)

Question: is there a sanctioned place in the maven directory layout where I can tuck these .jar files, just so that I can keep them as part of my project?

I do realize what’s going on here- Maven is attempting to keep dependent jars outside of my build so that when other projects depend on my build, they can resolve the transitive dependencies. That’s great for open-source projects that are going into the public maven repos, but I’d bet that the vast majority of people using Maven are working on “leaf” projects such as this, and it would be really handy to have a way to include jar files as part of the project without jumping through so many hoops.

  • 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-20T15:21:39+00:00Added an answer on May 20, 2026 at 3:21 pm

    If setting up Nexus or just a simple fileserver repo as suggested by Jan is really too much trouble, here are some other options:

    • Simply include the JARs and a script that’ll install them all in a directory of your choosing in version control. No need for the Maven structure to sanction it.
    • Use your version control system as a host for the repository, either on a branch by itself in your main project or as a separate project. Let any backup, security, etc. you already have on version control apply to the repository without including the jars in the set of files that are actually being checked out and committed.
    • Include the jars in a folder that acts as a mini-repository that is checked out with the rest of the code. Have pom.xml point to that folder as a repository it uses. I’m not 100% sure this is possible, but it seems likely that it is.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .war project in Eclipse. It is probably not relevant but I
I have a maven3 webapp (war) project that has 2 dependencies. One is a
I have a project with several applications. I have one war and one EAR
I have a legacy war project that depends on a jar project, the jar
I have a multi module project consisting of several jar modules and a war
I have a Maven project that consists of several modules. I have a single
Suppose I have a war and jar projects defined in maven. The Jar project
I have a multiple maven project like this: root/ ----war ----jar1 ----jar2 ----jar3 The
I have a war module that is being built and is including a few
I have multiple (8) WAR files and 1 EAR file that 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.