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.
The project only accounts for dependencies in plugins, and the project's local lib directory; however, if a dependency is specified using the BuildConfig's dependency style (see example below), the jar is not added to the compile classpath Sample dependency statement from BuildConfig.groovy dependencies { compile('org.apache.solr:solr-solrj:3.1.0') { excludes 'xalan', 'xml-apis', 'slf4j-jdk14' } } Product Version = NetBeans IDE Dev (Build 20111208-9a6d846d5dc2) Operating System = Linux version 3.0.0-13-generic running on amd64 Java; VM; Vendor = 1.6.0_26 Runtime = Java HotSpot(TM) 64-Bit Server VM 20.1-b02
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.