sakhtar1979 / onejar-maven-plugin

Automatically exported from code.google.com/p/onejar-maven-plugin
0 stars 0 forks source link

Support /binlib for native libraries #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
onejar-maven-plugin does not expose configuration options to add native
libraries to the /binlib jar directory as onejar does :
http://one-jar.sourceforge.net/index.php?page=introduction&file=native

Original issue reported on code.google.com by eskato...@gmail.com on 19 Mar 2009 at 10:02

GoogleCodeExporter commented 9 years ago
Good point. Will do.

Original comment by hugo.josefson.old@gmail.com on 19 Mar 2009 at 12:13

GoogleCodeExporter commented 9 years ago
I don't know yet when I will need it but if I implements it before you get 
enough
time to do it, will you accept a contribution ?

Original comment by eskato...@gmail.com on 19 Mar 2009 at 1:53

GoogleCodeExporter commented 9 years ago
Of course!

Just attach your patch to this issue. We'll review it, commit it to trunk and 
perform
a SNAPSHOT release.

After the SNAPSHOT release has been verified to work, we can release 1.3.0.

Original comment by hugo.josefson.old@gmail.com on 19 Mar 2009 at 2:10

GoogleCodeExporter commented 9 years ago
What about a FileSet mojo parameter named binlib ?

This way we could reuse the maven include/exclude mechanism.

Original comment by eskato...@gmail.com on 19 Mar 2009 at 2:34

GoogleCodeExporter commented 9 years ago
Sounds good.

Original comment by hugo.josefson.old@gmail.com on 19 Mar 2009 at 2:51

GoogleCodeExporter commented 9 years ago
Ok, I took time to implement and test it. See the attached patch.

Example configuration (hoping xml will get posted correctly) :

<plugin>
    <groupId>org.dstovall</groupId>
    <artifactId>onejar-maven-plugin</artifactId>
    <version>1.2.4-SNAPSHOT</version>
    <executions>
        <execution>
            <goals><goal>one-jar</goal></goals>
            <configuration>
                <mainClass>${mainClass}</mainClass>
                <binlibs>
                    <fileSet>
                        <directory>${project.build.directory}/dllextract</directory>
                        <includes>
                            <include>test.dll</include>
                        </includes>
                    </fileSet>
                </binlibs>
            </configuration>
        </execution>
    </executions>
</plugin>

Best regards

Paul

Original comment by eskato...@gmail.com on 19 Mar 2009 at 8:05

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you.

I have now applied your patch and deployed version 1.2.4-SNAPSHOT with it 
included.

Please clear out your local m2 repo ("rm -rf ~/.m2/repository/org/dstovall") 
and try
using version 1.2.4-SNAPSHOT in a test project. Let me know it everything works 
as
expected.

Original comment by hugo.josefson.old@gmail.com on 19 Mar 2009 at 11:16

GoogleCodeExporter commented 9 years ago
Hugo,

Everything is working fine here with the deployed snapshot.

Paul

Original comment by eskato...@gmail.com on 20 Mar 2009 at 8:30

GoogleCodeExporter commented 9 years ago
I have now also verified that when the new version is used in a project that
*doesn't* take advantage the new feature, it still performs exactly as expected 
:)

Released version 1.3.0. Thank you Paul for your contribution!

Original comment by hugo.josefson.old@gmail.com on 22 Mar 2009 at 5:52

GoogleCodeExporter commented 9 years ago
\o/

You're welcome Hugo, now we're using the 1.3.0 release ;)

Paul

Original comment by eskato...@gmail.com on 22 Mar 2009 at 6:04