Error in maven tab

Hi,

I would like to use changes on maven dependencies as a build trigger. When creating the trigger, teamcity shows me an error with the hint to take a look into the maven tab. The maven tab shows the folling error:

An error occurred during collecting Maven project information: POM 'de.XXX.forum.hl7:hl7-bom' not found in repository: Unable to download the artifact from any repository de.XXX.forum.hl7:hl7-bom:pom:3.1-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2) for project de.XXX.forum.hl7:hl7-bom.

I can't the any configuration points for that teamcity feature. Where can I specify our central nexus repository? All is specified via a custom settings.xml  in the maven buld step, but  teamcity does not seem to use this settings.xml

What I'm doing wrong?

Thanks
Torsten

10 comments
Comment actions Permalink

Hello,

You can provide custom settings.xml file for build-server maven processes (relevant to triggering, collecting maven project information etc.) by placing it in <TEAMCITY_DATA_DIR>/system/pluginData/maven directory. Please see this documentation page to get more information about maven settings resolution on the server-side.

0
Comment actions Permalink

Hi,

with an settings.xml in  ~/.BuildServer/system/pluginData/maven/settings.xml we are a step further. The settings defines only a mirror for all repositories. The mirror is our nexus repository:


<settings>
    <mirrors>
        <mirror>
            <id>nexus</id>
            <mirrorOf>*</mirrorOf>
            <url>http://172.25.22.98:8080/nexus/content/groups/xxx-public</url>
        </mirror>
    </mirrors>
</settings>



In our maven pareport of the dependency management like:

  <dependency>
                <groupId>de.xxx.yyy.hl7</groupId>
                <artifactId>hl7-bom</artifactId>
                <version>${hl7.version}</version>
                <type>pom</type>
                <scope>import</scope>
  </dependency>



The maven TAB shows the error:

An error occurred during collecting Maven project information: POM 'de.xxx.yyy.hl7:hl7-bom' not found in repository: Unable to download the artifact from any repository de.xxx.yyy.hl7:hl7-bom:pom:3.1-SNAPSHOT from the specified remote repositories: nexus (http://172.25.22.98:8080/nexus/content/groups/xxx-public) for project de.xxx.yyy.hl7:hl7-bom.

but nexus has this artifact, I can browse it and the normal maven build resolve and download also this artifact.

The teamcity server log shows the following error:

[2012-08-16 16:40:49,366]   WARN - impl.MavenMetadataProviderImpl - Error generating Maven metadata for build configuration YYYY :: YYYY [3.1] CI Build  (10 - commit stage) {id=bt19}: POM 'de.xxx.yyy.hl7:hl7-bom' not found in repository: Unable to download the artifact from any repository


  de.xxx.yyy.hl7:hl7-bom:pom:3.1-SNAPSHOT


from the specified remote repositories:
  nexus (http://172.25.22.98:8080/nexus/content/groups/xxx-public)


for project de.xxx.yyy.hl7:hl7-bom.

May be the impl.MavenMetadataProviderImpl can't handle import of a dependency management?

Greetings
Torsten










. HL7
0
Comment actions Permalink

The error message comes from underlying maven instance, that is used to read the project.

Please, double check that your Nexus mirror is accessible from Teamcity server machine (under same account that Teamcity is started).

0
Comment actions Permalink

What is the underlying maven instance? which maven version?

The nexus mirror is rechable from the user account under that teamcity is running. A simple get of this artifact works.

How can I get more trace infos?

Thanks
Torsten

Version
Substantiv: Version, Fassung, Ausgabe, Modell, Darstellung, Übersetzung, Typ, Bearbeitung, Interpretation
0
Comment actions Permalink

MetadataProvider that collects information for Maven tab currently is bound to bundeled maven 2.2.1
For now, I did not find any difference in artifact dependency resolution process that could affect resolution of "BoM' dependency.

To get more info (including full stacktrace) you should enable debug logging on TeamCity server administration UI.

0
Comment actions Permalink

The difference is the import scope. Maven supports this feature since version 2.0.9

0
Comment actions Permalink

We use Maven 2.2.1, so the import scope is supported. I did check it on a sample project.

Would you mind attaching debug build logs?

You can disable maven metadata generation for specific project by adding build parameter with name "teamcity.maven.enableMetadata"  and value "false"

0
Comment actions Permalink

Now it works for me with an settings.xml file that defines a maven repository with snaphots enabled and update policy always

0
Comment actions Permalink

Thank you very much for sharing your solution.

Is it the same Nexus instance that is used as the mirror?

0
Comment actions Permalink

Yes it's the same instance.
We have only one.

Greetings
Torsten

es ist
0

Please sign in to leave a comment.