• Welcome, guest

  • Login

  •  

Type:
Bug
Priority:
Critical Critical  
State:
Fixed
Subsystem:
Agent
Reporter:
Niels Ull Harremoës (nielsull) Send Email
Assignee:
Kirill Maximov (maxkir) Send Email
Affects:
TeamCity 1.2
Fixed in:
TeamCity 2.0 Agra (4111)
Created:
20 months ago (17 Jan 2007 15:15)
Updated:
20 months ago (18 Jan 2007 21:58)
Votes:
1
Resolved:
JIRA source:
TW-1459
teamcity.log (15 kb)
Issue has no links

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

  • Niels Ull Harremoës (nielsull) Send Email
    20 months ago (17 Jan 2007 15:15)

Whoops - please delete this.

  • Tobias Kurzke (tkurzke) Send Email
    20 months ago (17 Jan 2007 15:39)

I get the same error when using the Inspection-runner:

java.lang.RuntimeException: There are undefined path variables in project configuration files.

In order for the project to load all path variables must be defined.: M2_SETTINGS, MILANO_FUTURE_HOME, M2_REPO


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.

  • Kirill Maximov (maxkir) Send Email
    20 months ago (17 Jan 2007 16:17)

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 

  • Tobias Kurzke (tkurzke) Send Email
    20 months ago (17 Jan 2007 16:22)

Still doesn't work, still same error when using the Insepctions runner.

  • Niels Ull Harremoës (nielsull) Send Email
    20 months ago (17 Jan 2007 16:38)

Doesn't work for me either. I now have this in my buildAgent.properties:


  1. Generated properties (see buildAgent.dist.properties for description)
  2. Wed Jan 17 09:22:51 CET 2007

serverUrl=http\://localhost\:80
name=PFACDBL04
workDir=F\:\\Builder_Work
env.JAVA_HOME=d\:\\jdk1.5.0_07
ownPort=9090
system.path.macro.MAVEN_REPOSITORY=f:\\maven_repo
path.macro.MAVEN_REPOSITORY=f:\\maven_repo
env.path.macro.MAVEN_REPOSITORY=f:\\maven_repo
MAVEN_REPOSITORY=f:\\maven_repo
system.MAVEN_REPOSITORY=f:\\maven_repo


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.

  • Kirill Maximov (maxkir) Send Email
    20 months ago (17 Jan 2007 17:20)

That's really strange. Could you please attach buildAgent/lib/teamcity.log to the issue?

  • Anna Kozlova (anet) Send Email
    20 months ago (17 Jan 2007 17:21)

Could you please provide me fail message? Thank you

  • Tobias Kurzke (tkurzke) Send Email
    20 months ago (17 Jan 2007 17:28)

Here it is.

  • Anna Kozlova (anet) Send Email
    20 months ago (17 Jan 2007 17:37)

From teamcity.log: M2_SETTINGS, MILANO_FUTURE_HOME, M2_REPO are undefined.


Indeed, please add
system.M2_SETTINGS=...
system.MILANO_FUTURE_HOME=...
and system.M2_REPO=...
to your buildAgent.properties.


I hope it will help.
Anna

  • Tobias Kurzke (tkurzke) Send Email
    20 months ago (17 Jan 2007 17:42)

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?

  • Anna Kozlova (anet) Send Email
    20 months ago (17 Jan 2007 17:53)

I didin't notice that line indeed. Sorry

  • Kirill Maximov (maxkir) Send Email
    20 months ago (18 Jan 2007 21:57)

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)

JetBrains Tracker revision #1363 [02-Oct-2008 13:30] (version #47) Copyright 2007-2008 JetBrains s.r.o.