如何将 tycho p2 存储库构建的结果部署到本地文件系统或本地维护的 p2 存储库上的某个位置
我有一个工作的 Tycho 版本,可以生成一个工作的 p2 存储库。我当前的工作流程是手动将此构建的结果从项目的目标目录拖放到托管 p2 存储库的 Web 服务器。我的 tycho 构建的结果看起来很正常:
${projectBaseDir}/target/repository
- features
- com.my.product.feature.201111071414.jar
- plugins
- com.my.product.plugins
- artifacts.jar
- content.jar
那么,在存储库目录中获取此构建的结果并将其放置在 Web 服务器上的“行业标准”是什么。
在本例中,我在运行构建服务器的同一台计算机上运行 p2 存储库的 Web 服务器,因此可以使用简单的复制到目录命令。
我尝试使用 resources:copy-resources 来使用 maven-resources-plugin,但没有成功。我不断收到有关无效输出目录的错误。我真的不觉得复制资源是这里的方法,因为该目标的一般目的是将文件复制到 Maven 构建的目标目录,而不是复制文件来自 Maven 构建的目标目录。
我的任务看起来很简单,我意识到有很多选项可以复制文件,但我正在寻找“maven 方式”或更好的“tycho 方式”来执行此操作。如果有这样的标准的话。
谢谢, 台湾
I have a working Tycho build that produces a working p2 repository. My current work flow is to manually drag and drop the results of this build from the project's target dir to the web server that hosts the p2 repository. The results of my tycho build look normal:
${projectBaseDir}/target/repository
- features
- com.my.product.feature.201111071414.jar
- plugins
- com.my.product.plugins
- artifacts.jar
- content.jar
So, what is the "industry standard" for taking the results of this build in the repository directory and placing them on a web server.
In this case, I am running the p2 repository's web server on the same machine that is running the build sever, so a simple copy to a directory command would work.
I've tried the maven-resources-plugin using the resources:copy-resources with no luck. I kept getting an error about the invalid output directory. I don't really feel like copy-resources is the way to go here, since the general purpose of that goal is to copy files to the target directory of your maven build, and not to copy files from the target directory of a maven build.
My task seems simple, and I realize there are a lot of options to copy files, but I'm looking for the "maven way" or better yet, "the tycho way" of doing this. If such a standard exists.
thanks,
TW
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用 antrun 插件实现您想要的效果。它允许您使用 ant 任务/目标(例如复制文件)在 Maven 构建期间执行操作。
我希望以下内容对您有用:
You can achieve what you want with the antrun plugin. It lets you use ant tasks/targets (like copying files) to do things during a Maven build.
I expect something like the following would work for you:
有一个 Minerva 如何发布存储库的 示例。
There is an example of Minerva how to publish the repository.
我刚刚完成了一个插件: http:// download.ralph-schuster.eu/eu.ralph-schuster.uploadfiles-maven-plugin/STABLE/。它甚至提供了在存储库服务器上执行命令的方法,例如为了在部署之前删除旧文件或在部署之后合并工件。
希望能解决部署问题。 :)
I just finished a plugin for that: http://download.ralph-schuster.eu/eu.ralph-schuster.uploadfiles-maven-plugin/STABLE/. It provides even ways to execute commands on the repository server, e.g. in order to delete old files before or merge artifacts after the deployment.
Hope it resolves the deploy problem. :)