Question

I am doing some re-factoring to use parent poms and put common configuration in a common place.

I have a separate git repo to house the parent poms. Some of the common configuration specifies directories/files that will exist relative to the child projects, but not relative to the parent pom (they are in different git repos).

When I try to deploy the pom, one of the plugins is failing because the path does not exist.

How is this supposed to work?

I'd expect that if the artifact has "pom" packaging then it wouldn't actually try to run the plugins (at least that is what I want). Or do the plugins I use need to be responsible for knowing that it is a "pom" artifact?

Was it helpful?

Solution

The parent should, probably, only have pluginManagement, not plugin.

The pluginManagement section of the parent pom is used to share plugin versioning and base configuration across modules. This is in line with the dependency management section of the parent, which allows you to configure versions and exclusions across modules. For example, you could configure the site plugin in the parent to provide a standard look and feel across all modules, while the modules override the site plugin with module specific details.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top