pom.xml - How can I use bound version of core Maven plugin, but override its configuration? -


i want override configuration of core maven plugin in pom.

example:

<plugin>     <groupid>org.apache.maven.plugins</groupid>     <artifactid>maven-jar-plugin</artifactid>     <configuration>         <!-- configuration here -->     </configuration> </plugin> 

maven gives warning version plugin missing. use version default binding, don't seem find way it.

  1. are there better ways override core plugin's configuration without (potentially) changing version?
  2. should ignore warning?

thanks

clarification: i'm familiar best practices. however, in opinion core plugins different in have explicitly declared versions. maven free add new core plugins, in case default version used despite attempts pin versions. moreover, maven doesn't warn when default version of core plugin being used — long don't try override configuration is.

it's best practice set plugin versions in pluginmanagement section of parent pom.

reason: plugins change behaviour in versions. pinning plugin versions key stable builds maven.

please note i've written parent pom, provides lot of common configuration. code open source, can use parent of parent pom (or in case have single module project), if like:

https://github.com/softsmithy/softsmithy-parent/blob/develop/pom.xml

just make sure override project-specific sections such organization, scm, issuemanagement, developers, licenses etc.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -