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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:36:07+00:00 2026-05-23T10:36:07+00:00

I have a maven parent project P with two child modules A and B.

  • 0

I have a maven parent project P with two child modules A and B. Both A and B are inside the P folder. P has a modules section in the pom.xml resembling:

<modules>
  <module>A</module>
  <module>B</module>
</modules>

A has (and B the same except the artifact):

<parent>
  <groupId>some.group</groupId>
  <artifactId>A</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <relativePath>../pom.xml</relativePath>
</parent>

Now I made A depend on B by adding to A’s pom.xml:

<dependencies>
  <dependency>
    <groupId>some.group</groupId>
    <artifactId>B</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <type>jar</type>
    <scope>compile</scope>
  </dependency>
</dependencies>

If I do a mvn install on P, then all is fine. However after running mvn eclipse:eclipse on P, the generated .classpath file in A is incorrect, and Eclipse can’t resolve the dependencies from B.

The generated .classpath includes:

<classpathentry kind="src" path="/B"/>

instead of the working

<classpathentry kind="var" path="M2_REPO/some/group/B/0.0.1-SNAPSHOT/B-0.0.1-SNAPSHOT.jar"/>

What could be wrong? Thank you.

  • 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-23T10:36:08+00:00Added an answer on May 23, 2026 at 10:36 am

    If you set the property useProjectReferences to false (with -DuseProjectReferences=false), then it should work like you want (default is true). See the docs here

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

Sidebar

Related Questions

Currently, I have a Maven project which inherits from a parent pom defining two
I have maven parent project with several child projects. On deploy I want to
I have a Maven project that is a child project. It has many sibling
I have a JavaEE project as follows: hms2 (Maven parent pom) hms2-ear hms2-ejb hms2-web
My multi-module Maven project looks like: /foo pom.xml /foo-parent /foo-core /foo-something /src /site Pay
I have a multimodule maven project, when dependencymanagament tag is provided in parent pom,
For example, I have 2 Maven projects. One is project-parent. The other is project-child.
I have a maven-java project (say Project A) with a parent defining modules in
I have a multi-module Maven project with a parent project P and three sub-modules
I have a maven dependency in my pom.xml as such: <dependency> <groupId>com.foo</groupId> <artifactId>Bar</artifactId> <version>1.2.3</version>

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.