Hi Ralph,
RalphWH wrote:
> Hello All,
>
> I have a project that is packaging into a jar and is using the
> freehep-nar-plugin to download and unpack the needed .nar
> files. This part
> works great. But what I haven't been able to figure out is
> how to then copy
> the .so files (in the .nar downloaded files) into the
> packaged .jar or into
> the assembly component .zip files. Since the nar files are downloaded
> and unpacked in the repository, how can I go about copying them
> into the target/
> directory?
>
> This is the download and unpack snippet:
> <plugin>
> <groupId>org.freehep</groupId>
> <artifactId>freehep-nar-plugin</artifactId>
> <executions>
> <execution>
> <id>download-nar</id>
> <phase>package</phase>
> <goals>
> <goal>nar-download</goal>
> <goal>nar-unpack</goal>
Add the nar-assebmly goal also:
<goal>nar-assembly</goal>
> </goals>
> </execution>
> </executions>
And configure here which version you'd like to access:
<configuration>
<classifiers>
<classifier>x86-Windows-msvc-DUMMY</classifier>
</classifiers>
</configuration>
Note, that the DUMMY part might not be necessary for newer versions of the
plugin. For some reason, we're still using a quite old one.
> </plugin>
>
> I have tried setting the targetDirectory tag in
> configuration, but this is
> ignored by the unpack goal. I have also tried to use the
> maven-dependency-plugin, but this seems to ignore nar files
> completely.
>
> I've also tried to use mvn's <dependency> tag directly with
> <type>nar</type>, but this doesn't work because the nar file
> that it tries
> to download doesn't include the ${aol} (ex:
> ${file_name}-i386-Linux-g++-shared.nar). It just attached .nar to the
> end of the artifactId.
>
> It seems like I'm missing something obvious here but I
> haven't been able to
> figure it out. Any ideas would be greatly appreciated. Thanks!
Some words of warnign though: While the NAR-plugin is a great solution for the
complete native stuff, it is quite not possible to get in contact with anyone
of the devs. The only communication offer the NAR-plugin people are doing is a
forum where no-one answers. So you're completely on your own for any kind of
support and you might better have a look at the native plugin from Maven's Mojo
project.
- Jörg
BTW: The plugin is has another bug, since it will extract the content of the
nar plugin always into the target directory of the project where the build has
been started i.e. it will put the files into the wrong directory for
multi-module builds!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]