Maven build failure

Hi all,

I'm new to TeamCity, and relatively new to maven, but am scratching my head with this problem. I've installed TeamCity 2.0 using the windows installer with the default options, and have configured a project that builds using maven. When I build the project using my maven install (2.0.5) it works just fine so I assume the project is not the problem. When the build runs in teamcity it fails with the following error (full output at end of post):

: The plugin 'org.apache.maven.plugins:maven-compiler-plugin' does not exist or no valid version could be found

I believe this is stock standard maven plugin so don't see why it would be failing. Furthermore the build works fine for me so I am assuming its a problem with my build agent's maven configuration. I've copied my settings.xml to c:\Documents and Settings\Default User\.m2\settings.xml because that appears to be what the build runner is using (see output below).

I've had a look at http://www.jetbrains.net/confluence/display/TCD/maven and browsed around a few other pieces, but am really lost as to where I should be looking. I've be very grateful for any advice.

cheers
dim

Build output:


: Checking for changes (<1s)[10:44:56]: Building in c:\TeamCity\buildAgent\work\Server\taipan[10:44:57]: Getting project sources (6s)[10:45:04]: Found 0 components to load on start[10:45:04]: Building Maven user-level plugin registry from: 'C:\Documents and Settings\Default User\.m2\plugin-registry.xml'[10:45:04]: Building Maven global-level plugin registry from: 'C:\TeamCity\buildAgent\plugins\maven-2.0.6\conf\plugin-registry.xml'[10:45:04]: Building Maven global-level settings from: 'C:\TeamCity\buildAgent\plugins\maven-2.0.6\conf\settings.xml'[10:45:04]: Building Maven user-level settings from: 'C:\Documents and Settings\Default User\.m2\settings.xml'[10:45:04]: Profile with id: 'repositoryDefinitions' has been explicitly activated.[10:45:04]: Profile with id: 'repositoryDefinitions' has been explicitly activated.[10:45:04]: Profile with id: 'repositoryDefinitions' has been explicitly activated.[10:45:04]: Profile with id: 'repositoryDefinitions' has been explicitly activated.[10:45:04]: Profile with id: 'repositoryDefinitions' has been explicitly activated.[10:45:04]: Profile with id: 'repositoryDefinitions' has been explicitly activated.[10:45:04]: Profile with id: 'repositoryDefinitions' has been explicitly activated.[10:45:04]: Profile with id: 'repositoryDefinitions' has been explicitly activated.[10:45:04]: Scanning for projects...[10:45:04]: Reactor build order: : taipan-ioa[10:45:04]: taipan-ioa-iface[10:45:04]: taipan-ioa-pojo[10:45:04]: taipan-ioa-stub[10:45:04]: -


[10:45:04]: Building taipan-ioa[10:45:04]: task-segment: [10:45:04]: -


[10:45:04]: Skipping disabled repository Codehaus Snapshots[10:45:04]: Skipping disabled repository inhouse_snaphot[10:45:04]: Artifact not found - using stub model: Unable to determine the latest version

org.apache.maven.plugins:maven-compiler-plugin:pom:LATEST

: Using defaults for missing POM org.apache.maven.plugins:maven-compiler-plugin:pom:LATEST[10:45:04]: Artifact not found - using stub model: Unable to determine the release version

org.apache.maven.plugins:maven-compiler-plugin:pom:RELEASE

: Using defaults for missing POM org.apache.maven.plugins:maven-compiler-plugin:pom:RELEASE[10:45:04]: -


[10:45:04]: BUILD ERROR[10:45:04]: -


[10:45:04]: The plugin 'org.apache.maven.plugins:maven-compiler-plugin' does not exist or no valid version could be found[10:45:04]: -


