[ 
http://jira.codehaus.org/browse/MWEBSTART-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_107581
 ] 

Trey Sleeper commented on MWEBSTART-8:
--------------------------------------

Jerome, 
  I've got a patch developed for supporting native libraries as we use them.  
All native dependencies are already packaged into jars by platform.  The 
direction I took was to add them as normal dependencies so they'd be 
signed/packed as normal, but added filtering in the <jnlp> config section of 
the pom.  Ex:
...
        <dependencies>
...
                <dependency>
                        <groupId>blah.jni.win32</groupId>
                        <artifactId>hello-win32</artifactId>
                        <version>1.0-SNAPSHOT</version>
                </dependency>
                <dependency>
                        <groupId>blah.jni.linux</groupId>
                        <artifactId>hello-linux</artifactId>
                        <version>1.0-SNAPSHOT</version>
                </dependency>
...
        </dependencies>
...
        <jnlp>
                <outputFile>pocJws.jnlp</outputFile>
                <mainClass>blah.Main</mainClass>
                <nativeLibs>
                        <nativeLib>
                                <groupId>blah.jni.win32</groupId>
                                <artifactId>hello-win32</artifactId>
                                <os>Windows</os>
                        </nativeLib>
                        <nativeLib>
                                <groupId>blah.jni.linux</groupId>
                                <artifactId>hello-linux</artifactId>
                                <os>Linux</os>
                        </nativeLib>
                </nativeLibs>
        </jnlp>
...

The <nativeLib> element will also accept an <arch> element.  All <nativeLib> 
elements with matching os/arch combinations will be grouped into the same 
<resources> tag in the jnlp.  The template placeholder is just a $nativeLibs 
entry

...
  <resources>
    <j2se version="1.5+"/>
    $dependencies
  </resources>
  $nativeLibs
  <application-desc main-class="$mainClass"/>
...

I'm new to open-source contribution, so a few questions:
1.  Does this solution look passable to you?
2.  How do I get the patch to you?
3.  What sort of test case coverage are you looking for?


> support native libraries
> ------------------------
>
>                 Key: MWEBSTART-8
>                 URL: http://jira.codehaus.org/browse/MWEBSTART-8
>             Project: Maven 2.x Webstart Plugin
>          Issue Type: New Feature
>            Reporter: Jerome Lacoste
>            Assignee: Jerome Lacoste
>             Fix For: 1.0-alpha-2
>
>         Attachments: MWEBSTART-8.diff
>
>
> nativelib are resiyrces that are tagged in the following way in a jnlp file:
> <resources os="Windows">
>   <nativelib href="thedll.jar"/>
> </resources>
> To support nativelib at the same level of simplicity that the usual 
> dependencies are supported requires to:
> - automatically identify them from 
> - automatically wrap .dll .so files in jar files
> Q: what about jar files that are architecture dependent?
> In maven 1 it was possible to attach some properties to the dependencies. But 
> we cannot use that anymore.
> We could
> 1- mark the dependencies in the pom using the correct <type> in the pom. E.g. 
> <type>dll</type>
> 2- make the plugin automatically wrap the native dependency inside a jar.
> 3- automatically fill up the <nativelib> elements using some sort of filter 
> mecanism
> <resources os="Windows">
>   $allDependencies.filter("dll")
> </resources>
> ??
> $dependencies would implicitly map to $allDependencies.filter("jar") for 
> backward compatibility.
> Better: the filter() argument might be a JDK 1.4 regex matching a dependency 
> notation. That way we solve the architecture  issue (we can match names, 
> types, etc..)
> That's just one idea. We can perhaps do better? Let me know how you see it.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to