简体   繁体   English

在 TFS Online 构建中使用个人库 .jar

[英]Using personal library .jar in TFS Online build

I'm trying to start doing continuous integration on my Java/Maven project, using Team Foundation Server.我正在尝试使用 Team Foundation Server 开始对我的 Java/Maven 项目进行持续集成。 I am trying to build two projects: a library, and a main project.我正在尝试构建两个项目:一个库和一个主项目。

When I compile the main project from my local box, it's currently getting the library.jar file from a local Artifactory server (which my superiors would like to go away).当我从本地机器编译主项目时,它当前正在从本地 Artifactory 服务器(我的上级希望离开)获取 library.jar 文件。

I've gotten the library to build, being triggered by changes to the git repo.我已经建立了库,这是由 git repo 的更改触发的。 I would like the main project to be able to use this generated artifact when it compiles, but I cannot find documentation on how to point Maven to the TFS artifact.我希望主项目能够在编译时使用这个生成的工件,但我找不到有关如何将 Maven 指向 TFS 工件的文档。

Have you managed to do this in your own project?你有没有在你自己的项目中做到这一点? How would I go about creating the reference to the library.jar?我将如何创建对 library.jar 的引用?

EDIT: I'm not necessarily looking to have build triggering.编辑:我不一定要构建触发。 I'm trying to figure out dependency management.我想弄清楚依赖管理。

Not sure if I totally got your point, seems that you want to start doing continuous integration on this process: Your library project auto build triggered by changes to the git repo, then your main project build using the generated library.jar earlier.不确定我是否完全明白你的意思,似乎你想开始在这个过程中进行持续集成:你的库项目自动构建由对 git repo 的更改触发,然后你的主项目构建使用之前生成的 library.jar。

It's likely chain the build definition .它可能链接了构建定义 This Feature is under plan, but don't have yet.此功能正在计划中,但还没有。

Check the QA on this website :检查本网站上的质量保证:

Can I chain builds so that one build triggers another?我可以链接构建以便一个构建触发另一个构建吗?

Not yet.还没有。

There's also an ancient suggestion on User Voice under planned , you could track the status.还有一个关于User Voice underplanned的古老建议,您可以跟踪状态。

Also take a look at this similar question: How to chain builds in TFS 2015?也看看这个类似的问题: How to chain builds in TFS 2015?

If you just want to build your Java app with Maven, look at this tutorial .如果您只想使用 Maven 构建 Java 应用程序,请查看本教程

You can add a Powershell task in your build definition to download the library build artifacts via Rest API: Get Build Artifacts .您可以在构建定义中添加 Powershell 任务,以通过 Rest API 下载库构建工件: 获取构建工件

For the settings.xml file, you can upload it into the version control and specify "--settings settings.xml" to use it.对于settings.xml文件,您可以将其上传到版本控制中并指定“--settings settings.xml”来使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM