Unable to run inspection profile task
Hello.
I'm trying to configurre IDEA inspection for our project on TeamCity.
But on run I get fail in the logs
[02:00:23] : [Step 1/1] in directory: /opt/tcagent22/work/1991c203550d2d8a
[02:00:23]W: [Step 1/1] Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=150m; support was removed in 8.0
[02:00:29] : [Step 1/1] Starting up IntelliJ IDEA 14.1.4 ...done.
[02:01:10] : [Step 1/1] Opening project...done.
[02:01:10]W: [Step 1/1] Failed to load profile from '/opt/tcagent22/work/1991c203550d2d8a/.idea/inspectionProfiles/tcCore.xml'
[02:01:11] : [Step 1/1] Initializing project...
[02:01:11]W: [Step 1/1] Process exited with code 1
[02:01:11]W: [Step 1/1] Inspection output
[02:01:11]W: [Inspection output] Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=150m; support was removed in 8.0
[02:01:11]W: [Inspection output] Starting up IntelliJ IDEA 14.1.4 ...done.
[02:01:11]W: [Inspection output] Opening project...done.
[02:01:11]W: [Inspection output] Failed to load profile from '/opt/tcagent22/work/1991c203550d2d8a/.idea/inspectionProfiles/tcCore.xml'
[02:01:11]W: [Inspection output] Initializing project...
What's mean "Failed to load"? Agent was unable to find this file?
Please sign in to leave a comment.
Hi Andrey,
What TeamCity version do you use? What type of project do you run inspections for?
TeamCity Enterprise 9.1.1 (build 37059)
It's maven multimodule project
Step 1: Inspection
Execute:
Working directory: same as checkout directory
Path to the project: pom.xml
Path variables:
Project SDKs:
Global libraries: none defined
Inspections profile path: .idea/inspectionProfiles/tcCore.xml
Inspections profile name: tcCore
Include / exclude patterns: not specified
JVM command line parameters: -Xmx512m -XX:MaxPermSize=150m
The error message "Failed to load profile" means that the file could not be found. Please check that file /opt/tcagent22/work/1991c203550d2d8a/.idea/inspectionProfiles/tcCore.xml exists.
Please attach this .xml file. What is the result is you do not specify "Inspections profile path", and only use "Inspections profile name"?
I have added additional build step with checking directory content
#!/bin/bash
echo "Checking inspectionProfiles"
ls -lo .idea/inspectionProfiles/
Looks like inspection profile file exists.
Attachment(s):
tcCore.xml
Hi Andrey,
Sorry for delay. I was able to reproduce the issue. It seems that .idea directory is cleaned up when the Inspections step starts.
Please watch/vote for the issue: https://youtrack.jetbrains.com/issue/TW-42095.
As current warkaround you can create additional pre-build step and copy inspections profile to another location. For more details see the comment.
Sorry for the inconvenience.