I want to set up each TeamCity agent to use a local repository (maven.repo.local) in the agent's working directory (agent.work.dir). Is it possible to configure maven properties to use TeamCity properties in this way?
A:
I don't use TeamCity, but Bamboo. The way I do this is for the maven goals, I have this defined:
-Dmaven.repo.local=${bamboo.M2REPOHOME}/${bamboo.buildKey} ...
Then the property M2REPOHOME is defined to be someplace on the filesystem, and bamboo.buildKey is the project name. I keep my m2 repositories all in one spot so I can easily nuke them. You should probably do something similar by setting maven.repo.local
to the value of agent.work.dir
, or someplace else. Quickly looking at the TeamCity docs, it looks like you would do something like this:
-Dmaven.repo.local=%agent.work.dir%/m2
larrys
2010-02-10 16:49:26
A:
Enter -Dmaven.repo.local=%system.agent.work.dir%/.m2
for the setting Runner: Maven2
/ JVM command line parameters
Craig P. Motlin
2010-02-10 16:51:04