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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:33:55+00:00 2026-06-01T15:33:55+00:00

I am using Maven 3 to build a java application with 3 tiers –

  • 0

I am using Maven 3 to build a java application with 3 tiers – server, ejb and ui.
The EJB project is dependent on the Server project, and the UI project is only dependent on EJB, and provides an exclusion for the Server transitive dependency.

When the UI project is built as a war, the Server dependency is being included despite it not showing up on dependency:tree command.

Here is the relevant output of running mvn dependency:tree

**project.name:UI:war:1.0 SNAPSHOT**
+-  project.name:Common:jar:1.0 SNAPSHOT:compile
|   +  org_common:_lib:jar:16.0.006:compile
|   |  +- log4j:log4j:jar:1.2.16:compile
|   |  \- commons configuration:commons configuration:jar:1.6:compile
|   |     +- commons lang:commons lang:jar:2.4:compile
|   |     +- commons digester:commons digester:jar:1.8:compile
|   |     \- commons beanutils:commons beanutils core:jar:1.8.0:compile
|   +- org_common:_security_lib:jar:16.0.006:compile
|   \- org.springframework:spring:jar:2.0:compile
+-  **project.name:EJB:ejb client:client:1.0 SNAPSHOT:compile**
|   \- com.ibm.websphere.appserver:j2ee:jar:7.0.0.9:compile
+-  org_common:_uicomponent:jar:16.0.006:compile

And here is the output dependency tree from when running mvn clean install -X

**project.name:UI:war:1.0 SNAPSHOT**
+-  project.name:Common:jar:1.0 SNAPSHOT:compile
|   +  org_common:_lib:jar:16.0.006:compile
|   |  +- log4j:log4j:jar:1.2.16:compile
|   |  \- commons configuration:commons configuration:jar:1.6:compile
|   |     +- commons lang:commons lang:jar:2.4:compile
|   |     +- commons digester:commons digester:jar:1.8:compile
|   |     \- commons beanutils:commons beanutils core:jar:1.8.0:compile
|   +- org_common:_security_lib:jar:16.0.006:compile
|   \- org.springframework:spring:jar:2.0:compile
+-  **project.name:EJB:ejb client:client:1.0 SNAPSHOT:compile**
|   +- **project.name:Server:jar:1.0 SNAPSHOT:compile**
|   |   +- javassist:javassist:jar:3.4.GA:compile
|   |   +- project.filestore:filestore_client:jar:7.0.003:compile
|   |   +- com.ibm.db2:db2jcc:jar:9.7.fp1.aix64.s091114:compile
|   |   +- com.ibm.db2:db2java:jar:9.7.fp1.aix64.s091114:compile
|   |   +- com.ibm.db2:db2jcc_license_cu:jar:9.7.fp1.aix64.s091114:compile
|   \- com.ibm.websphere.appserver:j2ee:jar:7.0.0.9:compile
+-  org_common:_uicomponent:jar:16.0.006:compile

The dependency on Server is the only difference between the two trees.
Shouldn’t these two outputs always be the same? What could cause a library to be included that does not show up in dependency:tree?

The parent POM defines the modules as:

<modules>
    <module>Server</module>
    <module>EJB</module>
    <module>UI</module>
</modules>

The dependency listed in the EJB POM is:

<dependencies>
        <dependency>
            <groupId>project.name</groupId>
            <artifactId>Server</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>

The dependency in the UI is:

<dependencies>
        <dependency>
            <groupId>project.name</groupId>
            <artifactId>EJB</artifactId>
            <version>${project.version}</version>
            <type>ejb-client</type>
            <exclusions>
                <exclusion>
                    <groupId>project.name</groupId>
                    <artifactId>Server</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
</dependencies>

I am aware that I can explicitly exclude the Server jar from being included in the WAR, but I would prefer to fix the actual issue.

  • 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-01T15:33:56+00:00Added an answer on June 1, 2026 at 3:33 pm

    As we figured out in comments, the problem’s source was buggy Maven 3.0.3. Version 3.0.4 has solved the issue.

    My comment there:

    Which exact Maven version do you use? If not 3.0.4, try it and tell if it helps. I’ve found really, REALLY crappy issues while using previous Maven 3 releases, mostly with 3.0.2.

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

Sidebar

Related Questions

I am trying to build a Java EE application using Maven. I have the
I am using Maven 3 for build Dashboard project After building my web application
Im using maven to build a multi module project. But some projects are in
I'm trying to build my application for GoogleAppEngine using maven. I've added the following
I'm trying to build an Java EE 6-application on GlassFish V3, using JSF 2.0,
We build software using Hudson and Maven. We have C#, java and last, but
I have a desktop Java application built using Maven 2 (but I could upgrade
I have a java/maven project that uses tango icons, so I'm using the following
I'm using the maven-antrun-plugin with install4j to build installers for my application. It doesn't
I'm using Maven in the context of another build-tool (leiningen for Clojure, but this

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.