Note that there are some explanatory texts on larger screens.

plurals
  1. POIs it possible to specify a dependency on a particular maven phase?
    primarykey
    data
    text
    <p>I am using the maven-docbkx-plugin to generate HTML and PDF output from docbook sources. I have several books, and these link to each other using olinks.</p> <p>The olink database is generated in one maven phase (generate-resources), and the actual HTML and PDF generation, which looks up this database is executed in a subsequent maven phase (compile).</p> <p>I have divided the maven project into a multi-module project, as each book has tens of included sub-documents. The docbkx-maven-plugin configuration is all done in the parent, then it is just the top-level docbook source that needs to be specified in the child POM.</p> <p>But ... this does not work dependency-wise, as each module requires that the generate-resources of every other module has been run before it runs its compile phase, so that it can access the olink database of each of the other books.</p> <p>Is there a way to do this in maven? Or will I need to re-structure into two maven projects (which will break the modularity of this project considerably, as all of the configuration will need to be declared in each project)? </p> <p>The structure of the parent POM is: ... </p> <pre><code> &lt;build&gt; &lt;plugins&gt; &lt;pluginManagenent&gt; &lt;plugin&gt; &lt;groupId&gt;com.agilejava.docbkx&lt;/groupId&gt; &lt;artifactId&gt;docbkx-maven-plugin&lt;/artifactId&gt; &lt;version&gt;2.0.14&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;xrefdb&lt;/id&gt; &lt;phase&gt;generate-resources&lt;/phase&gt; &lt;configuration&gt; ... &lt;/configuration&gt; &lt;goals&gt; &lt;goal&gt;generate-html&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;execution&gt; &lt;id&gt;html&lt;/id&gt; &lt;phase&gt;compile&lt;/phase&gt; &lt;configuration&gt; ... &lt;/configuration&gt; &lt;goals&gt; &lt;goal&gt;generate-html&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;/pluginManagement&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/project&gt; </code></pre> <p>And the modules:</p> <pre><code>&lt;project&gt; ... &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;com.agilejava.docbkx&lt;/groupId&gt; &lt;artifactId&gt;docbkx-maven-plugin&lt;/artifactId&gt; &lt;version&gt;2.0.14&lt;/version&gt; &lt;configuration&gt; ... &lt;/configuration&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.
 

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