Search code examples
netbeans-8jodd

Using jodd Java framework in netbeans web application project


I'm currently following the jodd example from jodd website, instead of using gradle I'm creating a web application project in netbeans and adding required jodd jars this the project. The reason I'm using this approach is that I can't open the examples in netbeans even though I'm using the netbeans gradle plugin but I'm still trying to get this sorted, this is my first problem.

My second problem is that when I look at the directory structure of the example and the directory structure my own setup, the app.props file is not found when I run the project from the IDE hence the project is not deployed to tomcat. I tried mimicking the example projects directory structure but still resources\app.props is not found and I don't know where go from here.

Please guys help me.


Solution

  • I am not a NetBeans user, and I never understood how it works, but what I can suggest you is the following:

    1. First make sure project compiles from command line, using gradle. For example, download source from step #2, unzip it to some folder and run gradlew build. This should work.

    2. Note that gradle is using the Maven folder structure. There is nothing specific with that. This means that NetBeans should be aware at some point of configuration about this structure.

    3. Try to build a war first in NetBeans and then deploy it to Tomcat. I guess NetBeans is capable of build wars :)

    4. Shoudn't be there a way how to mark a resource folder for a web project in NetBeans?

    5. important: some IDEs have some default set of extensions that are considered as 'resources', like .properties, .xml etc. This may be the reason why NetBeans is not seeing app.props as a resource file. So try to find this configuration in NetBeans and change it to also accept the *.props files.

      For the test, just add some foo.properties in resource folder next to app.props and check if it gets packaged.

    6. Install IntelliJ IDEA :)