Can't include *.lib files in a war (exploded) artifact
Answered
I am in need of including a number of *.lib files in the WEB-INF/lib directory of a war artifact, but these eventually do not show up, neither the exploded or the archive one.
While I could take a workaround by brewing an ant or maven script to build the war, I've read from another post here that Idea automatically ignores certain file types, and the user can customize which files are ignored. Alas, this post was rather old and referred to an older version of the ide, and I actually couldn't find the proper section in the Settings dialog.
Is there a way to simply include those *.lib files in a generic artifact?
Please sign in to leave a comment.
Where are these files located? If they are in the resource directory, they will be copied to the output (and to the artifact) automatically.
You can also configure the artifact manually by including certain directories or files, see https://www.jetbrains.com/help/idea/artifacts.html.
The module is a barebone web application, imported from an Eclipse project, with all of its dependencies stuffed in the WEB-INF/lib directory, among other support files, as you can see in the following two pictures.
(notice the last file of the second picture, the one called sigar-x86-winnt.lib)


This is the standard exploded war artifact associated with the module
And this is the result, as per the build action being performed.
I tried moving all the non-jar dependencies into a separate directory, named "support", as you can see in the following picture:
Then I specified that its content should be included inside the WEB-INF/lib directory in the final artifact

Yet the .lib file was not there
I tried even with explicitly specifying the file name, but with no success.
I also registered the *.lib extension in Settings > Editor > File Types among the recognized file types as "Binary Library", and double-checked that it didn't appear in the field "Ignore files and folders".
Please file a bug at https://youtrack.jetbrains.com/issues/IDEA with idea.log and build.log attached after reproducing the problem. Make sure to enable debug logging for build.log as described at https://intellij-support.jetbrains.com/hc/articles/207241085. If you could provide a reproducible test case project, that would be even better.
I also don't have Binary Library in the File Types.
Thank you Serge, I've just opened the issue on your tracker.