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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:37:10+00:00 2026-05-26T18:37:10+00:00

I have 2 Maven web projects A and B. B contains some common parts

  • 0

I have 2 Maven web projects A and B. B contains some common parts and A depends on B.

In A’s pom.xml I have:

<dependencies>
    <dependency>
        <groupId>com.mygroup</groupId>
        <artifactId>B</artifactId>
        <version>1.0-SNAPSHOT</version>
        <type>war</type>
        <scope>compile</scope>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.0.2</version>
            <configuration>
                <source>1.5</source>
                <target>1.5</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.1.1</version>
        </plugin>
    </plugins>
</build>

I have 2 problems:

  1. When making some changes in B, if I run a maven build on A I don’t see the changes in the resulting exploded archive.

  2. Trying to deploy A from Eclipse does not work – the contents of B are not included in the resulting war/exploded archive.

Thanks for your help.

  • 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-26T18:37:10+00:00Added an answer on May 26, 2026 at 6:37 pm

    Well, if you changes stuff in B, you have to re-install it into your local maven repo (mvn install) for other local projects that have it as dependency to receive the latest modifications.

    When building a maven project it’s best if you build it using Maven (like with commands such as mvn package) and not using some other building tool (such as Eclipse). If you wanna build it a la Maven but from the comfort of your Eclipse GUI, you can istall m2_eclipse plugin from :

    http://m2eclipse.sonatype.org/installing-m2eclipse.html

    which integrates Maven with Eclipse. Then, when you rigth click on your project in Eclipse, under the “Run…” options you’ll have the one that allows your to Maven build it, redirecting all console output to the Eclipse console window.

    And as a final note, in a setup such as the one aboce, ideally you’d create a parent Maven project (packaged as “pom”) which has as child projects B and A (in that order). This way if you’ve modified stuff in both projects and you want everything to be build with the latest modifs, you can just do a maven install on the parent pom and Maven will take care of everything.

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

Sidebar

Related Questions

I have a maven dependency in my pom.xml as such: <dependency> <groupId>com.foo</groupId> <artifactId>Bar</artifactId> <version>1.2.3</version>
I have several Maven projects in eclipse that depends on each other. Some of
I have following Maven projects set up: PM-Core PM-Web (with a dependency to PM-Core)
I have a web app that depends on multiple internal maven projects, can one
Let's say I have two maven profiles for running projects web tests: 1. first
I have a maven-managed project with some modules. One module contains some native codes
I have been using maven projects in hudson quite successfully for some time. However
I have been able to run some web services locally through Maven's jetty plugin
I have java project that depends from other java projects. These projects are maven
I'm using maven2 for dependency management. I have one project that contains some Java

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.