TeamCity is unable to read Maven project. Some features may be unavailable
Hi:
After updating teamcity, it has stopped assigning the maven.project. * values. Can you tell me if there is any way to solve it?
Version: 2020.2 (build 85487)
Initial M2_HOME not set
Current M2_HOME = /opt/buildAgent/tools/maven3_6
PATH = /opt/buildAgent/tools/maven3_6/bin:/usr/bin:/bin
Using watcher: /opt/buildAgent/plugins/mavenPlugin/maven-watcher-jdk16/maven-watcher-agent.jar
Using private local repository at /opt/buildAgent/system/jetbrains.maven.runner/maven.repo.local-bt115
*** Start reading the project structure ***
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=256m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
Process exited with code 1
TeamCity is unable to read Maven project. Some features may be unavailable
Initial MAVEN_OPTS not set
Current MAVEN_OPTS = -Dfile.encoding=UTF-8 -Xms512m -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=512m
Starting: /opt/jdk1.8.0_131/bin/java -Dagent.home.dir=/opt/buildAgent -Dagent.name=Agent1 -Dagent.ownPort=9090 -Dagent.work.dir=/opt/buildAgent/work
in directory: /opt/buildAgent/work/d4dbdacb98798261
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=256m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
Current M2_HOME = /opt/buildAgent/tools/maven3_6
PATH = /opt/buildAgent/tools/maven3_6/bin:/usr/bin:/bin
Using watcher: /opt/buildAgent/plugins/mavenPlugin/maven-watcher-jdk16/maven-watcher-agent.jar
Using private local repository at /opt/buildAgent/system/jetbrains.maven.runner/maven.repo.local-bt115
*** Start reading the project structure ***
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=256m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
Process exited with code 1
TeamCity is unable to read Maven project. Some features may be unavailable
Initial MAVEN_OPTS not set
Current MAVEN_OPTS = -Dfile.encoding=UTF-8 -Xms512m -Xmx2048m -XX:PermSize=256m -XX:MaxPermSize=512m
Starting: /opt/jdk1.8.0_131/bin/java -Dagent.home.dir=/opt/buildAgent -Dagent.name=Agent1 -Dagent.ownPort=9090 -Dagent.work.dir=/opt/buildAgent/work
in directory: /opt/buildAgent/work/d4dbdacb98798261
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=256m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
Please sign in to leave a comment.
I had the same problem. In our case the culprit turned out to be the mirror-all entry in Maven settings.xml that we use on TeamCity.
In order to populate the maven.project.* values TeamCity invokes Maven with the info-maven3-plugin at the start of the build. This plugin is located in a file based repository on the agent and is not available on Maven Central. The mirror-all entry in our settings redirected Maven away from TeamCity's internal file-based repository so that it could not download the plugin. This caused the initial Maven run to fail with the error message: TeamCity is unable to read Maven project. Some features may be unavailable
Our solution was to only mirror external (i.e. not file-based repositories): By specifying external:* in the mirrorOf element instead of *.
What helped me a lot when debugging this problem was the discovery that the build log in TeamCity's UI is not complete. In order to get a full build log one need to Download the Full Build Log in build log view.