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

    Default Maven Inheritance Issue

    Hello, I am having a problem setting up my new Maven project.

    So my project consists of a number of modules including one main module. This main module contains a list of plugins and dependencies that every other module should inherit and use. However in order to do this I would need to define the main module as the parent in the child AND define the child as a module in the parent. This will not work for what I am trying to do.

    My project is intended to have any number of child modules that the main module will not know about, so it could not have them listed as modules in its pom. These child modules will include the main module as a dependency and the main module will have no idea they are using it.

    Is there some way for me to make the maven dependencies, plugins, and properties from the main module's pom available to all child modules without the main module's knowledge? There must be a better way than just copying the pom data for each child module.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power

    Default Re: Maven Inheritance Issue

    You don't have to declare a child module in the parent if all you are doing is using the parent-child structure.
    You just declare, in the child, the parent.
    Java Code:
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Is this a Maven issue?
    By edjm1971 in forum Apache Maven
    Replies: 9
    Last Post: 11-12-2014, 06:52 PM
  2. Maven Deloy Issue
    By in forum Apache Maven
    Replies: 1
    Last Post: 02-06-2014, 09:16 AM
  3. Replies: 0
    Last Post: 12-17-2012, 02:32 PM
  4. Inheritance issue
    By powerpravin in forum New To Java
    Replies: 3
    Last Post: 04-12-2011, 07:11 AM
  5. Simple Inheritance issue...
    By AWE in forum New To Java
    Replies: 3
    Last Post: 07-27-2009, 10:56 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