title: Jenkins job with multiple maven goals
body: <p>I was assigned to maintain issues in a system created before time.
  The system uses Jenkins as system integration tool and unfortunately I do not have previous experience with it.</p>
  
  <p>The problem is following:
  When following the steps for local build (via console) the archive files (.jars, .ear) are created correctly.
  When using Jenkins job for this, one of the .jar files (call it module-one.jar) included in .ear does not contain a folder with .xsb and .class fiels.
  So .ear application becomes incorrect and <code>ClassNotFoundException</code> is thrown.</p>
  
  <p>Steps for building application locally: <BR></p>
  
  <pre><code>cd my_project_path
  cd ModuleOne
  mvn xmlbeans:xmlbeans
  mvn install
  cd ..
  mvn clean install
  </code></pre>
  
  <p>The Maven section in Jenkins contains only this goal <code>clean install</code> (the screenshot below section "Build"):</p>
  
  <hr>
  
  <p>So what I wonder is how to add the following maven tasks in Jenkins job to be executed on ModuleOne:</p>
  
  <pre><code>mvn xmlbeans:xmlbeans
  mvn install
  </code></pre>
  
  <hr>
  
  <p>My idea is to go to "Pre Steps" section and add following maven goal:</p>
  
  <pre><code>mvn xmlbeans:xmlbeans install
  </code></pre>
  
  <p>My questions are: <BR>
  1. If I am on the right way how to define the goal "mvn xmlbeans:xmlbeans install" to be executed exactly on ModuleOne? <BR>
  2. If I am not on the right way are there at all any solutions to do this with Jenkins? <BR></p>
  
  <p>Here is screenshot with my suggestion for "Pre Steps". In the current configuration (that skips to add proper dirctory with .xsb and .class fiels to ModuleOne) this section is missing, but the section "Build" is as it is used now.</p>
  
  <p><a href="https://i.stack.imgur.com/CluEH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CluEH.png" alt="Maven build settings"></a></p>