This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Grails project doesn't resolve compile time dependencies specified in BuildConfig | ||
---|---|---|---|
Product: | groovy | Reporter: | akochnev <akochnev> |
Component: | Grails | Assignee: | Martin Janicek <mjanicek> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | athompson, dcastro, gustaven, pjiricka |
Priority: | P3 | ||
Version: | 7.1 | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://grails.org/doc/1.3.7/guide/3.%20Configuration.html#3.7 Dependency Resolution | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | patch to resolve compile dependencies |
Description
akochnev
2011-12-09 16:19:46 UTC
Created attachment 114007 [details]
patch to resolve compile dependencies
Thanks a lot! This seems reasonable. I'm going to test the patch and will integrate after. Alex, I've seen that in your patch you are calling BuildConfig.getCompileDependencies(). Because you were testing Groovy parser with this patch integrated you probably have also some concrete implementation of this method, right? Could you attached it as well? Thanks in advance. M. Martin - I'm not sure how I missed it, below is the implementation of BuildConfig.getCompileDependencies public synchronized List<File> getCompileDependencies() { List<File> deps = new ArrayList<File>(); assert Thread.holdsLock(this); try { if (buildSettingsInstance != null) { Method getCompileDependenciesMethod = buildSettingsInstance.getClass().getMethod("getCompileDependencies", // NOI18N new Class[] {}); List<File> depsList = (List<File>)getCompileDependenciesMethod.invoke(buildSettingsInstance, new Object[] {}); deps.addAll(depsList); } } catch (NoSuchMethodException ex) { LOGGER.log(Level.FINE, null, ex); } catch (IllegalAccessException ex) { LOGGER.log(Level.FINE, null, ex); } catch (InvocationTargetException ex) { LOGGER.log(Level.FINE, null, ex); } return deps; } I've integrated patch (to groovy_parser branch for now): web-main #235b88d3d85d Changeset #4aebb18f9a63 reverted the fix that made the project take into consideration dependencies specified in BuildConfig. One of the concerns w/ adding the dependencies was the indexing implications; however, now that Issue #180230 is resolved, this really should go back in. Actually the fix has never been in trunk (I've push the change sets into the groovy_parser branch which were dropped out at the end). I'm going to make the changes in trunk as well. *** Bug 184895 has been marked as a duplicate of this bug. *** Also please don't forget inline plugins, such as: grails.plugin.location.'core-plugin'="../CorePlugin" This does not appear to have made into the trunk. Fixed in: web-main #64d25569108c Integrated into 'main-golden', will be available in build *201211250002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/64d25569108c User: Martin Janicek <mjanicek@netbeans.org> Log: #206199 - Grails project doesnt resolve compile time dependencies specified in BuildConfig This issue seems to be happening for in 7.3 (Build 201302132200) / Groovy plugin ver. 1.25.1. Are there any workarounds I can put in place so that a plugin's libraries are picked up? The plugins are listed in BuildConfig.groovy in the plugins { } section. Not working in 7.3 for me either. Seems to work in the current development build though, 201304292301 Sorry, i am taking the last comment back, does not work there either. |