On the first attempt this afternoon, the first error I had, resolved when I did "mvn install" before "mvn webstart:jnlp". This will have been the reason what it failed this morning too probably. In any case the updated version from the trunk warned me that it was due the module I am building, so therefor I tried an install which fixed that error.

On the next attempt it nicely signed my jars but I got this error:
Embedded error: Could not load the template file from 'src/jnlp/template.vm'

I am sure I can create my own jnlp template to fix this, but I was wondering if the plugin can't hold a few standard templates, using the same mechanism that the assembly plugin uses:
Either you supply a <templatePath> or a <templateId> property.
Several templates could be already included in the plugin, such as "standalone" and "clientServer" (with a $$codebase to be set by the jnlp servlet).

PS: take a look at the release of the jnlp servlet
https://deployment.dev.java.net/servlets/NewsItemView?newsItemID=3211
to set the server codebase in the jnlp file at runtime.

PPS: I am using this code to find my server codebase on the client:
    /**
     * Uses the jnlp API to determine the webapp context.
* If used outside of webstart, <code>fallBackWebAppContextUrl</code> is returned. * For example this could return <code>http://localhost:8080/mywebapp/</code>.
     *
     * @return the url to the webapp ending with a slash
     */
    public String getWebAppContextUrl() {
        String webAppContextUrl;
        try {
BasicService basicService = (BasicService) ServiceManager.lookup("javax.jnlp.BasicService");
            String codeBase = basicService.getCodeBase().toExternalForm();
            if (!codeBase.endsWith("/")) {
                codeBase += "/";
            }
int webAppContextUrlLength = codeBase.lastIndexOf(jnlpRelativeDirectoryPathFromWebAppContext); webAppContextUrl = codeBase.substring(0, webAppContextUrlLength + 1);
        } catch (UnavailableServiceException e) {
            // TODO logging
            webAppContextUrl = fallBackWebAppContextUrl;
        }
        return webAppContextUrl;
    }

jerome lacoste wrote:
On 1/26/06, Geoffrey De Smet <[EMAIL PROTECTED]> wrote:
I just tested the latest svn version, I am getting a nullpointer:

org.apache.maven.lifecycle.LifecycleExecutionException: Failure to run
the plugin:
         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:556)

<snip/>

Caused by: java.lang.NullPointerException
         at
org.codehaus.mojo.webstart.JnlpMojo.copyFileToDirectoryIfNecessary(JnlpMojo.java:796)
         at
org.codehaus.mojo.webstart.JnlpMojo.processDependency(JnlpMojo.java:606)
         at
org.codehaus.mojo.webstart.JnlpMojo.processDependencies(JnlpMojo.java:564)
         at org.codehaus.mojo.webstart.JnlpMojo.execute(JnlpMojo.java:367)
         ... 18 more

First thought it was because workDirectory wasn't defaulted, but adding
it didn't help to solve it though.

Ouch.

I don't know why artifact.getFile() would return null so I've added
some code to debug.
Could you try the latest version from the trunk, and execute using mvn -X ...?

Thanks.

Jerome

--
With kind regards,
Geoffrey De Smet


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to