mojohaus / appassembler

https://www.mojohaus.org/appassembler/
MIT License
93 stars 49 forks source link

Copy to target repository DLL dependencies #39

Open ramiromagalhaes opened 8 years ago

ramiromagalhaes commented 8 years ago

I have a project that depends on JACOB, a library that depends on a DLL to invoke Windows' ActiveX components. I declare the JACOB's DLL dependency in my project's pom.xml like that:

        <dependency>
            <groupId>net.sf.jacob-project</groupId>
            <artifactId>jacob</artifactId>
            <classifier>x64</classifier>
            <type>dll</type>
            <scope>runtime</scope>
        </dependency>

Note that I declare JACOB's version in a parent POM.

After running appassembler:assemble goal, the DLL isn't copied to my target repository. It does not matter if I change the scope to something else. All other dependencies are, though. This seems to be a problem to a few other users.

This is a request to update appassembler to allow copying of DLLs to the target repository. Alternatively, an user should specify where DLLs are to be placed and appassembler could automaticaly add to the script the needed -Djava.library.path parameter.

dantran commented 8 years ago

appassembler is very specific to java app, so it only copies jar to the generated repo. You can use maven-dependency-plugin to copy over

ramiromagalhaes commented 8 years ago

What do you mean by "very specific to java app"? This application I'm writing is a JavaFX standalone application. JACOB is a Java library that uses JNI to send messages to Microsoft COM+ Objects. All that belongs to the Java platform, except for COM+, obviously.

I can always use maven-dependency-plugin to copy any dependency, but I chose appassembler because it fully cover my needs, except for not copying a declared dependency of a DLL. Changing appsembler to allow copying such dependency seems to be a natural extension to the plugin, since it si very coherent to appassembler's main purpose.

dantran commented 8 years ago

Reasonable use case, i just provide a workaround. PR is very welcome :-)

On Wed, May 25, 2016 at 7:44 AM, Ramiro Pereira de Magalhães < notifications@github.com> wrote:

What do you mean by "very specific to java app"? This application I'm writing is a JavaFX standalone application. JACOB is a Java library that uses JNI to send messages to Microsoft COM+ Objects. All that belongs to the Java platform, except for COM+, obviously.

I can always use maven-dependency-plugin to copy any dependency, but I chose appassembler because it fully cover my needs, except for not copying a declared dependency of a DLL. Changing appsembler to allow copying such dependency seems to be a natural extension to the plugin, since it si very coherent to appassembler's main purpose.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/mojohaus/appassembler/issues/39#issuecomment-221598703