title: Maven webstart plugin not finding dependencies
body: <p>Hoping someone can help me with this strange one.  I’m trying to run the webstart plugin but it doesn’t seem to be able to find the main class within the jar being produce.  The pom is as simple as it can get, and the class Test exists, and is being compiled and placed in the jar.  Can someone please point me in the right direction?</p>
  
  <pre><code>&lt;project&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;name&gt;Desktop Components&lt;/name&gt;
    &lt;groupId&gt;com.test&lt;/groupId&gt;
    &lt;artifactId&gt;test&lt;/artifactId&gt;
    &lt;version&gt;1.0&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
    &lt;build&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.codehaus.mojo.webstart&lt;/groupId&gt;
          &lt;artifactId&gt;webstart-maven-plugin&lt;/artifactId&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;phase&gt;process-resources&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;jnlp-download-servlet&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
  
          &lt;configuration&gt;
            &lt;jnlpFiles&gt;
              &lt;jnlpFile&gt;
                &lt;jarResources&gt;
                  &lt;jarResource&gt;
                    &lt;groupId&gt;com.test&lt;/groupId&gt;
                    &lt;artifactId&gt;test&lt;/artifactId&gt;
                    &lt;version&gt;1.0&lt;/version&gt;
                    &lt;mainClass&gt;Test&lt;/mainClass&gt;
                  &lt;/jarResource&gt;
                &lt;/jarResources&gt;
              &lt;/jnlpFile&gt;
            &lt;/jnlpFiles&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Here is the Maven trace:</p>
  
  <pre><code>C:\TEMP\webstart-test&gt;mvn webstart:jnlp –e
  + Error stacktraces are turned on.
  [INFO] Scanning for projects...
  [INFO] ------------------------------------------------------------------------
  [INFO] Building Desktop Components
  [INFO]    task-segment: [webstart:jnlp] (aggregator-style)
  [INFO] ------------------------------------------------------------------------
  [INFO] Preparing webstart:jnlp
  [INFO] ------------------------------------------------------------------------
  [INFO] Building Desktop Components
  [INFO] ------------------------------------------------------------------------
  [INFO] [resources:resources {execution: default-resources}]
  [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
  [INFO] skip non existing resourceDirectory C:\TEMP\webstart-test\src\main\resources
  [INFO] [webstart:jnlp-download-servlet {execution: default}]
  [INFO] No templateFilename found for launch2.jnlp. Will use the default template.
  [INFO] No resources found in C:\TEMP\webstart-test\src\main\jnlp\resources
  Downloading: http://repo1.maven.org/maven2/com/test/test/1.0/test-1.0.pom
  [INFO] Unable to find resource 'com.test:test:pom:1.0' in repository central (http://repo1.maven.org/maven2)
  No template specified Using default one.
  
  ***** Webstart JAR URL: jar:file:/C:/apache-maven-2.2.1/repo/org/codehaus/mojo/webstart/webstart-maven-plugin/1.0-alpha-2/webstart-maven-plugin-1.0-alpha-2.jar!
  /
  [INFO] [compiler:compile {execution: default-compile}]
  [INFO] Nothing to compile - all classes are up to date
  [INFO] [resources:testResources {execution: default-testResources}]
  [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
  [INFO] skip non existing resourceDirectory C:\TEMP\webstart-test\src\test\resources
  [INFO] [compiler:testCompile {execution: default-testCompile}]
  [INFO] No sources to compile
  [INFO] [surefire:test {execution: default-test}]
  [INFO] No tests to run.
  [INFO] [jar:jar {execution: default-jar}]
  [INFO] Building jar: C:\TEMP\webstart-test\target\test-1.0.jar
  [INFO] [webstart:jnlp {execution: default-cli}]
  [INFO] No resources found in C:\TEMP\webstart-test\src\main\jnlp\resources
  [INFO] ------------------------------------------------------------------------
  [ERROR] BUILD ERROR
  [INFO] ------------------------------------------------------------------------
  [INFO] Failure to run the plugin:
  [INFO] ------------------------------------------------------------------------
  [INFO] Trace
  </code></pre>
  
  <p>The trace follows</p>
  
  <pre><code>org.apache.maven.lifecycle.LifecycleExecutionException: Failure to run the plugin:
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
          at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:592)
          at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
          at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
          at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
          at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
  </code></pre>
  
  <p>Now the Caused by trace</p>
  
  <pre><code>Caused by: org.apache.maven.plugin.MojoExecutionException: Failure to run the plugin:
          at org.codehaus.mojo.webstart.AbstractJnlpMojo.execute(AbstractJnlpMojo.java:289)
          at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
          ... 17 more
  
  Caused by: java.lang.NullPointerException
          at org.codehaus.mojo.webstart.AbstractJnlpMojo.execute(AbstractJnlpMojo.java:214)
          ... 19 more
  </code></pre>
  
  <p>And the final Maven trace</p>
  
  <pre><code>[INFO] ------------------------------------------------------------------------
  [INFO] Total time: 9 seconds
  [INFO] Finished at: Fri Nov 13 11:16:54 GMT 2009
  [INFO] Final Memory: 12M/22M
  [INFO] ------------------------------------------------------------------------
  </code></pre>