Results 1 to 2 of 2
  1. #1
    szms is offline Member
    Join Date
    Jul 2012
    Posts
    4
    Rep Power
    0

    Default maven dependency and war file

    Hello...

    I have two projects A and B

    B depends on A.

    If I make any changes on project A and run mvn install on project B, the changes from project A does not get included to war file for project B.

    However, if I run mvn install on project A and then run mvn install on project B, the changes from project A gets included to war file for project B.

    Is this normal? Is there any way to get project B updated with project A with running mvn install on project A?

  2. #2
    noctarius is offline Member
    Join Date
    Jun 2012
    Location
    Remscheid, Germany
    Posts
    61
    Rep Power
    0

    Default Re: maven dependency and war file

    For sure this is normal. If you do not mvn install the project A Maven won't use it as a dependency in others. If you develop in any better IDE (Netbeans, Eclipse, IntelliJ) they all all support some Maven extension (for Eclipse it is called Workspace Resolution) overriding the normal Maven dependencies if there's some project having the same coordinates (groupid, artifactid, version) which simplifies the development.
    If you have multiple Maven projects that all depend on each other and must be build together it is best practice to combine them by a parent module (a so called reactor project). Just look for inheritance in Maven documentation.

Similar Threads

  1. Dependency and exclusion
    By Abder-Rahman in forum XML
    Replies: 0
    Last Post: 09-18-2009, 05:09 PM
  2. Replies: 0
    Last Post: 04-20-2009, 06:26 PM
  3. Maven Dependency Overview 1.1
    By Java Tip in forum Java Software
    Replies: 0
    Last Post: 07-02-2008, 07:13 PM
  4. Maven Dependency Overview 1.0
    By Java Tip in forum Java Software
    Replies: 0
    Last Post: 04-15-2008, 06:52 PM
  5. Dependency Analyzer 1.0.3-rc0
    By levent in forum Java Software
    Replies: 0
    Last Post: 07-30-2007, 04:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •