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.

Bug 254464 - Grails 3 Project structure.
Summary: Grails 3 Project structure.
Status: VERIFIED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Grails (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: bruno.flavio
URL:
Keywords:
Depends on:
Blocks: 254336
  Show dependency tree
 
Reported: 2015-08-17 22:10 UTC by bruno.flavio
Modified: 2016-02-11 07:53 UTC (History)
4 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
Proposed patch: creates a ProjectFiles category and hides the target folder. (15.42 KB, patch)
2015-09-13 18:03 UTC, bruno.flavio
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bruno.flavio 2015-08-17 22:10:51 UTC
Grails 3 introduced changes in the folder structure:

[gradle folder]
The gradle folder is incorrectly seen as a source folder, it contains the gradle wrapper.

['build' folder]
The 'build' folder contains compiled sources, which shouldn't be visible (unless this interferes somehow with autocomplete?), this problem also exists in grails2 with the 'target' directory.

[build.gradle]
The build.gradle file is the build descriptor (akin to the pom.xml in a maven structure) and should be visible in the project tree.

[gradle.properties]
The gradle.properties is less important but still a configuration file that should appear in the project. The grails 2 application.properties file has the same issue.
Comment 1 bruno.flavio 2015-08-17 22:12:44 UTC
The grails upgrading page contains useful information to determine what changed from the previous version: https://grails.github.io/grails-doc/latest/guide/upgrading.html
Comment 2 Jiri Kovalsky 2015-09-04 15:25:39 UTC
Hi Bruno, any update on this?
Comment 3 bruno.flavio 2015-09-08 22:37:19 UTC
I'm producing a patch to make the build.gradle and gradle.properties visible on the project tree, so that the user doesn't need to switch from the Projects to the Files view to edit them.

It should also fix the same problem with application.properties on grails2.
Comment 4 Jiri Kovalsky 2015-09-09 16:38:19 UTC
Removing waiver request keyword as P3 tasks don't need this. At the same time updating the blocked issue accordingly.
Comment 5 bruno.flavio 2015-09-13 18:03:12 UTC
Created attachment 156136 [details]
Proposed patch: creates a ProjectFiles category and hides the target folder.

The proposed patch has the following changes:

  1. Registers a new handler for the "Project Files" so that the application.properties in grails 2 and the build.gradle + gradle.properties in grails 3 exist in the project tree.

  2. Hides the 'target' and 'gradle' folders from the project tree: these folders don't contain sources and as such should not appear as source folders.

  3. Updates the grails icon to the one users currently expect. The previous icon stoped being used somewhere in 2009 and is now almost impossible to associate with grails ( http://web.archive.org/web/20090501000000*/http://www.grails.org ).

Regarding the third change, the original image comes from the grails project source code ( https://github.com/grails/grails-core/tree/master/media/icons ), under the apache v2 license. From what I've read ( http://www.apache.org/licenses/GPL-compatibility.html ) this should be compatible. Anyway, if this is not OK please just ignore the changes to both 'GrailsIcon16x16.png' files in the patch.
Comment 6 Jiri Kovalsky 2015-10-14 06:31:11 UTC
Bruno, do you rather want to integrate this change yourself? The patch has still not been applied.
Comment 7 bruno.flavio 2015-11-14 01:37:30 UTC
I've applied the patch in revision 4ce422512967:

http://hg.netbeans.org/core-main/rev/4ce422512967
Comment 8 Quality Engineering 2015-11-15 02:35:19 UTC
Integrated into 'main-silver', will be available in build *201511150002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/4ce422512967
User: Bruno Fl
Comment 9 Jiri Kovalsky 2015-12-14 14:32:42 UTC
Ahmad, could you please verify this bug so that it can be included in the 8.1 Patch 1? Thanks!
Comment 10 thruminds 2015-12-15 07:57:01 UTC
(In reply to Jiri Kovalsky from comment #9)
> Ahmad, could you please verify this bug so that it can be included in the
> 8.1 Patch 1? Thanks!

Grails 3 project structure is OK now. Application is now recognized as a Grails project and create-app, create-domain-class, generate-all and run-app commands are working and tested.

Tested on dev build 201512140002.
Comment 11 Jiri Kovalsky 2015-12-15 10:16:25 UTC
Thanks Ahmad. Updating fields accordingly.
Comment 12 pavelkahle 2015-12-26 14:14:47 UTC
Regarding to grails 3 support in Netbeans I did some tests on Dev 201512260002 .

I created new empty grails 3.0.11 project with following results :

1. Cannot create integration and unit test - see Report 221846

2. In the project window  I don't see src folder 

3. I cannot run / debug  particular integration or unit test... (option in context menu is grey) 

4. If I want to create new Groovy Junit test then I cannot choose correct location -there is no location for src...

5. Some Imports and some annotaions (for example @Integration) are marked as unresloved in code editor for files in src folder although project can be correctly builded using gradle...

6. Run Debug grails command results in window with message <There is no command matching the current filter> although no filter is set

7. Grails shell results : Error The Grails shell must be run from Gradle using 'gradle shell -q'
Comment 13 Jiri Kovalsky 2015-12-27 15:14:56 UTC
Pavle, please don't change resolutions arbitrarily. If I am not mistaken, you didn't contribute any source code nor you were given authority to decide what to do with this issue. Moreover complaining about 7 diverse issues in 1 task report is not helpful at all. If you feel something is wrong, please submit a separate bug report for each individual defect you see. Otherwise we end up with a total mess. Thank you for your understanding and cooperation.
Comment 14 Jiri Kovalsky 2016-01-27 17:57:08 UTC
Bruno, can you please integrate this fix to release81 branch by 1/31? Thanks!
Comment 15 bruno.flavio 2016-01-28 22:45:32 UTC
The fix has been applied to the release81 branch.
Comment 16 Jiri Kovalsky 2016-01-29 07:45:25 UTC
Thanks Bruno. Do you have changeset number?
Comment 17 bruno.flavio 2016-01-29 08:22:45 UTC
Sorry, here it is:

Fix: http://hg.netbeans.org/releases/rev/dcab484a1df0 

Spec version and message update: http://hg.netbeans.org/releases/rev/e6a78d0b0996