Maven local repository cleanup and inconsistency in setup

Hi,

It would be glad if TeamCity had some kind of cleanup policy for local maven repository. With a large number of builds, the local repository size may grow up huge. Actually I have a script which removes the "repository" folder in .m2 periodically, but I'm sure it would be better if it was directly handled by TeamCity.

BTW, there are some things that seem rather strange to me : when setting up a configuration, you may override the maven home. As far as I understand, builds are ran by agents, so the maven path is the path for the agent which will be running the build (as well for the directory for which this discussion started, the agent should clean its maven directory). Therefore, it looks quite inconsistent to setup a Maven home on the build configuration, although it depends on the agent that will actually run the build. For example, we could have a linux server which runs an agent where the path to Maven is /opt/maven. If another agent is capable of running the build, but is hosted on a Windows host, then the path would be somewhat like c:\tools\maven.

I tried to login to the tracker for posting those issues, but it refuses my JIRA password...

3 comments
Comment actions Permalink

As for first suggestion, it would be nice to have feature request in our tracker. Please tell me your username and I will ask our tracker team to check what happens.

As for Maven home it is possible to use references, i.e. you can specify: %system.maven.home% as the value of Maven home parameter on the build configuration screen. Then in buildAgent.properties file you can define: system.maven.home=c:\tools\maven or /opt/maven. Agents will restart automatically when become idle if buildAgent.properties is changed.

0
Comment actions Permalink

Hi,

My JIRA username is "melix".

For the second point, I didn't know about this reference thing. Nice !

0
Comment actions Permalink

Please send me email to pavel.sher [at] jetbrains.com and I will reply you with new password.

0

Please sign in to leave a comment.