Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There may be other ways to do this, but you could have a <a href="http://maven.apache.org/pom.html" rel="nofollow noreferrer"><code>pluginManagement</code></a> section in a parent pom.</p> <blockquote> <p>pluginManagement: is an element that is seen along side plugins. Plugin Management contains plugin elements in much the same way, except that rather than configuring plugin information for this particular project build, it is intended to configure project builds that inherit from this one. However, this only configures plugins that are actually referenced within the plugins element in the children. The children have every right to override pluginManagement definitions.</p> </blockquote> <p>For example:</p> <p>parent project POM (need to run mvn install to ensure this is visible to your child project)</p> <pre><code>&lt;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"&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;org.nkl&lt;/groupId&gt; &lt;artifactId&gt;parent&lt;/artifactId&gt; &lt;packaging&gt;pom&lt;/packaging&gt; &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt; &lt;build&gt; &lt;pluginManagement&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;artifactId&gt;xml-maven-plugin&lt;/artifactId&gt; &lt;executions&gt; &lt;execution&gt; &lt;phase&gt;compile&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;transform&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;configuration&gt; &lt;transformationSets&gt; &lt;transformationSet&gt; &lt;dir&gt;config/xsltUpdates/input&lt;/dir&gt; &lt;stylesheet&gt;config/xsltUpdates/update1-8-3.xsl&lt;/stylesheet&gt; &lt;outputDir&gt;config/xsltUpdates/update1-8-3&lt;/outputDir&gt; &lt;/transformationSet&gt; &lt;transformationSet&gt; &lt;dir&gt;config/xsltUpdates/update1-8-3&lt;/dir&gt; &lt;stylesheet&gt;config/xsltUpdates/update1-8-9.xsl&lt;/stylesheet&gt; &lt;outputDir&gt;config/xsltUpdates/update1-8-9&lt;/outputDir&gt; &lt;/transformationSet&gt; &lt;transformationSet&gt; &lt;dir&gt;config/xsltUpdates/update1-8-9&lt;/dir&gt; &lt;stylesheet&gt;config/xsltUpdates/update1-9-0.xsl&lt;/stylesheet&gt; &lt;outputDir&gt;config/xsltUpdates/update1-9-0&lt;/outputDir&gt; &lt;/transformationSet&gt; &lt;transformationSet&gt; &lt;dir&gt;config/xsltUpdates/update1-9-0&lt;/dir&gt; &lt;stylesheet&gt;config/xsltUpdates/update1-10-0.xsl&lt;/stylesheet&gt; &lt;outputDir&gt;config/xsltUpdates/update1-10-0&lt;/outputDir&gt; &lt;/transformationSet&gt; &lt;transformationSet&gt; &lt;dir&gt;config/xsltUpdates/update1-10-0&lt;/dir&gt; &lt;stylesheet&gt;config/xsltUpdates/update1-10-0-1.xsl&lt;/stylesheet&gt; &lt;outputDir&gt;config/xsltUpdates/update1-10-0-1&lt;/outputDir&gt; &lt;/transformationSet&gt; &lt;transformationSet&gt; &lt;dir&gt;config/xsltUpdates/update1-10-0-1&lt;/dir&gt; &lt;stylesheet&gt;config/xsltUpdates/update1-10-0-2.xsl&lt;/stylesheet&gt; &lt;outputDir&gt;config/xsltUpdates/update1-10-0-2&lt;/outputDir&gt; &lt;/transformationSet&gt; &lt;transformationSet&gt; &lt;dir&gt;config/xsltUpdates/update1-10-0-2&lt;/dir&gt; &lt;stylesheet&gt;config/xsltUpdates/updateCurrent.xsl&lt;/stylesheet&gt; &lt;outputDir&gt;config/xsltUpdates/output&lt;/outputDir&gt; &lt;/transformationSet&gt; &lt;/transformationSets&gt; &lt;/configuration&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;net.sf.saxon&lt;/groupId&gt; &lt;artifactId&gt;saxon&lt;/artifactId&gt; &lt;version&gt;8.7&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/pluginManagement&gt; &lt;/build&gt; &lt;/project&gt; </code></pre> <p>Child project POM</p> <pre><code>&lt;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"&gt; &lt;parent&gt; &lt;artifactId&gt;parent&lt;/artifactId&gt; &lt;groupId&gt;org.nkl&lt;/groupId&gt; &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt; &lt;/parent&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;org.nkl&lt;/groupId&gt; &lt;artifactId&gt;child&lt;/artifactId&gt; &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;artifactId&gt;xml-maven-plugin&lt;/artifactId&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/project&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload