Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>When you specify <code>&lt;packaging&gt;ear&lt;/packaging&gt;</code> you are telling Maven to invoke the full lifecycle specified for that packaging.</p> <p>In your case what you want to do is write a wrapper <code>pom.xml</code> that just shells out to your 3rd party build script without invoking the EAR lifecycle and attach the produced artifact to Maven's reactor...</p> <p>Something like this should work</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;pom&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-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;attachartifact file="${project.build.directory}/${project.build.finalName}.ear" type="ear"/&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> <p>There may be some slight glitches because the pom's packaging differs... but as this is not a classpath relevant artifact they shouldn't affect you.</p> <p>Note the <code>attachartifact</code> ANT task can attach an artifact from anywhere, so you need not have battled ANT to get the file in the "right" place... though it is nicer to follow that convention. You may want to not use the <code>project.build.finalName</code> and hardcode the filename.</p>
    singulars
    1. This table or related slice is empty.
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. 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