Cannot create a maven build configuration using Git?

Hi there,

When I am starting a project, I cannot create a maven build configuration which pulls the POM file from Git. I would like to reference scm:git:ssh://

Is there a plan to implement this feature?

I filed TW-14895 to track this issue.





For now, supported version control systems in Maven create configuration are Perforce, StarTeam and Subversion.
Please watch/vote for the feature request to support all available VCS:

Kind regards,


Thanks for the information Marina. Is the source for the maven integration available? People in my organization are talking about writing a plugin to handle this and other issues with the Maven plugin.



Hello, Reginald

With Git the problem is a bit deeper than just adding it to the list. Let me explain.

When you specify an SCM URL to a pom, TeamCity first pulls out a single POM only, extracts some details from it and then creates a build configurations based on these details. This works perfectly with Subversion, Perforce and all other non-distributed SCMs.
But with Git before we can access a single file we must clone the whole repository, which may take a lot of time.

Will you be happy with a feature that before doing something usable hangs for 1 hour, if you can do the same thing manually in 1 minute? I don't think you will :)

There is a workaround, however.

If your pom can be accessed with http(s), ftp(s) protocols and it contains SCM configuration section, you can just type in simple http or ftp URL.
You can also upload your pom as a local file.

In both of these cases TeamCity doesn't fetch any files from the SCM prior to build configuration creation so it works pretty quick.

UPDATE: I'm so much sorry for measleading you. This workaround is invalid since Git urls won't be parsed out from the SCM configuration section:(. However it can be quickly implemented this way, before we think out something more usable not requiring workarounds. Do you think this would help you?


Hi Sergey,

Sorry for the slow response. I think that will help. The team working on this issue is working on more TeamCity and Maven integration issues so I had a bit of a delay getting an answer from them. Will this be in the next EAP?



Hi Reginald,

We're hoping to include it into the 6.0.2, which is targeted approximately at January'11. Here is the ticket - (a good number;)

You mentioned  more TeamCity and Maven integration issues. Can we help somehow  in resolving them?


We've implemented a quick fix. Not very good in terms of UI, but works. We'll polish it later.
As discussed you'll be able to create build configurations by uploading pom content or specifing a non-git URL (http, ftp, etc.).

See it in 6.0.2 coming soon.


I am using the latest 8.0.6 TeamCity still don't see the GIT option. Can you please describe your workaround? I can choose a local pom file, but there is no upload button in the web UI. If I click Create, I got this error: Couldn't find SCM connection definition in the POM. Please see attached screenshot.




Uploaded pom file is required to have properly filled <scm> section. TeamCity will use this section information to create VCS root for you. More details in Maven Documentation

You can also create Maven build configuration using simple "Create configuration" button. Set up vcs root info and add build step with "Maven" runner.


As you can see in my attached screenshot. There is no button for me to click to do the upload.

Yes, I have to switch to the normal build configuration.




The "Choose File" is the button you need. Press it, select pom.xml,press "Create"


Thanks, do you have a sample for GIT for <scm> section?


Please sign in to leave a comment.