title: Create exe with launch4j with maven
body: <p>I want to wrap my jar with launch4j to an exe file. Here is my pom.xml:</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;de.thz.cameracontrol&lt;/groupId&gt;
  &lt;artifactId&gt;Kamerasteuerung&lt;/artifactId&gt;
  &lt;version&gt;0.0.3-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  
  &lt;name&gt;name&lt;/name&gt;
  &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;version.maven.compiler&gt;2.3.2&lt;/version.maven.compiler&gt;
      &lt;version.maven.site&gt;3.3&lt;/version.maven.site&gt;
      &lt;version.sonar&gt;4.3&lt;/version.sonar&gt;
      &lt;artifact.id&gt;Kamerasteuerung&lt;/artifact.id&gt;
  &lt;/properties&gt;
  &lt;profiles&gt;
      &lt;!-- profiles for repositories and distribution management --&gt;
  &lt;/profiles&gt;
  
  &lt;build&gt;
      &lt;pluginManagement&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${version.maven.compiler}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;encoding&gt;UTF-8&lt;/encoding&gt;
                      &lt;source&gt;${java.version}&lt;/source&gt;
                      &lt;target&gt;${java.version}&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-site-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${version.maven.site}&lt;/version&gt;
              &lt;/plugin&gt;
              &lt;!-- LAUNCH4J --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.akathist.maven.plugins.launch4j&lt;/groupId&gt;
                  &lt;artifactId&gt;launch4j-maven-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;l4j-clui&lt;/id&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;launch4j&lt;/goal&gt;
                          &lt;/goals&gt;
                              &lt;configuration&gt;
                              &lt;headerType&gt;console&lt;/headerType&gt;
                              &lt;jar&gt;target/Kamerasteuerung-0.0.3-SNAPSHOT-jar-with-dependencies.jar&lt;/jar&gt;
                              &lt;outfile&gt;target/CameraControl.exe&lt;/outfile&gt;
                              &lt;downloadUrl&gt;http://java.com/download&lt;/downloadUrl&gt;
                              &lt;classPath&gt;
                                  &lt;mainClass&gt;de.thz.cameracontrol.server.Server&lt;/mainClass&gt;
                              &lt;/classPath&gt;
                              &lt;jre&gt;
                                  &lt;bundledJre64Bit&gt;false&lt;/bundledJre64Bit&gt;
                                  &lt;bundledJreAsFallback&gt;false&lt;/bundledJreAsFallback&gt;
                                  &lt;minVersion&gt;1.8.0&lt;/minVersion&gt;
                                  &lt;jdkPreference&gt;preferJre&lt;/jdkPreference&gt;
                                  &lt;runtimeBits&gt;32&lt;/runtimeBits&gt;
                              &lt;/jre&gt;
                              &lt;versionInfo&gt;
                                  &lt;fileVersion&gt;1.0.0.0&lt;/fileVersion&gt;
                                  &lt;txtFileVersion&gt;${project.version}&lt;/txtFileVersion&gt;
                                  &lt;fileDescription&gt;${project.name}&lt;/fileDescription&gt;
                                  &lt;copyright&gt;C&lt;/copyright&gt;
                                  &lt;productVersion&gt;1.0.0.0&lt;/productVersion&gt;
                                  &lt;txtProductVersion&gt;1.0.0.0&lt;/txtProductVersion&gt;
                                  &lt;productName&gt;${project.name}&lt;/productName&gt;
                                  &lt;internalName&gt;AppName&lt;/internalName&gt;
                                  &lt;originalFilename&gt;CameraControl.exe&lt;/originalFilename&gt;
                              &lt;/versionInfo&gt;
                          &lt;/configuration&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-assembly-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;descriptorRefs&gt;
                          &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
                      &lt;/descriptorRefs&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                              &lt;mainClass&gt;de.thz.cameracontrol.server.Server&lt;/mainClass&gt;
                          &lt;/manifest&gt;
                      &lt;/archive&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;attached&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;!-- LAUNCH4J ENDE --&gt;
          &lt;/plugins&gt;
      &lt;/pluginManagement&gt;
  &lt;/build&gt;
  
  &lt;dependencies&gt;
      ...
  &lt;/dependencies&gt;
  </code></pre>
  
  <p></p>
  
  <p>And this is my batch:</p>
  
  <pre><code>@echo off
  call mvn -D skipTests clean assembly:attached
  pause
  </code></pre>
  
  <p>I get a correct jar with my dependencies but i dont get an exe file. Is there something else to do? Is an descriptor.xml really necessary?</p>