使用maven2构建基于autotools的C/C++ 包裹
我正在开发一个 MATLAB、Java 和 C/C++ 组件集合,这些组件都可以互操作,但编译/安装步骤明显不同。 我们目前不为 MATLAB 编译任何内容,使用 maven2 进行 Java 构建和单元测试,并使用 autotools 进行 C/C++ 构建和单元测试。
我想使用 maven2 将所有内容移动到单个构建和单元测试系统,但一直无法找到一个插件,允许 C/C++ 代码流保持基于自动工具并简单地将其包装在 Maven 构建中。 必须取消自动工具支持并在 Maven 中重新创建所有依赖项很可能会破坏交易,因此我正在寻找一种让 Maven 和自动工具能够很好地协同工作的方法,而不是必须在两者之间进行选择。
这是可能的,甚至是可取的吗? 是否有我忽略的资源?
I am working on a collection MATLAB, Java, and C/C++ components that all inter-operate, but have distinctly different compilation/installation steps. We currently don't compile anything for MATLAB, use maven2 for our Java build and unit tests, and use autotools for our C/C++ build and unit tests.
I would like to move everything to a single build and unit test system, using maven2, but have not been able to find a plugin that will allow the C/C++ codestream to remain autotools-based and simply wrap it in a maven build. Having to rip out autotools support and recreate all the dependencies in maven is most likely a deal-breaker, so I'm looking for a way for maven and autotools to play nicely together, rather than having to choose between the two.
Is this possible or even desirable? Are there resources out there that I have overlooked?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不太了解 autotools,但是你不能使用 maven exec 插件,它可以让你执行系统命令(或Java程序)? 例如:
我没有测试上面的 pom 片段,但它给了你一些关于如何继续的提示。
I don't really know autotools, but can't you use the maven exec plugin, that lets you execute system commands (or Java programs)? For example:
I didn't test the pom fragment above, but it gives you some hints about how to proceed.
您确实忽略了 maven cbuild Parent 套件。 查看“make-maven-plugin”部分了解更多详细信息。
You did overlook the maven cbuild parent suite. take a look at the "make-maven-plugin" section for more details.