Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing maven with external build scripts
    primarykey
    data
    text
    <p>My application depends on a third-party ear (it deconstructs it, adds/modifies some items therein, and reconstructs it into a new ear). The third-party ear must be built using a third-party build script.</p> <p>I am trying to learn the "maven-y" way to set this up. I expect I will need to get the third-party ear installed into my repository.</p> <p>I want to create a pom.xml for the third-party ear which will build the third-party ear and install/deploy it. I have created a pom.xml which successfully calls out to the third-party build script (via maven-antrun-plugin) and creates the ear in exactly the place that a default maven ear project would.</p> <p>My problem is that maven's install plugin fails because it can't find the archive (it expects whatever plugin does the packaging to have set an attribute on the artifact object, which maven-antrun-plugin doesn't do).</p> <p><code>mvn package</code> works fine and generates the ear.</p> <p>The exact error message when running <code>mvn install</code> looks like this:</p> <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install (default-install) on project third_party_ear: The packaging for this project did not assign a file to the build artifact -&gt; [Help 1] </code></pre> <p>Is there a better way to go about this?</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/xsd/maven-4.0.0.xsd"&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;com.thirdparty&lt;/groupId&gt; &lt;artifactId&gt;third_party_ear&lt;/artifactId&gt; &lt;version&gt;9.0&lt;/version&gt; &lt;packaging&gt;ear&lt;/packaging&gt; &lt;name&gt;third_party_ear&lt;/name&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;artifactId&gt;maven-ear-plugin&lt;/artifactId&gt; &lt;version&gt;2.6&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;default-ear&lt;/id&gt; &lt;phase&gt;none&lt;/phase&gt; &lt;/execution&gt; &lt;execution&gt; &lt;id&gt;default-generate-application-xml&lt;/id&gt; &lt;phase&gt;none&lt;/phase&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt; &lt;version&gt;1.7&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;phase&gt;package&lt;/phase&gt; &lt;configuration&gt; &lt;target&gt; &lt;subant target="build-ear" antfile="build.xml" buildpath="${project.basedir}"/&gt; &lt;/target&gt; &lt;/configuration&gt; &lt;goals&gt; &lt;goal&gt;run&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&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