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

纵饮孤独 提交于 2019-12-03 08:05:00

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!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!