Always getting "Resolve error obtaining dependencies[...]" when using Grails to build a project. What am I doing wrong?

Hello community,

first, I am quite new in using TC and can't help myself resolving this problem (even after extensive research).
I am trying to build a project using a Command Line Build Step and Grails 2.3.4 and always getting following errors:

"
[10:56:55][Step 1/1] |Loading Grails 2.3.4

[10:57:02][Step 1/1] |Configuring classpath
[10:57:13][Step 1/1] Error |
[10:57:13][Step 1/1] Resolve error obtaining dependencies: Failed to read artifact descriptor for xalan:serializer:jar:2.7.1 (Use --stacktrace to see the full trace)
[10:57:13][Step 1/1] Error |
[10:57:13][Step 1/1] Resolve error obtaining dependencies: Failed to read artifact descriptor for javax.servlet:javax.servlet-api:jar:3.0.1 (Use --stacktrace to see the full trace)
[10:57:14][Step 1/1] Error |
[10:57:14][Step 1/1] Resolve error obtaining dependencies: Failed to read artifact descriptor for javax.servlet:javax.servlet-api:jar:3.0.1 (Use --stacktrace to see the full trace)
[10:57:15][Step 1/1] Error |
[10:57:15][Step 1/1] Resolve error obtaining dependencies: Failed to read artifact descriptor for javax.servlet:javax.servlet-api:jar:3.0.1 (Use --stacktrace to see the full trace)
[10:57:16][Step 1/1] Error |
[10:57:16][Step 1/1] Resolve error obtaining dependencies: Failed to read artifact descriptor for javax.servlet:javax.servlet-api:jar:3.0.1 (Use --stacktrace to see the full trace)
[10:57:16][Step 1/1] Error |
[10:57:16][Step 1/1] Failed to read artifact descriptor for xalan:serializer:jar:2.7.1
[10:57:16][Step 1/1] |Run 'grails dependency-report' for further information."


This project is properly built when I am using the Windows console.
Can someone please help me out with this or is any further information (configs, logs...) needed?

Thanks in advance.
Felix
8 comments
Comment actions Permalink

Hi,

Could you please run your project via command line on the same machine as the TeamCity agent and under the same user that the agent is running, with the same environment variables and the same working directory (for more details see this section)? Does it run successfully?

0
Comment actions Permalink

Hi Alina,

thanks for your quick reply.
As I may have mentioned earlier: I am running TC for testing purposes only, i.e. I am the only agent and TC is installed on my machine. I am already using the same working directory and env. variables for TC and Windows command line.  

0
Comment actions Permalink

Any other suggestions?

0
Comment actions Permalink

Even after further testing I cannot resolve the issue. I would really appreciate any help @Jetbrains support.

0
Comment actions Permalink

Hi,

Sorry for delay.
Could you please try to run agent via console (not as service) using agent.bat file?
If it does not help, please attach full build log and command line which you run in command line.
Do you have any antivirus installed? If yes, please try to switch it off.
Have you tried to add more Grails logs, maybe it will provide more detailed error description?

0
Comment actions Permalink

Hi Alina,

better late than never ;).
Anyways, your suggestion does the trick -  it now compiles well within TC.
But what is the difference between starting TC as service (I already started and terminated the service as admin before) and starting the agent.bat separately via the command line?
Thanks for your help!
Regards

0
Comment actions Permalink

When you start agent via console it means that user (I think this is the reason) and environment variables are the same as used when build is started via console. Please double-check that admin user have restrictions for needed files (to check under which user agent was started you can run Command Line build step with "whoami" command).  Also please read this section for more information.

0
Comment actions Permalink

Also we have a related feature request. If it is interesting for you, please watch/vote for it.

0

Please sign in to leave a comment.