Maven中资源文件夹的用途是什么? [英] What is the purpose for the resource folder in Maven?

查看:530
本文介绍了Maven中资源文件夹的用途是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用之前由另一个开发人员在项目上使用的Eclipse。大多数东西被标记为红色和破碎。查看
src / main / java /...
中的文件以及
中相同的文件java resources / src / main / java ...

Using Eclipse that was being used prior on the project by another developer. Most things are flagged as red and broken. Seeing files in src/main/java/... and the same exact files over in java resources/src/main/java...

只是混淆什么是什么,什么是临时,什么保持垃圾或如何修复项目环境。

Just confused over what is what, what is temp, what to keep to trash or how to fix the project environment.

对此有任何简单的解决方法吗?

Any easy fix to this?

推荐答案

root 级别的任何内容都没有标准,名为 resources

There's no standard for anything at the root level called resources.

src / main / resources 通常是您应该将非Java工件放入正常的包层次结构中的位置,例如作为类路径资源加载的XML配置文件。

src/main/resources is normally where you put non-Java artifacts that should be moved into the normal package hierarchy, like XML config files loaded as classpath resources.

除了说检查你的Maven文件以查看是否有任何内容实际引用这些文件之外,除此之外不可能提供更多帮助,特别是如果有任何内容生成文件或将其移动到那里作为装配过程的一部分,但同样,这将是非标准的Maven使用。

It's impossible to help much beyond that, other than to say "check your Maven file to see if anything actually references those files", particularly if anything generates files to there, or moves them there as part of an assembly process, but again, that would be non-standard Maven usage.

这篇关于Maven中资源文件夹的用途是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