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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:54:55+00:00 2026-05-27T11:54:55+00:00

Just got head into Maven and I’ve got situation where I have cyclic dependency

  • 0

Just got head into Maven and I’ve got situation where I have cyclic dependency problem.
my original structure was

|-mainProject
|-webProject

where mainProject has webProject as a dependency (war packaging).
Got error since webProject also depends on mainProject, so I changed the structure

|-coreProject
|-mainProject
|-webProject

so that core get packaged into a jar and both main&web have core as dependency.
Now I see different error while creating -shade.jar.

CoreProject’s components need to be used by both main&web projects.
What would be the best practice in this case?


my dependency graph looks like

mainProject(jar) -> webProject(war)   --
                |-> coreProject(jar) <-|
                |-> jetty jars

I’m using embedded jetty in mainProject, so that my final outcome would be single jar file from mainProject which includes web&coreProjects.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:1.4:shade (default) on project mainProject: Error creating shaded jar: Invalid signature file digest for Manifest main attributes -> [Help 1]

I have tried filters such as

<filters>
   <filter>
      <artifact>*:*</artifact>
      <excludes>
         <exclude>META-INF/*.SF</exclude>
         <exclude>META-INF/*.DSA</exclude>
         <exclude>META-INF/*.RSA</exclude>
      </excludes>
   </filter>
</filters>

but still getting the same error

  • 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-27T11:54:56+00:00Added an answer on May 27, 2026 at 11:54 am

    It’s highly unusual to have a WAR project as a dependency for another project in the way you described. A valid scenario I can think of is bundling the WAR into a ‘higher’ level archive (like an EAR). But in that case your dependency is defined in your EAR project and not the other way around. In any case, if you want to follow best practices then place your core classes in mainProject and set its packaging to JAR. Then add a dependency for it to your webProject.

    If both mainProject and webProject will always be deployed together you should consider defining them as submodules in a multimodule POM.

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

Sidebar

Related Questions

I just got Delphi 2009 and have previously read some articles about modifications that
Recently, I've got a dangerous idea into my head after reading this blog post.
I have just started looking into jquerymobile, done simple samples using jquery.mobile-1.0a1 . I
Just got a request from my boss for an application I'm working on. Basically
Just got a question about generics, why doesn't this compile when using a generic
I just got a dedicated server from a hosting company, and for some reason,
I just got through manually removing the bin\ and obj\ folders from around 30
I just got a shiny, brand-new Debian server handed to me by our Systems
I just got my azure invitation code...yay! Are there any official samples for windows
I just got done working through the Django tutorials for the second time, and

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.