简体   繁体   中英

teamcity - cannot build maven project package X does not exist

I have maven project that has several modules like this:

  • parent (empty project, only has pom file)
    • shared
    • web
    • client

I have no problem to build project from IDE and from console locally. To build I use mvn clean install from parent directory. Now I'm trying to configure TeamCity to build project remotely. However I receive compile errors like this:

[ERROR] /home/shared/src/main/java/../MyClass.java:[4,34] package com.google.gwt.i18n.client does not exist
[ERROR] /home/shared/src/main/java/../MyClass.java:[9,47] cannot find symbol
   symbol: class Messages

This is not only about that package, there are several packages that "does not exists", but I can see in logs that all these packages were successfully downloaded from our internal Artifactory.

Parent pom.xml:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>net.lightoze.gwt-i18n-server</groupId>
            <artifactId>gwt-i18n-server</artifactId>
            <version>${gwt-i18n-server.version}</version>
        </dependency>

Shared pom.xml:

    <dependency>
        <groupId>net.lightoze.gwt-i18n-server</groupId>
        <artifactId>gwt-i18n-server</artifactId>
    </dependency>

The issue was in settings.xml that I've copied from local machine. It contained local path in <localRepository> . After removing it problem gone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM