apache / apache/netbeans

"Resource-only" sub projects are not show correct with gradle

Open
#8,180 0 comments 0 reactions 0 assignees View on GitHub
Gradle kind:bug needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 24

### What happened

In a regular Java project, an additional node "Other Sources" is shown for anything below `src/main/resources`.

If a gradle sub-project only consists of such a "resource" directory, this is not visible in the projects window in NetBeans.

The use case for such a sub-project is e.g. to have a common place for resource files across multiple sub-projects in a bigger (main) project.

I am working within a team where all others are using IntelliJ and it works there, so changing the project structure to fix this, isn't an option.

### Language / Project Type / NetBeans Component

Java project using Gradle

### How to reproduce

Unzip the attached archive (gradle-resource-only.zip) into an empty directry, then open the project. NetBeans will show two sub-projeccts: "application" and "commons". The commons sub-project has another sub-project called "sample-data". If that is opened in NetBeans, only "Configurations" and "Build Scripts" will be shown below the project's node. I expected another node "Other Sources" where the resource files can directly be accessed from within the project window (same as with the "application" sub-project).

[gradle-resource-only.zip](https://github.com/user-attachments/files/18509172/gradle-resource-only.zip)

### Did this work correctly in an earlier version?

No / Don't know

### Operating System

Windows, Linux

### JDK

JDK 17, JDK 21 (from Adoptium)

### Apache NetBeans packaging

Apache NetBeans binary zip

### Anything else

_No response_

### Are you willing to submit a pull request?

No

Contributor guide

Open the contributing guide

Research direction

Unzip gradle-resource-only.zip and open the project in NetBeans 24 to reproduce the missing node for the resource-only sample-data sub-project. Trace how the Gradle project is represented in the Projects window, comparing it with the application sub-project. Done means the resource-only sub-project exposes an "Other Sources" node containing its resource files.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.