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://git.marchex.com/src/.../pom.xml.

Is there a plan to implement this feature?

I filed TW-14895 to track this issue.

Thanks.

-Reggie

11 comments

Hello,

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: http://youtrack.jetbrains.net/issue/TW-10483.

Kind regards,
Marina

0

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.

-Reggie

0

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?

0

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?

-Reggie

0

Hi Reginald,

We're hoping to include it into the 6.0.2, which is targeted approximately at January'11. Here is the ticket - http://youtrack.jetbrains.net/issue/TW-15000 (a good number;)

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

0

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.

0

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.

Thanks
Jirong



Attachment(s):
git.PNG
0

Jirong,

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.

0

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.

Jirong

0

Jirong,

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

0

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

0

Please sign in to leave a comment.