title: Setup Intellij to hot update jars and run Maven Appassembler
body: <p>I want to setup <em>Intellij</em> to automatically do what I am doing from the command-line with maven repeatedly, which is to run <code>mvn package -DskipTests</code> to rebuild my jar and run the <em>Appassembler</em> Maven plugin to produce my runnable scripts. Ideally, all I want it to do is hot update the classes within the jar which I have changed.</p>
  
  <p>I have figured out how to tell Intellij to create jars with the Artifact tab in Project Structure, but can I get Intellij to import this artifact information from the pom instead of me setting it up manually? </p>
  
  <ul>
  <li>It does auto-import pom changes, but never imported this artifact info.</li>
  <li>This would enable it to use the exact output name of what maven produces, so that whether I'm working from the command-line or IDE I can work with one set of outputs. (reason below)</li>
  </ul>
  
  <p><em>Appassembler</em> adds an additional step, which includes it copying all the dependencies into its target folder and producing the scripts. If Intellij can't trigger Appassembler, I was thinking maybe Appassembler could use symlinks instead and the when the jar as updated, my runnable app scripts would immediately be using that version. Or in the worse case, I only need to run this particular step from the command-line, the jar having already been built.</p>
  
  <p><strong>Update</strong></p>
  
  <p>In case it helps, here's how I use Appassembler in my <code>pom.xml</code>:</p>
  
  <pre><code>&lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;executions&gt;
          &lt;execution&gt;
            &lt;id&gt;package&lt;/id&gt;
            &lt;goals&gt;
              &lt;goal&gt;assemble&lt;/goal&gt;
            &lt;/goals&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
        &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
        &lt;artifactId&gt;appassembler-maven-plugin&lt;/artifactId&gt;
        &lt;version&gt;1.2.2&lt;/version&gt;
        &lt;configuration&gt;
          &lt;programs&gt;
            &lt;program&gt;
              &lt;mainClass&gt;com.foo.bar.Foobnobicator&lt;/mainClass&gt;
              &lt;name&gt;gofoo&lt;/name&gt;
            &lt;/program&gt;
          &lt;/programs&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>Thanks for the advice on the best way to achieve this.</p>