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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:00:21+00:00 2026-05-17T23:00:21+00:00

I have a multi module project consisting of several jar modules and a war

  • 0

I have a multi module project consisting of several jar modules and a war module. When I do mvn package, the war is created but one dependency (javax.mail) is not included in the lib folder of the war.
The dependency is set to compile is the main pom. The war is not dependent from the mail.jar but a module.jar is.
When I do mvn dependency:tree, the three looks fine to me. Running in debug does not show me anything wrong either.

Anyone has an idea?

BB
Peter

Edit: in the master POM I have

<dependency>
    <groupId>javax.mail</groupId>
    <artifactId>mail</artifactId>
    <version>1.4.1</version>
    <scope>compile</scope>
</dependency>

as a managed dependency. The module jar has the dependency as follows:

<dependency>
    <groupId>javax.mail</groupId>
    <artifactId>mail</artifactId>
</dependency>

The war module has no dependency to javax.mail.

Edit2:

I do override the war plugin in the master pom like this:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.1</version>
    <configuration>
        <warName>${war.name}</warName>
        <archive>
            <manifest>
            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
            <manifestEntries>
                <Implementation-Build>${buildNumber}</Implementation-Build>
            </manifestEntries>
        </archive>
    </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-17T23:00:22+00:00Added an answer on May 17, 2026 at 11:00 pm

    Does your pom or master pom override the maven-war-plugin? It’s possible to explicitly exclude artifacts from being put in the war:

    http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#packagingExcludes

    Also,
    http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#warSourceExcludes

    …I can’t remember exactly the difference between the two excludes, and it doesn’t really matter if you’re not overriding the war plugin anyway.

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

Sidebar

Related Questions

Basically, I have a multi-module project consisting of 5 different modules. One of the
I have a multi module Maven project, one of its modules has the main
I have some multi-module project. Some modules are packaged as wars and some as
I have a multi-module Maven project with a parent project P and three sub-modules
I have a multi-module maven project with an installer sub-project. The installer will be
I have a multi-module project and I want to deploy on the project's site
I have a multi-module project and I would like to define a single filter
I have the multi module project this is the parent pom. <?xml version=1.0 encoding=UTF-8?>
I have a multi-module project. parent POM (1.0-SNAPSHOT) |-- module1 (1.0-SNAPSHOT) |-- module2 (1.0-SNAPSHOT)
I have a multi-module project. I thought I can compile only a single module

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.