1

I have a parent pom which is serving required version number variables of my other components & more importantly "maven-jar-plugin"(version 3.0.2). That same pom is having default profile which will make its multi-module child build a jar. Now the problem is that Multi-module child is throwing this below exception

You have to use a classifier to attach supplemental artifacts to the project instead of replacing them

I found that this is because of maven-jar-plugin default binding inherent to the jar packaging but I am doing a war packaging so after war packaging the default-jar execution starts and throwing the above one. Any solution to stop the default will help me thanks in advance.

pom(Master pom)
  + pom(Multi-Module child)
     +-- pom (war child pom, but after the war, it starts building default jar) 
       +-- pom2
       +-- pom3 
Anbu
  • 15
  • 6

1 Answers1

0

Include in your war-pom

    <build>
        ....
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>3.1.1</version>
            <configuration>
                <skip>true</skip>
            </configuration>
        </plugin>
        ....
    </build>
drkunibar
  • 1,327
  • 1
  • 7
  • 7
  • In such case, we are not getting the variables inherited from the parent pom :( – Anbu Feb 20 '19 at 03:13
  • I'm sorry, but do not undestand what you ean with 'we are not getting the variables'. You do not need any variables to skip the `maven-jar-plugin` – drkunibar Feb 20 '19 at 18:14