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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:11:34+00:00 2026-06-03T07:11:34+00:00

I discovered interesting features provided by the maven dependency plugin. I’ve analyzed one of

  • 0

I discovered interesting features provided by the maven dependency plugin. I’ve analyzed one of my projects and got the following output:

[WARNING] Used undeclared dependencies found:
[WARNING]    org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.6:compil
e
[WARNING]    javax.xml.soap:saaj-api:jar:1.3:compile
[WARNING]    org.apache.geronimo.specs:geronimo-annotation_1.0_spec:jar:1.1.1:co
mpile
[WARNING]    org.apache.geronimo.specs:geronimo-jaxws_2.1_spec:jar:1.0:compile
[WARNING]    org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Fin
al:compile
[WARNING]    org.apache.geronimo.specs:geronimo-ws-metadata_2.0_spec:jar:1.1.2:c
ompile
[WARNING] Unused declared dependencies found:
[WARNING]    junit:junit:jar:4.5:test
[WARNING]    log4j:apache-log4j-extras:jar:1.1:compile
[WARNING]    org.slf4j:slf4j-log4j12:jar:1.6.4:compile
[WARNING]    org.slf4j:slf4j-api:jar:1.6.4:compile
[WARNING]    org.hibernate:hibernate-c3p0:jar:3.6.8.Final:runtime

The “unused declared” section is clear for me. Concerning the “used undeclared” section, it shows me the dependencies that are used directly by my project but included in the classpath transitively by Maven.

Let’s take the first one as example “org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.6:compile”, this dependency is included since it is a dependency of cxf-rt-core-2.2.6. But, the code present in the JAR is also used directly by the project. I’m wondering now that when this project has been written, the developer may had the intention to use another Java Mail JAR.

If I want to use CXF 2.2.6 in one of my projects, I automatically get the Java Mail spec provided by Geronimo as a transitive dependency. What if I want to use another Java Mail API? By looking in search.maven.org, I can see that many JAR provide the Java Mail API.

Thanks

  • 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-03T07:11:36+00:00Added an answer on June 3, 2026 at 7:11 am

    If you want to exclude a particular transitive dependency you can use the exclusions for dependencies.

    <dependency>
      <groupId>...</groupId>
      <artifactId>..</artifactId>
      <version>..</version>
      <exclusions>
        <exclusion>
          <groupId>sample.ProjectB</groupId>
          <artifactId>Project-B</artifactId>
        </exclusion>
        ..
      </exclusions> 
    </dependency>
    

    This is only possible for the first level of transitive dependencies.

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

Sidebar

Related Questions

At MSDN page for Stopwatch class I discovered link to interesting article which makes
Discovered something and am looking into a bit of incite as to why one
We have discovered that one of our auto generated assemblies is throwing a StackOverflowException
For one reason or another, I sometimes find it useful or just interesting to
BoneCP has a very interesting list of features. A look at Javadoc reveals many
I discovered something interesting while writing code. I defined a macro in my code
A friend of mine discovered some interesting behaviour in some Javascript code, which I
So I was messing around writing a vector class when I discovered this interesting
I've discovered something interesting. I'm using ajax in a carousel structure to add more
I discovered a new interesting gadget for deploying java apps on the web easier.

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.