使用maven-nar-plugin在Maven中构建C ++项目 [英] build C++ projects in Maven with maven-nar-plugin

查看:1644
本文介绍了使用maven-nar-plugin在Maven中构建C ++项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人使用maven-nar-plugin为不同平台构建C ++代码,使用不同的编译器?如果有人请给我更多的信息关于这一点。
我只是想知道如何可以为Naven文件构建的不同平台与maven。我知道为了能够在特定平台上构建项目,您应该在该平台上运行构建,并使用该平台的特定编译器和链接器。但我的经验是与Java项目和Maven相关的,因为你已经知道java是漂亮的平台移植,所以我没有遇到像瘦到现在的问题。
所以,任何帮助和细节如何使用maven-nar-plugin构建项目将被欣慰!
感谢

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 wondering how can be a NAR file built for different platforms with maven. I know that in order to be able to build a project on a specific platform you should run the build on that platform, and use the specific compilers and linkers of that platform. But my experience is related to Java projects and Maven and as you already know java is pretty platform portable so I've not experienced problems like thin until now. So, any help and details about how to build projects with maven-nar-plugin would be appreaciated! Thanks

推荐答案

目前,使用maven-nar-plugin构建多平台二进制文件最确定的方法是在不同的平台上执行,而不是尝试基于交叉编译的解决方案。

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.

例如, ImageJ 项目使用maven-nar-plugin构建小型

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.

为了实现这一点,项目有一个Jenkins CIS在一个Linux服务器,带有Jenkins从属设备的VirtualBox中的Windows 7 64位VM和一个OS X桌面Jenkins从属设备,每个都为其各自的平台执行Maven构建。

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.

这是相当参与设置; 此Iconj问题跟踪器的详细说明。

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

在一个相关的注释,一组感兴趣的开发人员最近复活了maven-nar-plugin,将官方资源库迁移到新的maven-nar组织。感兴趣的项目之一是交叉编译,这将使得更容易在同一平台上构建多个AOL的本地二进制文件,而无需借助Jenkins的奴隶。但是有很多挑战(例如,GCC经常改变行为),而且还不容易做到。我们邀请感兴趣的开发者参加有关新的 maven-nar-plugin邮件发送列表

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!

这篇关于使用maven-nar-plugin在Maven中构建C ++项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