Error reading Maven project

In Build Log I get the following error message and can't find a solution for this:

Error reading Maven project: Unable to build project '/usr/dev/tools/tc/7.0.3/TeamCity/buildAgent/work/1b88b79ab584a8b2/pom.xml; it requires Maven version 3.0.4.

TeamCity is unable to read Maven project. Some features may be unavailable

Using watcher: /usr/dev/tools/tc/7.0.3/TeamCity/buildAgent/plugins/mavenPlugin/maven-watcher/maven-watcher-agent.jar

Initial M2_HOME not set

Current M2_HOME = /usr/dev/tools/tc/7.0.3/TeamCity/buildAgent/tools/maven3

PATH = /usr/dev/tools/tc/7.0.3/TeamCity/buildAgent/tools/maven3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

Initial MAVEN_OPTS not set

Current MAVEN_OPTS = -Xmx1024m -XX:MaxPermSize=1024m

The agent parameters after build are as following:
maven.project.artifactId ???
maven.project.groupId ??? ???
maven.project.version ???

When compiling without Teamcity everthing is working without warnings or errors and Maven 3.0.4 is used.

Any idea? Just default settings are used for building.

Thanks in advanced!
Comment actions Permalink

Most likely it's just a warning, not error message, and as such should not affect behavior of the build. In the nearest time we plan to release 8.1 EAP build with much better support for Maven 3 and this problem will be fixed.

Comment actions Permalink

The problem was that the maven parameters where not set and usable to TC!!

Just found the problem and solved it!

We had the following configuration in our pom.xml:

Even when selected in TC "Build step/Maven Home/Maven selection" to "Bundled Maven 3 (3.0.4)" it was not working due to the fact that the maven parameters are processed internally with "Bundled Maven 2 (2.2.1)" version.

So as soon as we removed the maven "prerequisites settings" from the pom.xml everthing worked successfully.

Comment actions Permalink

This case should start working correctly in 8.1.


Please sign in to leave a comment.