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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:41:44+00:00 2026-05-27T07:41:44+00:00

I created my project with structure same as in next snippet of code. |–

  • 0

I created my project with structure same as in next snippet of code.

|-- modP

|   |-- pom.xml

|   |-- src

|   |   |-- main

|   |     `-- java

|   |         `-- com

|   |             `-- myorg

|   |                 `-- myapp

|   |                     `-- modP

|   |                         `-- AppP.java

|-- modC1

|   |-- pom.xml

|   |-- src

|   |   |-- main

|   |     `-- java

|   |         `-- com

|   |             `-- myorg

|   |                 `-- myapp

|   |                     `-- modC

|   |                         `-- AppM.java

|-- modC2

|   |-- pom.xml

|   |-- src

        |-- main

          `-- java

              `-- com

                  `-- myorg

                      `-- myapp

                          `-- modC2

                              `-- AppN.java

My pom.xml for modP is:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org          /2001/XMLSchema-instance"

  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org    /xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>



  <groupId>com.myorg.myapp</groupId>

  <artifactId>modP</artifactId>

  <version>0.0.1-SNAPSHOT</version>

  <packaging>pom</packaging>



  <name>modP</name>

  <url>http://maven.apache.org</url>



  <properties>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

  </properties>



  <dependencies>

    <dependency>

      <groupId>junit</groupId>

      <artifactId>junit</artifactId>

      <version>3.8.1</version>

          <scope>test</scope>

    </dependency>

  </dependencies>

</project>

My pom.xml for C1 is :

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org       /2001/XMLSchema-instance"

  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org    /xsd/maven-4.0.0.xsd">

<parent>

    <artifactId>modP</artifactId>

    <groupId>com.myorg.myapp</groupId>

    <version>0.0.1-SNAPSHOT</version>

    <relativePath>.../modP/pom.xml</relativePath>

</parent>

<modelVersion>4.0.0</modelVersion>



  <groupId>com.myorg.myapp</groupId>

  <artifactId>modC1</artifactId>

  <packaging>jar</packaging>



  <name>modC1</name>

  <url>http://maven.apache.org</url>

</project>

And pom.xml for C2 is:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org    /2001/XMLSchema-instance"

  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org    /xsd/maven-4.0.0.xsd">

<parent>

    <artifactId>modP</artifactId>

    <groupId>com.myorg.myapp</groupId>

    <version>0.0.1-SNAPSHOT</version>

    <relativePath>.../modP/pom.xml</relativePath>

</parent>

<modelVersion>4.0.0</modelVersion>



  <groupId>com.myorg.myapp</groupId>

  <artifactId>modC2</artifactId>

  <packaging>jar</packaging>



  <name>modC2</name>

  <url>http://maven.apache.org</url>

</project>

My question is can I using such configuration reference AppP.java from ModP in AppC1.java and AppC2.java in ModC1 and ModC2.

I tried this and it looks like this doesn’t works. Did I misunderstood meaning of parent tag in pom.xml? What I need to do in maven for such function?

I read a lot of documentation, but now I’m even more confused than before reading. 🙁

Every answer will be highly appreciated.

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-05-27T07:41:44+00:00Added an answer on May 27, 2026 at 7:41 am

    Since ModP is a pom (packaging) project, it should not contain any Java code.

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

Sidebar

Related Questions

I have created the following project structure for my new asp.net mvc project any
So I have a django project I just created called 'coolprojectsite' the directory structure
The project is using Maven so the POM files are the main sources of
I have multiple .java files inside a folder (e.g temp/code/project) I want a batch
I created a project in flex builder with application server type set to none.
i created a project to search textfiles with lucene.net. [asp.net/vs08] these textfiles are in
I created a project, probably as an Android project without thinking. I then did
When I created the project I'm trying to deploy I selected that I wanted
I just created a project so my Solution Explorer looks like this: (source: kalleload.net
I opened a project (created in D2007/08) in D2009 and it would compile but

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.