Fetch Maven dependencies
I have an IDEA project with maven modules with external dependencies. How can I configure TeamCity to automatically fetch the external dependencies before building IDEA artifacts? I can't find any options in the IDEA or Maven build step types.
Please sign in to leave a comment.
Jayen,
You can fetch external dependencies using Maven build step with goal dependency:resolve
Add this step before idea runner and dependencies will be resolved before building idea artifacts
Thanks, that was very helpful. My next problem is that we have a pom.xml for each module. Some modules depend on each other, and there is more than one not-dependency module. (I'm totally new to Maven and at the moment, we're only using it for automatic fetching of external dependencies.)
Thanks.
This question is a bit out of scope for TeamCity, but I believe there is a solution in Maven.
Please, use Maven documentation on dependencies, note the "Importing Dependencies" section. I think "Bill of materials" pattern is what you need.
great. that seems to work. i had to adjust my dependencies to use:
to resolve (2)
EDIT: that works fine for maven but breaks intellij. it removes all my inter-module dependencies.