title: java.lang.NoClassDefFoundError on running project with Java, but works when running with mvn exec:exec
body: <p>I'm compiling and running some source code I got from a project called Structr (<a href="https://github.com/structr/structr" rel="nofollow">https://github.com/structr/structr</a>). I'm able to run the program correctly with a maven mvn command but not using the JVM java command.</p>
  
  <p>The compilation step goes well with <code>maven clean install -DskipTests</code></p>
  
  <p>On running the front-end (in the structr-ui directory), it goes well if using <code>maven exec:exec</code> but fails on <code>java -cp target/lib/*;target/structr-ui-0.8.2.jar org.structr.Ui</code>. I have some stack trace indicating <code>java.lang.NoClassDefFoundError</code> on <code>org.structr.core.entity.AbstractNode</code> and <code>org.structr.core.EntityContext</code>. What I find strange about this is that the maven pom.xml file in the exec entry we have</p>
  
  
  
  <pre class="lang-xml prettyprint-override"><code>        &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.2.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;executable&gt;java&lt;/executable&gt;
                  &lt;arguments&gt;
                      &lt;argument&gt;-server&lt;/argument&gt;
                      &lt;argument&gt;-Dfile.encoding=utf-8&lt;/argument&gt;
                      &lt;argument&gt;-XX:+UseNUMA&lt;/argument&gt;
                      &lt;argument&gt;-Xms1g&lt;/argument&gt;
                      &lt;argument&gt;-Xmx1g&lt;/argument&gt;
                      &lt;argument&gt;-classpath&lt;/argument&gt;
                      &lt;argument&gt;target/lib/*;target/structr-ui-0.8.2.jar&lt;/argument&gt;
                      &lt;argument&gt;org.structr.Ui&lt;/argument&gt;
                  &lt;/arguments&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>The entire pom.xml reads</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;org.structr&lt;/groupId&gt;
          &lt;artifactId&gt;structr&lt;/artifactId&gt;
          &lt;version&gt;0.8.2&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;groupId&gt;org.structr&lt;/groupId&gt;
      &lt;artifactId&gt;structr-ui&lt;/artifactId&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
      &lt;version&gt;0.8.2&lt;/version&gt;
      &lt;name&gt;structr-ui&lt;/name&gt;
      &lt;description&gt;Structr is an open source framework based on the popular Neo4j graph database.&lt;/description&gt;
      &lt;developers&gt;
          &lt;developer&gt;
              &lt;name&gt;Axel Morgner&lt;/name&gt;
              &lt;email&gt;am@structr.org&lt;/email&gt;
          &lt;/developer&gt;
          &lt;developer&gt;
              &lt;name&gt;Christian Morgner&lt;/name&gt;
              &lt;email&gt;cm@structr.org&lt;/email&gt;
          &lt;/developer&gt;
      &lt;/developers&gt;
      &lt;url&gt;http://structr.org&lt;/url&gt;
  
      &lt;properties&gt;
          &lt;netbeans.hint.license&gt;structr-agpl30&lt;/netbeans.hint.license&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;/properties&gt;
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;neo4j-releases&lt;/id&gt;
              &lt;url&gt;http://m2.neo4j.org/content/repositories/releases&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;neo4j-snapshots&lt;/id&gt;
              &lt;url&gt;http://m2.neo4j.org/content/repositories/snapshots&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;google-diff-patch-match&lt;/id&gt;
              &lt;name&gt;google-diff-patch-match&lt;/name&gt;
              &lt;url&gt;http://google-diff-match-patch.googlecode.com/svn/trunk/maven/&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;jodd&lt;/id&gt;
              &lt;url&gt;http://repo1.maven.org/maven2/org/jodd/&lt;/url&gt;
          &lt;/repository&gt;
          &lt;!--        &lt;repository&gt;
              &lt;id&gt;alfresco-releases&lt;/id&gt;
              &lt;url&gt;https://maven.alfresco.com/nexus/content/repositories/releases&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;alfresco-snapshots&lt;/id&gt;
              &lt;url&gt;https://maven.alfresco.com/nexus/content/repositories/snapshots&lt;/url&gt;
          &lt;/repository&gt;--&gt;
          &lt;repository&gt;
              &lt;id&gt;snapshots.maven.structr.org&lt;/id&gt;
              &lt;url&gt;http://maven.structr.org/artifactory/snapshot&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;releases.maven.structr.org&lt;/id&gt;
              &lt;url&gt;http://maven.structr.org/artifactory/release&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;${project.groupId}&lt;/groupId&gt;
              &lt;artifactId&gt;structr-server&lt;/artifactId&gt;
              &lt;version&gt;${project.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.11&lt;/version&gt;
              &lt;type&gt;jar&lt;/type&gt;
              &lt;scope&gt;test&lt;/scope&gt;
              &lt;optional&gt;false&lt;/optional&gt;
          &lt;/dependency&gt;
          &lt;!--        &lt;dependency&gt;
                  &lt;artifactId&gt;urlrewritefilter&lt;/artifactId&gt;
                  &lt;groupId&gt;org.tuckey&lt;/groupId&gt;
                  &lt;type&gt;jar&lt;/type&gt;
                  &lt;version&gt;4.0.4&lt;/version&gt;
          &lt;/dependency&gt;--&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;diff_match_patch&lt;/groupId&gt;
              &lt;artifactId&gt;diff_match_patch&lt;/artifactId&gt;
              &lt;version&gt;current&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.pegdown&lt;/groupId&gt;
              &lt;artifactId&gt;pegdown&lt;/artifactId&gt;
              &lt;version&gt;1.1.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.java&lt;/groupId&gt;
              &lt;artifactId&gt;textile-j&lt;/artifactId&gt;
              &lt;version&gt;2.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.ws.rs&lt;/groupId&gt;
              &lt;artifactId&gt;javax.ws.rs-api&lt;/artifactId&gt;
              &lt;version&gt;2.0-m09&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-client&lt;/artifactId&gt;
              &lt;version&gt;1.9-ea04&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!--        &lt;dependency&gt;
              &lt;groupId&gt;org.neo4j&lt;/groupId&gt;
              &lt;artifactId&gt;neo4j-rest-graphdb&lt;/artifactId&gt;
              &lt;version&gt;1.9.5&lt;/version&gt;
          &lt;/dependency&gt;--&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.flagstone&lt;/groupId&gt;
              &lt;artifactId&gt;transform&lt;/artifactId&gt;
              &lt;version&gt;3.0.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jsoup&lt;/groupId&gt;
              &lt;artifactId&gt;jsoup&lt;/artifactId&gt;
              &lt;version&gt;1.7.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jodd&lt;/groupId&gt;
              &lt;artifactId&gt;jodd-lagarto&lt;/artifactId&gt;
              &lt;version&gt;3.4.5&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!--        &lt;dependency&gt;
              &lt;groupId&gt;org.jodd&lt;/groupId&gt;
              &lt;artifactId&gt;jodd-http&lt;/artifactId&gt;
              &lt;version&gt;3.4.5&lt;/version&gt;
          &lt;/dependency&gt;--&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-compress&lt;/artifactId&gt;
              &lt;version&gt;1.4.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-lang&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
              &lt;version&gt;2.6&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-codec&lt;/groupId&gt;
              &lt;artifactId&gt;commons-codec&lt;/artifactId&gt;
              &lt;version&gt;1.8&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-httpclient&lt;/groupId&gt;
              &lt;artifactId&gt;commons-httpclient&lt;/artifactId&gt;
              &lt;version&gt;3.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-net&lt;/groupId&gt;
              &lt;artifactId&gt;commons-net&lt;/artifactId&gt;
              &lt;version&gt;3.3&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-fileupload&lt;/groupId&gt;
              &lt;artifactId&gt;commons-fileupload&lt;/artifactId&gt;
              &lt;version&gt;1.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.mockito&lt;/groupId&gt;
              &lt;artifactId&gt;mockito-all&lt;/artifactId&gt;
              &lt;version&gt;1.9.5&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.oltu.oauth2&lt;/groupId&gt;
              &lt;artifactId&gt;org.apache.oltu.oauth2.client&lt;/artifactId&gt;
              &lt;version&gt;0.31&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.twitter4j&lt;/groupId&gt;
              &lt;artifactId&gt;twitter4j-core&lt;/artifactId&gt;
              &lt;version&gt;3.0.5&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.ftpserver&lt;/groupId&gt;
              &lt;artifactId&gt;ftpserver-core&lt;/artifactId&gt;
              &lt;version&gt;1.0.6&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;resources&gt;
              &lt;resource&gt;
                  &lt;directory&gt;src/main/resources&lt;/directory&gt;
              &lt;/resource&gt;
          &lt;/resources&gt;
          &lt;testResources&gt;
              &lt;testResource&gt;
                  &lt;directory&gt;src/main/resources&lt;/directory&gt;
              &lt;/testResource&gt;
          &lt;/testResources&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.2.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;executable&gt;java&lt;/executable&gt;
                      &lt;arguments&gt;
                          &lt;argument&gt;-server&lt;/argument&gt;
                          &lt;argument&gt;-Dfile.encoding=utf-8&lt;/argument&gt;
                          &lt;argument&gt;-XX:+UseNUMA&lt;/argument&gt;
                          &lt;argument&gt;-Xms1g&lt;/argument&gt;
                          &lt;argument&gt;-Xmx1g&lt;/argument&gt;
                          &lt;argument&gt;-classpath&lt;/argument&gt;
                          &lt;argument&gt;target/lib/*;target/structr-ui-0.8.2.jar&lt;/argument&gt;
                          &lt;argument&gt;org.structr.Ui&lt;/argument&gt;
                      &lt;/arguments&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&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;2.3.2&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.7&lt;/source&gt;
                      &lt;target&gt;1.7&lt;/target&gt;
                      &lt;debug&gt;true&lt;/debug&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;copy-dependencies&lt;/id&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;copy-dependencies&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;outputDirectory&gt;${project.build.directory}/lib&lt;/outputDirectory&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-jar-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                              &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                              &lt;classpathPrefix&gt;lib&lt;/classpathPrefix&gt;
                          &lt;/manifest&gt;
                      &lt;/archive&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;descriptors&gt;
                          &lt;descriptor&gt;src/main/resources/assemblies/dist.xml&lt;/descriptor&gt;
                      &lt;/descriptors&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;make-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;plugin&gt;
                  &lt;groupId&gt;org.vafer&lt;/groupId&gt;
                  &lt;artifactId&gt;jdeb&lt;/artifactId&gt;
                  &lt;version&gt;1.0.1&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;jdeb&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;timestamped&gt;true&lt;/timestamped&gt;
                              &lt;controlDir&gt;${basedir}/src/main/deb/control&lt;/controlDir&gt;
                              &lt;dataSet&gt;
                                  &lt;data&gt;
                                      &lt;src&gt;${project.build.directory}/${project.build.finalName}.jar&lt;/src&gt;
                                      &lt;type&gt;file&lt;/type&gt;
                                      &lt;dst&gt;structr-ui.jar&lt;/dst&gt;
                                      &lt;mapper&gt;
                                          &lt;type&gt;perm&lt;/type&gt;
                                          &lt;prefix&gt;/usr/lib/${project.artifactId}/&lt;/prefix&gt;
                                      &lt;/mapper&gt;
                                  &lt;/data&gt;
  
                                  &lt;data&gt;
                                      &lt;src&gt;${project.build.directory}/lib&lt;/src&gt;
                                      &lt;type&gt;directory&lt;/type&gt;
                                      &lt;mapper&gt;
                                          &lt;type&gt;perm&lt;/type&gt;
                                          &lt;prefix&gt;/usr/lib/${project.artifactId}/lib&lt;/prefix&gt;
                                          &lt;filemode&gt;755&lt;/filemode&gt;
                                      &lt;/mapper&gt;
                                  &lt;/data&gt;
  
                                  &lt;data&gt;
                                      &lt;src&gt;${basedir}/seed.zip&lt;/src&gt;
                                      &lt;type&gt;file&lt;/type&gt;
                                      &lt;mapper&gt;
                                          &lt;type&gt;perm&lt;/type&gt;
                                          &lt;prefix&gt;/usr/lib/${project.artifactId}/&lt;/prefix&gt;
                                          &lt;filemode&gt;755&lt;/filemode&gt;
                                      &lt;/mapper&gt;
                                  &lt;/data&gt;
  
                                  &lt;data&gt;
                                      &lt;src&gt;${basedir}/src/main/deb/bin&lt;/src&gt;
                                      &lt;type&gt;directory&lt;/type&gt;
                                      &lt;mapper&gt;
                                          &lt;type&gt;perm&lt;/type&gt;
                                          &lt;prefix&gt;/usr/lib/${project.artifactId}/bin&lt;/prefix&gt;
                                          &lt;filemode&gt;755&lt;/filemode&gt;
                                      &lt;/mapper&gt;
                                  &lt;/data&gt;
  
                                  &lt;data&gt;
                                      &lt;src&gt;${basedir}/src/main/deb/init.d&lt;/src&gt;
                                      &lt;type&gt;directory&lt;/type&gt;
                                      &lt;mapper&gt;
                                          &lt;type&gt;perm&lt;/type&gt;
                                          &lt;prefix&gt;/etc/init.d&lt;/prefix&gt;
                                          &lt;filemode&gt;755&lt;/filemode&gt;
                                      &lt;/mapper&gt;
                                  &lt;/data&gt;
                              &lt;/dataSet&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-source-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.2.1&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;attach-sources&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;jar&lt;/goal&gt;
                          &lt;/goals&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-javadoc-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.9.1&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;attach-javadocs&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;jar&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
          &lt;finalName&gt;${project.artifactId}-${project.version}&lt;/finalName&gt;
          &lt;!-- Added to make m2e happy, thanks to http://stackoverflow.com/questions/8706017/maven-dependency-plugin-goals-copy-dependencies-unpack-is-not-supported-b --&gt;
          &lt;pluginManagement&gt;
              &lt;plugins&gt;
                  &lt;!-- Ignore/Execute plugin execution --&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.eclipse.m2e&lt;/groupId&gt;
                      &lt;artifactId&gt;lifecycle-mapping&lt;/artifactId&gt;
                      &lt;version&gt;1.0.0&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;lifecycleMappingMetadata&gt;
                              &lt;pluginExecutions&gt;
                                  &lt;!-- copy-dependency plugin --&gt;
                                  &lt;pluginExecution&gt;
                                      &lt;pluginExecutionFilter&gt;
                                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                                          &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
                                          &lt;versionRange&gt;[1.0.0,)&lt;/versionRange&gt;
                                          &lt;goals&gt;
                                              &lt;goal&gt;copy-dependencies&lt;/goal&gt;
                                          &lt;/goals&gt;
                                      &lt;/pluginExecutionFilter&gt;
                                      &lt;action&gt;
                                          &lt;ignore /&gt;
                                      &lt;/action&gt;
                                  &lt;/pluginExecution&gt;
                              &lt;/pluginExecutions&gt;
                          &lt;/lifecycleMappingMetadata&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
      &lt;/build&gt;
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;release-sign-artifacts&lt;/id&gt;
              &lt;activation&gt;
                  &lt;property&gt;
                      &lt;name&gt;performRelease&lt;/name&gt;
                      &lt;value&gt;true&lt;/value&gt;
                  &lt;/property&gt;
              &lt;/activation&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-gpg-plugin&lt;/artifactId&gt;
                          &lt;version&gt;1.4&lt;/version&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;id&gt;sign-artifacts&lt;/id&gt;
                                  &lt;phase&gt;verify&lt;/phase&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;sign&lt;/goal&gt;
                                  &lt;/goals&gt;
                              &lt;/execution&gt;
                          &lt;/executions&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  
      &lt;licenses&gt;
          &lt;license&gt;
              &lt;name&gt;GNU General Public License, Version 3&lt;/name&gt;
              &lt;url&gt;http://www.gnu.org/licenses/agpl-3.0-standalone.html&lt;/url&gt;
              &lt;comments&gt;
                  Copyright (C) 2010-2013 Axel Morgner, structr &amp;lt;structr@structr.org&amp;gt;
  
                  This file is part of structr &amp;lt;http://structr.org&amp;gt;.
  
                  structr is free software: you can redistribute it and/or modify
                  it under the terms of the GNU Affero General Public License as
                  published by the Free Software Foundation, either version 3 of the
                  License, or (at your option) any later version.
  
                  structr is distributed in the hope that it will be useful,
                  but WITHOUT ANY WARRANTY; without even the implied warranty of
                  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                  GNU General Public License for more details.
  
                  You should have received a copy of the GNU Affero General Public License
                  along with structr.  If not, see &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
              &lt;/comments&gt;
          &lt;/license&gt;
      &lt;/licenses&gt;
  
      &lt;scm&gt;
          &lt;url&gt;https://github.com/structr/structr&lt;/url&gt;
          &lt;connection&gt;scm:git:git@github.com:structr/structr.git&lt;/connection&gt;
      &lt;/scm&gt;
  
      &lt;distributionManagement&gt;
          &lt;!--        &lt;repository&gt;
              &lt;id&gt;releases.maven.structr.org&lt;/id&gt;
              &lt;name&gt;maven.structr.org-releases&lt;/name&gt;
              &lt;url&gt;http://maven.structr.org/artifactory/release&lt;/url&gt;
          &lt;/repository&gt;
          &lt;snapshotRepository&gt;
              &lt;id&gt;snapshots.maven.structr.org&lt;/id&gt;
              &lt;name&gt;maven.structr.org-snapshots&lt;/name&gt;
              &lt;url&gt;http://maven.structr.org/artifactory/snapshot&lt;/url&gt;
          &lt;/snapshotRepository&gt;--&gt;
          &lt;repository&gt;
              &lt;id&gt;sonatype-nexus-staging&lt;/id&gt;
              &lt;name&gt;Maven Central Staging&lt;/name&gt;
              &lt;url&gt;https://oss.sonatype.org/service/local/staging/deploy/maven2&lt;/url&gt;
          &lt;/repository&gt;
          &lt;snapshotRepository&gt;
              &lt;id&gt;sonatype-nexus-snapshots&lt;/id&gt;
              &lt;name&gt;Maven Central Snapshots&lt;/name&gt;
              &lt;url&gt;https://oss.sonatype.org/content/repositories/snapshots&lt;/url&gt;
          &lt;/snapshotRepository&gt;
      &lt;/distributionManagement&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>The <code>mvn exec:exec</code> statement looks equivalent to the java JVM statement. This question may be basically; What is maven doing differently than java, that in the maven case making the program run correctly?</p>
  
  <p><strong>Edit - additional maven and java debugging information</strong></p>
  
  <p>On <code>mvn -X exec:exec</code>, The output is given here <a href="http://roberthoff.com/files/mvn_exec_trace.txt" rel="nofollow">http://roberthoff.com/files/mvn_exec_trace.txt</a></p>
  
  <p>And on <code>java -server -Dfile.encoding=utf-8 -XX:+UseNUMA -Xms1g -Xmx1g -classpath target/lib/*
  ;target/structr-ui-0.8.2.jar org.structr.Ui</code> we have <a href="http://roberthoff.com/files/java_trace.txt" rel="nofollow">http://roberthoff.com/files/java_trace.txt</a></p>