英文:
How to automatic include Resources in JAR file using Intellij and Gradle (with setted "Build and run = IntellijIdea")?
问题
我使用IntelliJ Idea Community 2020.1与Gradle。
我不得不设置“设置 > 构建、执行、部署 > Gradle > 使用IntelliJ Idea构建和运行”。因为只有在这种情况下,IDE才能正确初始化表单。
但是,当我创建Jar文件时,IDE不会将Resources文件夹包含在存档中。我认为这是因为这个文件夹位于src目录之外。
现在,我通过根据答案Intellij资源不在构建的成果物中在“输出布局”中手动添加Resources来解决了这个问题。
因此,问题是“是否有另一种正常简便的方法将Resources包含在Jar中?”
英文:
I use IntellijIdea Community 2020.1 with Gradle.
I had to set "Settings > Build, Excecution, Deployment > Gradle > Build and run using = IntelliJ Idea". Because only in this case IDE initializes forms properly.
But IDE does not include folder Resources in archive when I create Jar-file . I think, its because this folder places out of src directory.
Now I solved this problem by adding Resources manualy in "Output layout" according the answer Intellij resources not in built artifact.
So the question is "Is there a way to include Resources in Jar by another normal easy way?"
专注分享java语言的经验与见解,让所有开发者获益!
评论