Bundle native dependencies in runnable .jar with Maven

后端 未结 3 953
借酒劲吻你
借酒劲吻你 2020-12-15 06:43

I have a project managed in Maven that has some native dependencies (LWJGL).

Everything works fine in development, but now I want to set up Maven so

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-15 07:11

    Did you try to use maven-assembly-plugin here is an example :

    
       
          
             maven-assembly-plugin
             
             
                 
                    your.main.Class
                 
             
             
                 jar-with-dependencies
             
             
           
       
    
    

    And for your native dependencies you may want to use Bundle-NativeCode in your manifest file. See http://wiki.osgi.org/wiki/Bundle-NativeCode.

    You also may want to have a look at the maven-bundle-plugin : http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html to generate it with Maven.

提交回复
热议问题