Our Intellij project files have references to so-called "path variables" in it (e.g. $M2_REPOSITORY$) (see Intellij IDEA). Path variables are useful as placeholders when pointing to a library repository and where that location isn't always the same. (e.g. think of Windows and Linux cross-platform compatibility of project files).
The agent doesn't replace these placeholders in the project files with real values (e.g. stored in an environment variable or system property) before running, causing the build to fail.
Unfortunately we cannot adjust the project files with absolute paths for the following reasons:
- Different developers have the local Maven 2 repository at different locations
- Developers work on Windows while the TeamCity builds are done on Linux
Issue wasresolved
I get the same error when using the Inspection-runner:
java.lang.RuntimeException: There are undefined path variables in project configuration files.
When using the Ipr-Runner (same project on same build agent), the build log contains this:
[generateBuild] Loaded external path macro $M2_REPO$=C:\Documents and Settings\mstku\.m2\repository
[generateBuild] Loaded external path macro $M2_SETTINGS$=C:\Documents and Settings\mstku\.m2
[generateBuild] Loaded external path macro $MILANO_FUTURE_HOME$=C:\BuildAgent\work\Milano_Future_Complete
It looks like Ipr runner correctly replaces the path variables while the Inspection runner still can't handle this.
It looks like you're trying to build Inspection build. For it, you have to define
system.MAVEN_REPOSITORY=f:\\maven_repo in your buildAgent properties.
For Ipr runner, the valid syntax is system.path.macro.MAVEN_REPOSITORY=f:\\maven_repo
We'll unify syntax in Agra to path.macro.MAVEN_REPOSITORY . So far you should use two variable definitions for Ipr and Inspection runner.
Hope this helps, KIR
Doesn't work for me either. I now have this in my buildAgent.properties:
But I get the same results?
I have also tried with "f\:\\maven_repo" where the \ before the : was inspired by the workDir syntax - but to no use.
We would very much appreciate a solution - until then, the code inspection is unfortunately useless to us.
As we also wrote several times, that's exactly what we did.
And no, it didn't help, so we provided the log files.
If you wold take a closer look at these files, you would notice the following lines:
[2007-01-17 15:26:23,240] INFO - nt.runner.GenericProgramRunner - Running: "C:\Program Files\Java\jdk1.5.0_10\bin\java.exe" -Didea.build.server.is.personal=false "-Dpath.macro.M2_REPO=C:\Documents and Settings\mstku\.m2\repository" -Dbuild.number=6 -Dsuccessful.build.number=1 -Didea.no.jdk.check=true -Dbuild.working.dir=C:\BuildAgent\work\Milano_Future_Complete -Demma.disable.source=true -DDotNetFramework1.1= "-Duser.home=C:\Documents and Settings\mstku" "-Djdk.1.5.home=C:\Program Files\Java\jdk1.5.0_10" -DDotNetFramework2.0= -Dfile.encoding=Cp1252 -Didea.build.server.buildType.id=bt18 -Didea.system.path=C:\BuildAgent\work\Milano_Future_Complete\system "-DM2_REPO=C:\Documents and Settings\mstku\.m2\repository" -Didea.build.server.execution.timeout=0 -Didea.build.agent.port=9091 -DDotNetFramework1.1_x86_Path=C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 -Didea.build.server.build.id=1481 -DDotNetFramework2.0_x86_Path=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 "-Djdk.1.5=C:\Program Files\Java\jdk1.5.0_10" -Duser.variant= -Duser.language=de -Duser.name=mstku "-DM2_SETTINGS=C:\Documents and Settings\mstku\.m2" "-DDotNetFrameworkSDK2.0_Path=C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0" -Dos.arch=x86 -Didea.plugins.path=C:\BuildAgent\plugins\idea\plugins "-Dpath.macro.M2_SETTINGS=C:\Documents and Settings\mstku\.m2" -DMILANO_FUTURE_HOME=C:\BuildAgent\work\Milano_Future_Complete -DDotNetFrameworkSDK2.0= -DDotNetFramework1.1_x86= -Didea.build.server.checkout.on.server=true -Didea.build.server.run.type=Inspection -DDotNetFramework2.0_x86= -DDotNetFramework2.0_Path=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 -Dfile.separator=\ -Dbuild.vcs.number.2=3471 -Dbuild.vcs.number.1=3474 "-Didea.build.server.project.name=Milano Future Complete" -Didea.home.path=C:\BuildAgent\plugins\idea "-DDotNetFrameworkSDK2.0_x86_Path=C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0" -Duser.timezone=Europe/Berlin "-Dos.name=Windows XP" -Dpath.separator=; -DDotNetFramework1.1_Path=C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 -Dos.version=5.1 -DDotNetFrameworkSDK2.0_x86= -Duser.country=DE -Didea.config.path=C:\BuildAgent\work\Milano_Future_Complete\config -Dpath.macro.MILANO_FUTURE_HOME=C:\BuildAgent\work\Milano_Future_Complete -Xbootclasspath/p:C:\BuildAgent\plugins\idea\lib\boot.jar -classpath "C:\Program Files\Java\jdk1.5.0_10\lib\tools.jar;C:\BuildAgent\plugins\idea\lib\idea.jar;C:\BuildAgent\plugins\idea\lib\extensions.jar;C:\BuildAgent\plugins\idea\lib\openapi.jar;C:\BuildAgent\plugins\idea\lib\jdom.jar;C:\BuildAgent\plugins\idea\lib\log4j.jar" com.intellij.idea.Main inspect C:\BuildAgent\work\Milano_Future_Complete\IdeaFuture\MilanoFuture.ipr profile "C:\Documents and Settings\mstku\Local Settings\Temp\inspection56659result" -e -v3
As you can see, all 3 variables are resolved in this line.
Nevertheless, in the very next line, the following error message appears:
[2007-01-17 15:26:31,771] INFO - nt.runner.GenericProgramRunner - java.lang.RuntimeException: There are undefined path variables in project configuration files.
[2007-01-17 15:26:31,786] INFO - nt.runner.GenericProgramRunner - In order for the project to load all path variables must be defined.: M2_SETTINGS, MILANO_FUTURE_HOME, M2_REPO
This clearly looks like a bug to me.
And let me add this: The issue was already closed twice as you thought it would have been fixed.
Do you actually test your fixes before closing JIRA entries?
We've made the fix for the problem. To apply it, download attachment from http://www.jetbrains.net/confluence/pages/viewpageattachments.action?pageId=18577
and place it to TeamCity/webapps/ROOT/update/plugins directory.
After finishing running builds all build agents should auto-upgrade (this may take a couple of minutes).
After the upgrade Inspection builds with path variables should run without problems.
Hope this helps,
KIR
| Old | New | |
| Niels Ull Harremoës (nielsull) - 20 months ago (18 Jan 2007 21:58) | ||
Niels Ull Harremoës (nielsull)
20 months ago (17 Jan 2007 15:15)Whoops - please delete this.