Maven hanging while downloading from repository

I'm experiencing a problem with Maven being called from TeamCity. Basically, Maven is hanging with the message:
Downloading: http://localhost:8081/nexus/content/groups/public/org/springframework/spring-core/2.5.5/spring-core-2.5.5.pom

The TeamCity server and build agent are running on a machine with no internet access, so I've installed a Nexus repository for artefacts from maven-central. TeamCity is configured to use a settings.xml file that points to this repository as a mirror.

The agent is running as a Windows service as my logon user account. I had other problems using the Maven bundled with TeamCity, so I've configured the build to use a specific Maven installation (2.0.9). I've also explicitly stated the settings.xml file in the build configuration. I've tried executing Maven manually with the same command line that TeamCity uses and it works fine (i.e. downloads files from remote repositories). It only hangs when it is executed from TeamCity. Any ideas?

I've tried an HTTP debugging proxy to intercept network traffic, but this isn't picking up any HTTP requests at the time of the "downloading" message.

TeamCity is also unable to get a stack trace for the hanging process.

OS: Windows Server 2003
TeamCity 3.1.1
Sun Java 1.6.0_06
Maven 2.0.9

1 comment
Comment actions Permalink


Sorry for the delay in replying.

TeamCity just runs Macen by simple command line, so if you tried exactly the same command line and see no errors, the only issue I can see here is user under which the process is run.

Can you try to launch TeamCity agent from the command line, by "agent.bat start" command to exclude service-related issues?

There is a known issue that system-level defined environment variables can be not used if user-level variables are set.


Please sign in to leave a comment.