Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I used the assembly plugin to package a distribution of a command line application as follows:</p> <ul> <li>Define assembly plugin in pom,<br> this includes binding the plugin to the package phase of the <a href="http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html" rel="nofollow noreferrer">build life-cycle</a></li> </ul> <blockquote> <pre><code>&lt;plugin&gt; &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt; &lt;version&gt;2.2-beta-3&lt;/version&gt; &lt;configuration&gt; &lt;descriptors&gt; &lt;descriptor&gt;src/main/assembly/bin.xml&lt;/descriptor&gt; &lt;/descriptors&gt; &lt;/configuration&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;assembly&lt;/id&gt; &lt;phase&gt;package&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;assembly&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; </code></pre> </blockquote> <ul> <li>Define the assembly descriptor, i.e. specify the contents and structure of your distributable archive, here's mine below:</li> </ul> <blockquote> <pre><code>&lt;assembly&gt; &lt;id&gt;bin&lt;/id&gt; &lt;includeBaseDirectory&gt;false&lt;/includeBaseDirectory&gt; &lt;formats&gt; &lt;format&gt;zip&lt;/format&gt; &lt;/formats&gt; &lt;fileSets&gt; &lt;fileSet&gt; &lt;directory&gt;target&lt;/directory&gt; &lt;includes&gt; &lt;include&gt;ctmemapi.properties&lt;/include&gt; &lt;include&gt;ctmxml/*&lt;/include&gt; &lt;include&gt;scampa&lt;/include&gt; &lt;include&gt;*.bat&lt;/include&gt; &lt;include&gt;*.sh&lt;/include&gt; &lt;/includes&gt; &lt;outputDirectory&gt;${project.artifactId}-${project.version}&lt;/outputDirectory&gt; &lt;fileMode&gt;755&lt;/fileMode&gt; &lt;/fileSet&gt; &lt;fileSet&gt; &lt;directory&gt;target&lt;/directory&gt; &lt;includes&gt; &lt;include&gt;scampa*.jar&lt;/include&gt; &lt;/includes&gt; &lt;outputDirectory&gt;${project.artifactId}-${project.version}/lib&lt;/outputDirectory&gt; &lt;fileMode&gt;644&lt;/fileMode&gt; &lt;/fileSet&gt; &lt;fileSet&gt; &lt;directory&gt;src/test/data&lt;/directory&gt; &lt;outputDirectory&gt;${project.artifactId}-${project.version}/test-data&lt;/outputDirectory&gt; &lt;fileMode&gt;644&lt;/fileMode&gt; &lt;/fileSet&gt; &lt;/fileSets&gt; &lt;dependencySets&gt; &lt;dependencySet&gt; &lt;outputDirectory&gt;${project.artifactId}-${project.version}/lib&lt;/outputDirectory&gt; &lt;fileMode&gt;644&lt;/fileMode&gt; &lt;/dependencySet&gt; &lt;/dependencySets&gt; &lt;/assembly&gt; </code></pre> </blockquote> <ul> <li>Create the assembly with either of the following commands <blockquote> <p>mvn assembly:assembly<br> mvn package<br> mvn install<br> mvn deploy </p> </blockquote></li> </ul>
    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.
 

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