Source files in the NAR/JAR file ?

146 views
Skip to first unread message

remi.d...@gmail.com

unread,
Jun 25, 2014, 8:20:49 AM6/25/14
to mave...@googlegroups.com
Hello,

I am pretty new to nar-maven-plugin and I try to apply the Maven approach to embedded devices. I just started a project to switch on/off the light on my STM32F0-discovery board, so I am using the stm32f0 library provided by ST Microelectonics to ease my development.

I'd like to package the source/include files of this library and put a dependency into my project POM. Is it in the philosophy of the nar-maven-plugin to include sources into a package (I haven't seen that in the examples) so that I can choose the compilation options when I build my entire project ? Should I use the maven-source-plugin instead (and have .jar file which is specific to Java) ?

Thanks

Curtis Rueden

unread,
Jul 16, 2014, 4:37:54 PM7/16/14
to remi.d...@gmail.com, NAR Maven plugin
Hi Rémi,

> Is it in the philosophy of the nar-maven-plugin to include sources
> into a package (I haven't seen that in the examples)

Certainly it's not _against_ the philosophy. But I think you are the first person to actively want it. PRs very welcome, as usual! [1]

> Should I use the maven-source-plugin instead (and have .jar file which
> is specific to Java) ?

Yes, I think the maven-source-plugin is the canonical and best practice way of doing sources, including as dependencies, since you can just depend on the -sources artifacts and the use the maven-assembly-plugin to aggregate an uber-JAR (or uber-NAR?) of the results.

Your best bet in the short term might be the approach above, and then copy or move the resulting JAR to a NAR with either maven-resources-plugin copy-resources goal, or the maven-antrun-plugin.

Regards,
Curtis




--
You received this message because you are subscribed to the Google Groups "NAR Maven plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-nar+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rémi Druilhe

unread,
Jul 21, 2014, 12:14:25 PM7/21/14
to mave...@googlegroups.com, remi.d...@gmail.com, ctru...@wisc.edu
Hi Curtis,

Thanks for the answer. So, I did what you said and I used your solution to deploy the sources of my application into my repository. According to me, it is also a good practice than developing another plugin specifically for natives files but I was not sure.

Regards.

Hansaka Perera

unread,
Apr 17, 2018, 11:58:45 AM4/17/18
to NAR Maven plugin
@Rémi did you pursue the idea of creating a plugin? I wanted achieve the same goal for source code analysis and for debugging purposes (gdb).
Reply all
Reply to author
Forward
0 new messages