开发者

How do I reference third-party jar libraries into a Java project being built by TeamCity?

开发者 https://www.devze.com 2023-04-12 20:10 出处:网络
I\'m using Netbeans 7.1 to develop a number of Java projects. Several of the projects reference each other, and all of them reference external third-party libraries such as Log4J, JFreeChart, etc. Now

I'm using Netbeans 7.1 to develop a number of Java projects. Several of the projects reference each other, and all of them reference external third-party libraries such as Log4J, JFreeChart, etc. Now I want to run continuous integration and automated testing using TeamCity 6.5.4, but i'm new to it and having problems with my third-party Jar's.

In Netbeans I have just added each of the relevant third-party Jar files to a seperate Library, and then I include each library in the project (so i'm not referencing the Jar directly).

The projects are checked in to Subversion. In TeamCity I created one Project, with a seperate Build Configuration for each Netbeans Project (each with a different VCS root). The Netbeans projects which depend on each other, i've set up as Snapshot Dependencies in the build configuration settings. This works fine as 开发者_如何学编程far as I can tell

What is the best way to set up TeamCity so it can access and build the projects with all of the necessary third-party Jar's? Should I check them into a new project, and reference this in TeamCity? Should I copy the Jar's into a specific location on the build server?

I don't understand how the "add artifact dependency" should work, because it forces me to make a build configuration reference another build config, even if they do not really depend on each other.

I'm sure this is a simple problem! All help greatly appreciated :-) Jack

Edit: I would rather not use Maven.


Use maven2! TeamCity has built-in maven support. http://maven.apache.org/download.html Not sure though about maven3 support. Also netbeans integrates nicely with maven http://solitarygeek.com/java/netbeans-and-maven-a-quick-start-guide

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号