build C++ projects in Maven with maven-nar-plugin

前端 未结 1 2049
一生所求
一生所求 2021-02-10 08:23

has anyone using maven-nar-plugin to build C++ code for different platforms, using different compilers? If there is someone please give me more info regarding this. I am just wo

相关标签:
1条回答
  • 2021-02-10 08:32

    Currently, the most surefire way to build multiple platform binaries with maven-nar-plugin is to actually do it on different platforms, rather than attempting a cross-compilation-based solution.

    For example, the ImageJ project uses maven-nar-plugin to build a small native launcher for Linux, OS X and Windows, 32-bit and 64-bit versions.

    To accomplish this, the project has a Jenkins CIS on a Linux server, a Windows 7 64-bit VM in VirtualBox with a Jenkins slave, and an OS X desktop Jenkins slave, each of which performs the Maven build for its respective platforms.

    It was quite involved to set up; there are detailed instructions in this ticket of the ImageJ issue tracker.

    On a related note, a group of interested developers have recently resurrected maven-nar-plugin, migrating the official repository to a new maven-nar organization. One of the items of interest is cross-compilation, which would make it easier to build native binaries for multiple AOLs on the same platform without resorting to Jenkins slaves. But there are many challenges (e.g., GCC changes behavior often), and it is not yet easy to do. We invite interested developers to join the discussion on the new maven-nar-plugin mailing list!

    0 讨论(0)
提交回复
热议问题