Results 1 to 2 of 2
  1. #1
    abacchus is offline Member
    Join Date
    Aug 2016
    Posts
    1
    Rep Power
    0

    Question Parent Child POM's

    Hi Guys,
    I have multiple projects that will be using the same POMS. the only thing that would change is the artifactid and version in the projects node. my question is how do i put all of my dependencies and distrubtionmanagement in a separate pom file and have a small pom file in my project that has a link to the pom file that has all of the dependencies and distrubtionmanagement ? i am trying to keep the pom file in each project very small. see the example below.

    <!-- This will be the pom in my project -->
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    <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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.company</groupId>
    <artifactId>my-app-name</artifactId>
    <version>1.0.1-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>my-app-name</name>
    </project>

    <!-- This is the file on my maven server that will be called for the dependencies and distributionmanagement on every maven build -->
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    <project>
    <dependencies>
    <dependency>
    </dependency>
    </dependencies>
    <distributionManagement>
    <repository>

    </repository>
    <snapshotRepository>

    </snapshotRepository>
    </distributionManagement>
    </project>

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    26

    Default Re: Parent Child POM's

    You just set the parent pom in the child poms, don't you?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Parent and child windows
    By Heatryn in forum Advanced Java
    Replies: 3
    Last Post: 06-22-2012, 02:40 AM
  2. Please help me. Parent and Child Class with Swing
    By paul6lazo in forum AWT / Swing
    Replies: 22
    Last Post: 09-07-2011, 05:37 PM
  3. invoking parent method even though child overrides it...
    By vinod_javaranch in forum New To Java
    Replies: 2
    Last Post: 08-18-2011, 04:33 PM
  4. Access Parent and child node
    By emyk in forum Advanced Java
    Replies: 0
    Last Post: 05-02-2011, 11:16 PM
  5. Parent & Child window issues......
    By jithan in forum New To Java
    Replies: 2
    Last Post: 09-20-2008, 09:21 AM

Posting Permissions

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