How to automatic include Resources in JAR file using Intellij and Gradle (with setted "Build and run = IntellijIdea")?

huangapple 未分类评论50阅读模式
英文:

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?"

huangapple
  • 本文由 发表于 2020年5月29日 16:52:11
  • 转载请务必保留本文链接:https://java.coder-hub.com/62082102.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定