[10:45:04]: Trace
org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.maven.plugins:maven-compiler-plugin' does not exist or no valid version could be found
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1286)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindPluginToLifecycle(DefaultLifecycleExecutor.java:1221)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:987)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at jetbrains.maven.v20.embedder.MavenEmbedder.execute(MavenEmbedder.java:552)
at jetbrains.maven.v20.embedder.MavenEmbedder.execute(MavenEmbedder.java:485)
at jetbrains.maven.v20.Maven20Launcher.doExecuteMaven(Maven20Launcher.java:83)
at jetbrains.maven.AbstractMavenLauncher.executeMaven(AbstractMavenLauncher.java:63)
at jetbrains.maven.v20.Maven20Launcher.main(Maven20Launcher.java:50)
Caused by: org.apache.maven.plugin.version.PluginVersionNotFoundException: The plugin 'org.apache.maven.plugins:maven-compiler-plugin' does not exist or no valid version could be found
at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:228)
at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:90)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:166)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1257)
... 11 more
: -


[10:45:04]: Total time: < 1 second[10:45:04]: Finished at: Fri Apr 13 10:45:04 EST 2007[10:45:04]: Final Memory: 1M/3M[10:45:04]: -


[10:45:04]: The plugin 'org.apache.maven.plugins:maven-compiler-plugin' does not exist or no valid version could be found[10:45:04]: Number of processed tests: 0[10:45:05]: Maven2 output:
"c:\Program Files\java\jdk1.5.0_04\bin\java.exe" -DDotNetFramework1.1_Path=C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 -Dbuild.working.dir=c:\TeamCity\buildAgent\work\Server\taipan -Dagent.name=dim -Dbuild.number=37 -DDotNetFramework1.1= -Duser.language=en -Duser.country=AU -Dos.version=5.1 -Duser.timezone=Australia/Sydney -Dfile.encoding=Cp1252 -DDotNetFramework2.0_x86= -Dfile.separator=\ -Dagent.work.dir=c:\TeamCity\buildAgent\work -DDotNetFramework2.0_x86_Path=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 -DDotNetFramework2.0_Path=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 -Dos.arch=x86 -DDotNetFramework1.1_x86_Path=C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 -DDotNetFramework2.0= -DDotNetFramework1.1_x86= -Djava.io.tmpdir=c:\TeamCity\buildAgent\bin\..\temp\teamcity.tmp -Dbuild.vcs.number.1=21007 -Duser.name=SYSTEM "-Dos.name=Windows XP" -Didea.build.agent.port=9090 -Dteamcity.buildType.id=bt2 "-DDotNetFrameworkSDK2.0_Path=C:\Program Files\Microsoft.NET\SDK\v2.0" -Duser.variant= -DDotNetFrameworkSDK2.0_x86= -Dsuccessful.build.number=3 -Dmaven.home=C:\TeamCity\buildAgent\plugins\maven-2.0.6 "-Duser.home=C:\Documents and Settings\Default User" -Didea.build.server.build.id=44 "-DDotNetFrameworkSDK2.0_x86_Path=C:\Program Files\Microsoft.NET\SDK\v2.0" -Dpath.separator=; -DDotNetFrameworkSDK2.0= -classpath C:/TeamCity/buildAgent/plugins/mavenPlugin/lib/maven2AgentRuntime.jar;C:/TeamCity/buildAgent/plugins/mavenPlugin/lib/maven2AgentRuntimeCommon.jar;C:/TeamCity/buildAgent/lib/buildServerRuntimeUtil.jar;C:/TeamCity/buildAgent/lib/junit-4.1.jar;C:/TeamCity/buildAgent/lib/buildServerRuntimeUtil.jar;C:/TeamCity/buildAgent/lib/jdom.jar;C:\TeamCity\buildAgent\plugins\maven-2.0.6\lib\maven-core-2.0.6-uber.jar;C:\TeamCity\buildAgent\plugins\maven-2.0.6\boot\classworlds-1.1.jar; jetbrains.maven.v20.Maven20Launcher c:\TeamCity\buildAgent\work\Server\taipan\ioa\pom.xml test "C:/TeamCity/buildAgent/lib/buildServerServerLogging.jar;C:/TeamCity/buildAgent/lib/buildServerCommonRuntime.jar;C:/TeamCity/buildAgent/lib/buildServerXmlRpcWrapper.jar;C:/TeamCity/buildAgent/lib/xmlrpc-2.0.1.jar;C:/TeamCity/buildAgent/lib/buildServerMessages.jar;C:/TeamCity/buildAgent/lib/xstream-1.2.1.jar;C:/TeamCity/buildAgent/lib/commons-codec-1.3.jar;" jetbrains.buildServer.agent.ant.ServerLoggerFacade C:\TeamCity\buildAgent\temp\teamcity.tmp\agent-maven-runner-surefire44913reports | -e
jetbrains.maven.ReportableException: The plugin 'org.apache.maven.plugins:maven-compiler-plugin' does not exist or no valid version could be found
at jetbrains.maven.v20.Maven20Launcher.doExecuteMaven(Maven20Launcher.java:99)
at jetbrains.maven.AbstractMavenLauncher.executeMaven(AbstractMavenLauncher.java:63)
at jetbrains.maven.v20.Maven20Launcher.main(Maven20Launcher.java:50)
Caused by: org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.maven.plugins:maven-compiler-plugin' does not exist or no valid version could be found
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1286)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindPluginToLifecycle(DefaultLifecycleExecutor.java:1221)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:987)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at jetbrains.maven.v20.embedder.MavenEmbedder.execute(MavenEmbedder.java:552)
at jetbrains.maven.v20.embedder.MavenEmbedder.execute(MavenEmbedder.java:485)
at jetbrains.maven.v20.Maven20Launcher.doExecuteMaven(Maven20Launcher.java:83)
... 2 more
Caused by: org.apache.maven.plugin.version.PluginVersionNotFoundException: The plugin 'org.apache.maven.plugins:maven-compiler-plugin' does not exist or no valid version could be found
at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:228)
at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:90)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:166)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1257)
... 11 more
: Build finished

