在使用Bamboo进行构建之前更改软件包名称 [英] Changing package names before building in Bamboo

查看:95
本文介绍了在使用Bamboo进行构建之前更改软件包名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近发现 BlackBerry对所有类都使用相同的完全-限定名称相同(无论它们是否位于完全不同的应用程序中),导致使用不同版本的共享库的应用程序安装在同一部手机上时会中断.

I recently discovered that BlackBerry treats all classes with the same fully-qualified name as identical--regardless of whether they are in entirely different apps or not--causing apps that use different versions of our shared libraries to break when they are installed on the same phone.

为解决此问题,我们计划更改软件包名称以包含版本号,然后进行构建.有人可以解释如何使用Bamboo来在构建过程中插入以下步骤:

To solve this problem, we are planning on changing the package names to include a version number, then building. Can someone explain how, using Bamboo, I can insert a step in our build process that:

  • 更改某些程序包名称
  • 将所有对旧程序包名称的代码引用替换为对新程序包名称的引用?

推荐答案

我对Bamboo并不熟悉,并且您没有提供有关构建系统的大量信息.如果您使用的是maven,则可以使用阴影插件:

I'm not familiar with Bamboo and you did not include much information about your build system. If you are using maven, you could use the shade plugin:

此插件提供了将工件打包(包括其依赖项)并着色(即重命名)某些依赖项的包的功能.

This plugin provides the capability to package the artifact in an uber-jar, including its dependencies and to shade - i.e. rename - the packages of some of the dependencies.

此处的第二个示例显示了如何配置程序包重命名.然后,必须按照 Chris Lerchers exec插件将其集成到Maven构建中.

The second example here shows how to configure package renaming. The resulting jar file would then have to be processed by rapc as in Chris Lerchers comment to his answer. It should be possible to also integrate this in a maven build using the exec plugin.

这篇关于在使用Bamboo进行构建之前更改软件包名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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