gpt4 book ai didi

Java Project 与 Maven Project (Eclipse),需要澄清目录结构

转载 作者:塔克拉玛干 更新时间:2023-11-03 03:08:17 26 4
gpt4 key购买 nike

当我在 Eclipse 中创建一个新的 Maven 项目时,目录结构包含 src/main/javasrc/main(在下面)

问题:我知道我的代码应该属于 src/main/javasrc/main 的目的是什么?为什么 Eclipse 创建它?

enter image description here

最佳答案

src/main/java 是 Maven 用于放置 Java 源代码的标准布局。

检查 http://java.sg/maven-standard-directory-layout/获取标准 Maven 目录的列表。

src/main/java       Application/Library sources
src/main/resources Application/Library resources
src/main/filters Resource filter files
src/main/assembly Assembly descriptors
src/main/config Configuration files
src/main/webapp Web application sources
src/test/java Test sources
src/test/resources Test resources
src/test/filters Test resource filter files
src/site Site
LICENSE.txt Project's license
NOTICE.txt Notices and attributions required by libraries that the project depends on
README.txt Project's readme

关于Java Project 与 Maven Project (Eclipse),需要澄清目录结构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6099103/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com