netbeans-gradle-project
netbeans-gradle-project copied to clipboard
Some JSF tags are not recognized
I just migrated a project from maven to gradle. Everything works so far, the only issue is that netbeans does not recognize some JSF namespaces (xmlns:components="http://xmlns.jcp.org/jsf/composite/components" for instance), so I don't have autocomplete in some xhtml files.
Other libraries not declared in web.xml (only dependency included) are recognized fine (primefaces for instance).
Looks like web.xml is not recognized. Any ideas?
JSF 2.2, Tomee 7.0.3
You should try installing the Gradle JavaEE plugin as well (I'm not using it, so don't know what exactly it supports).
Thanks for your response. I tried the plugin with no luck (no autocompletion at all, seems broken). I tried to build i t with netbeans 8.2 and version 1.4.0 of your plugin, but didn't work.
I will try a couple of things tomorrow...
If you send me a link to a simple project and with that describe what exactly do you expect to happen where, I will try to find what is needed and might send a pull request to the EE plugin.
I tried some modifications in the gradle Java EE plugin but I didn't succeed.
I made a simple example in https://github.com/cocorossello/nb-gradle-java-ee-example
When the gradle Java EE plugin is activated I get no autocompletion at all. At least, with only your plugin I do get almost all support, the only thing is that some JSF tags are not recognized (I think that netbeans guesses that the project is JSF 1.2 targeted). So, I think that if this plugin recognizes this project as java EE 7 there is no need for other plugin at all as everything else works as expected.
This sample project should target Java EE 7, and in my opinion it can infer this by just looking at the META-INF/beans.xml . If the schemaLocation is .../beans_1_1.xsd it's java EE 7 and if it's .../beans_1_0.xsd it should be Java EE 6. (the content of the file is optional, but I think that any "serious" project has it, another option would be looking at web.xml, but is also optional). See https://antoniogoncalves.org/2013/06/04/java-ee-7-deployment-descriptors/
Thanks for your support!
I assume NB wants a random interface to be implemented, I'll try to have a look at what the Maven plugin does and see how it can be implemented sometime this week.
I have tried to adjust a couple of things but I don't think it helped (though I'm unsure what supposed to work and what not). Anyway, you can see my fork of the netbeans-gradle-javaee-project plugin using the jsf-tweaks branch and see if it helps you. Also, based on the last commits (f5890d83, 441bc6e4) on that branch, you can also try if you have any idea what NB might need.
I tried a few things, but didn't work. I don't have any experience with netbeans plugins and I am unable to download sources for those libraries. Isn't it a problem that JsfSupportHandle is deprecated? I tried to get away with JsfSupportProvider but I couldn't.
Will try something else.
Anyway, thanks!
I don't know if it is a problem or not. However the Maven plugin of NB uses JsfSupportHandle
as well.
If you just want to jump around the sources: "Download sources" on the dependencies node should work.
As for NB's sources. You can get it from here: https://github.com/emilianbold/netbeans-releases.git (as far as I know this will be the official repo, once the move to Apache completes). You will need Ant (I have 1.10.1 but the latest should be fine as well) and build NB (ant build
) before opening the subprojects in NB.
Sorry, it's been a few weeks since last message.
I've tried to run the plugin with your changes (gradlew run) and I get a java.lang.ClassNotFoundException: org.netbeans.modules.j2ee.persistence.spi.PersistenceScopesProvider error. (same without your changes). Which it doesn't make sense since the dependency is declared in providedCompile netbeansModule('org.netbeans.modules', 'org-netbeans-modules-j2ee-persistenceapi')
(using the release82)
I don't really understand, because I don't get that error installing the nbm file, so it must be something with my build.
My gradle.properties are: netBeansExecutable=C:\Program Files\NetBeans 8.2\bin\netbeans64.exe jdk7Compiler=C:\Program Files\Java\jdk1.7.0_80\bin\javac.exe
Has this something to do with signing the plugin or similar?
It is probably because of NB 8.2. Can you try with NB 8.1? Because currently, I have some troubles with 8.2.