You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Juan Roberto (JIRA)" <ji...@apache.org> on 2019/04/24 17:34:00 UTC

[jira] [Comment Edited] (NETBEANS-2249) Web Pages folder not shown in Gradle projects with 'war' plugin

    [ https://issues.apache.org/jira/browse/NETBEANS-2249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16825370#comment-16825370 ] 

Juan Roberto edited comment on NETBEANS-2249 at 4/24/19 5:33 PM:
-----------------------------------------------------------------

Sorry for the late response.

Thank you [~lkishalmi] for the clarification and your continuous contributions to netbeans.

To [~jimmc929], the trick is just adding the web folder as additional source files in the build.gradle, something like this:

sourceSets {
     main {
         java {

            srcDir 'src/main/webapp'

        }

    }
 }

If your java files are in "src/main/java" (the default folder where gradle expects them) you don't need to specify them additionally in the SourceSets, but in case they're not I believe the syntax is something like {{srcDirs = ['folder/to/java/files', 'src/main/webapp']}}

It's very ugly, but at least they'll show up in the "Projects" pane.

Also, I was about to tell you to don't get rid of your project.webAppDirName = 'src/main/webapp' as I believe it's needed for your web files to be copied to your war, but since your using the default folder maybe you don't need it [https://docs.gradle.org/current/userguide/war_plugin.html], some testing is in order.

 


was (Author: jalgaba):
Sorry for the late response.

Thank you [~lkishalmi] for the clarification and your continuous contributions to netbeans.

To [~jimmc929], the trick is just adding the web folder as additional source files in the build.gradle, something like this:

sourceSets {
    main {
        java {
            srcDir 'src/main/webapp'
        }
    }
}

If your java files are in "src/main/java" (the default folder where gradle expects them) you don't need to specify them additionally in the SourceSets, but in case they're not I believe the syntax is something like {{srcDirs = ['folder/to/java/files', 'src/main/webapp']}}

It's very ugly, but at least they'll show up in the "Projects" pane.

Also, I was about to tell you to don't get rid of your project.webAppDirName = 'src/main/webapp' as I believe it's needed for your web files to be copied to your war, but since your using the default folder maybe you don't need it [https://docs.gradle.org/current/userguide/war_plugin.html], some testing is in order.

 

> Web Pages folder not shown in Gradle projects with 'war' plugin
> ---------------------------------------------------------------
>
>                 Key: NETBEANS-2249
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-2249
>             Project: NetBeans
>          Issue Type: Improvement
>          Components: javaee - Web Project, projects - Gradle
>    Affects Versions: 11.0
>         Environment: Product Version: Apache NetBeans IDE Dev (Build incubator-netbeans-release-395-on-20190310)
> Java: 11.0.2; OpenJDK 64-Bit Server VM 11.0.2+9
> Runtime: OpenJDK Runtime Environment 11.0.2+9
> System: Linux version 4.15.0-46-generic running on amd64; UTF-8; es_CL (nb)
>            Reporter: Pablo Carmona A.
>            Priority: Major
>
> After I add "apply plugin: 'war'" to file build.gradle of a new generated Gradle project, the project's icon is shown with a globe symbol, like in web projects, but I can not see the web files neither I can launch it with a configured server. I would like to be able to run it as same as Maven web projects.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists