apache / apache/grails-intellij-plugin

Grails project with spring-security-core doesn't build in IDEA, works from command line

Open
#216 0 comments 0 reactions 0 assignees View on GitHub
bug imported-from-youtrack
Dominant language
Java
Stars
17
Forks
4
Avg merge
5d 15h
Merged PRs (30d)
4

Description

Support feedback:

This grails project builds from the command line (with grails war), or by running Build - Make Grails Web Archive, but fails when I run Build - Rebuild Project.

Sample errors (with ... in place of the project name to reduce noise):
```
From one of the plugins:
.../target/work/plugins/asset-pipeline-2.5.0/src/groovy/asset/pipeline/grails/fs/SpringResourceAssetResolver.groovy
Error:(21, 1) Groovyc: unable to resolve class asset.pipeline.GenericAssetFile

And from one of my groovy classes:
.../src/groovy/.../SecurityUtils.groovy
Error:(4, 1) Groovyc: unable to resolve class grails.plugin.springsecurity.SpringSecurityService
```
What might cause this?

Created a new grails project - Rebuild Project worked without any errors.
Added this dependency to BuildConfig.groovy, which caused it to fail:
compile ":spring-security-core:2.0-RC5"

It still builds with 'grails war'.

Added a number of other dependencies from my project, many of which also failed.

The very barebones project is attached - just dependencies added, no other code.

---

*Imported from [IDEA-144595](https://youtrack.jetbrains.com/issue/IDEA-144595) · Type: Bug · Votes: 1*
*Comments, attachments, dates and reporter are not part of the export — follow the link above for the full history.*

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the attached barebones Grails project and its BuildConfig.groovy dependency on spring-security-core:2.0-RC5. Compare IntelliJ IDEA's Build - Rebuild Project with the successful grails war command, focusing on the unresolved asset.pipeline.GenericAssetFile and SpringSecurityService classes. Done means the project rebuilds in IDEA without these resolution errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, spring
Domain
build-system, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.