closeQuick Links
ioa build Overview
Pending changes
History
Change Log
Compatible Agents
Edit Configuration

3 comments
Comment actions Permalink

To the Jetbrains folks - if there is some more information that I need to provide in order to get some assistance with this, please let me know what it is.

cheers,
dim

0
Comment actions Permalink

Hello Dmitri,

This looks like a result of misconfiguration.

Maven settings are devided into two parts -- per-installation and per-user.
The first part is taken from \conf\, and the second one -- from \.m2\ (unless you specify an alternate path). By default TeamCity uses the bundled Maven installation. So, if you run the agent under "Default User", the Maven runner will look for global settings in \plugins\maven-2.0.6\conf\ and for user settings in ]]>\.m2\.

if you previously was using a standalone Maven installation (2.0.5 in your
case), with modified configuration, under a user other than "Default User",
the results of building the project in TeamCity (configured by default and
launched under "Default User") may differ significantly.

Please try doing the following.

1. In the build configuration form set the system property "maven.home" pointing
at your Maven 2.0.5 installation.
2. Set "User Settings Path" pointing at settings.xml (if exists) of the user,
under which you usually run Maven from command line.

and run the build again.

Please let me know, whether it helped.

To the Jetbrains folks - if there is some more information that I need
to provide in order to get some assistance with this, please let me
know what it is.

cheers,
dim


WBR,
Sergey Anchipolevsky


0
Comment actions Permalink

Hi Sergey,

Thanks for the response, although for some reason I didn't get the notification and so had figured this out anyway. I can't pinpoint what the problem was but in the end I changed the agent service to run as my user and it was ok. I've now created two agents on some linux boxes anyway and am no longer running an agent on my windows box (where I've only installed as a temporary measure as I am given a box to put this on).

btw - nice looking product. I look forward to enjoying it as I have with IDEA.

cheers,
dim

0

Please sign in to leave a comment.