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.
Please try: - create a new Java Web project, all default - create a new .bowerrc file using New File wizard => content in created file is { "directory": "bower_components" } but it should point to web folder, e.g. { "directory": "web/bower_components" } Thank you Product Version: NetBeans IDE Dev (Build 201504110001) Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Linux version 3.13.0-45-generic running on amd64; UTF-8; en_US (nb)
Similar problem is with Maven Web Project. I don't know Maven that good enough but since NetBeans can show "Web Pages" node in Projects view, .bowerrc could point to that folder as well I guess :)
Since the fix needs to be done in java.api.common module, adding Tomas to CC. Tome, is it OK to push this change? If yes, can I do it? Thanks.
Created attachment 153188 [details] proposed fix
Tome is it really needed. The dependency of the java.api.common on the web.* seems suspicious to me. The template system asks all the registered CreateFromTemplateAttributesProviders and collects all the attributes. Other solution is to create a new WebCreateFromTemplateAttributesProviderImpl in the web module adding the webRoot attribute and register it into projects lkp (better) or global lkp (worse).
After discussion with Tomas, I will decorate class from java.api.common. Thanks.
So, I am able to easily do it for Ant Web Project. Unfortunately, no idea how this should be done for Maven. In Maven, TemplateAttrProvider in "maven" module is used, apparently even for Maven Web Project. So, one solution would be to simply add it there but not sure if it is correct; I don't think so, I would expect maven.j2ee to be the proper module for it. Martine, could you please advice? Thanks.
Created attachment 153225 [details] Proposed fix for Ant Web Project Could be easily improved and put in j2ee.common module and used in both Ant and Maven Web projects, if needed (via @ProjectServiceProvider).
After discussion with Martin, the common TemplateAttrProvider can be improved to handle also project.webRootPath. Attaching diff.Thanks.
Created attachment 153283 [details] Proposed fix for Maven (Web) Project
BTW the patch for Maven requires adding dependency on web.common module (which is in the ide cluster). Thanks.
Should be fixed now, for both Ant and Maven Web Project types. Please verify, thanks. http://hg.netbeans.org/web-main/rev/a26cb51895ff http://hg.netbeans.org/web-main/rev/6442baa35516
Integrated into 'main-silver', will be available in build *201504220001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/a26cb51895ff User: Tomas Mysik <tmysik@netbeans.org> Log: #251780 - Wrong .bowerrc path in Java Web project Ant Web Project part.