Assets.jar is not being built

In short, I cannot get an assets.jar file to be built.



For various reasons, I have created (in JMP3.0beta) my project via “Java/Java Class Library”, that is, not a JME Basic Game template.

I have been able to add the JME3 libraries, and that all works correctly.

However I require an asset folder with this project. So I created the folder, and configured the projects settings “Build → Assets” as follows



Assets JAR Name: assets.jar
Assets JAR Excludes:
Assets Folder Location: assets


The assets appear correctly in the project browsers under the "Project Assets" element. However, the assets.jar file never gets built, even via a complete "Clean and Build".
Therefore, when I try to load assets via getAssetManager().loadMaterial(...) I get the following error
[java]com.jme3.asset.AssetNotFoundException: Textures/...[/java]

Is there something I am missing, or can I not use an assets folder with this type of project?

PS: I have been able to add the assets folder as a source folder, and this works. However this seems to be the less 'nice' option as the assets are bundled into the source code dist.

Hm, try adding the assets folder in the “run” section of the library properties (thats whats happening in the SDK so it doesn’t appear in the sources list). If that doesn’t work create a BasicGame project and copy over the code.

So the reason I was using the Class Library is that this project is included as a library into other projects. (i.e. it has a core set of code)

When I had created it as a BasicGame, there were strange problems with including the library into other projects, with the other project not being able to recognise any classes in the core library.

Re-trying this today (with the core as a BasicGame) I have not encountered the same problem, so perhaps I did somethings strange the first time.



Thanks.

@time said:
Re-trying this today (with the core as a BasicGame) I have not encountered the same problem, so perhaps I did somethings strange the first time.


Could be. I do this all the time without issue. Mythruna is actually four separate projects... and I have several other prototype projects that include different pieces of it. Seems to work fine.