๐ŸŒ
Apache Maven
maven.apache.org โ€บ guides โ€บ introduction โ€บ introduction-to-the-standard-directory-layout.html
Introduction to the Standard Directory Layout - Apache Maven
Within artifact producing source directories (ie. main and test), there is one directory for the language java (under which the normal package hierarchy exists), and one for resources (the structure which is copied to the target classpath given the default resource definition). If there are other contributing sources to the artifact build, they would be under other subdirectories. For example src/main/antlr would contain Antlr grammar definition files.
๐ŸŒ
Java Code Geeks
examples.javacodegeeks.com โ€บ home โ€บ java development โ€บ core java โ€บ maven
Maven Project Structure Example - Java Code Geeks
April 11, 2019 - The pom (Project Object Model) file is a maven special file that describe how the project have to be build and from when maven should download artifacts/dependencies, what are those dependecies and so many more things. This file is placed on the root project folder. You can put more folders inside of the project structure, but in those cases you have to instruct maven on the build tag of the pom file in order to manage those folder.
Discussions

How strictly should I follow the standard Maven project structure?
Please ensure that: Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions You include any and all error messages in full - best also formatted as code block You ask clear questions You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions. If any of the above points is not met, your post can and will be removed without further warning. Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png ) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc. Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit. Code blocks look like this: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above. If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures. To potential helpers Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
๐ŸŒ r/learnjava
7
3
July 16, 2023
what's with a Java project folder structure ?

It depends on the build system in use for the project.

In the days of Ant or if you let the IDE set it up for you without specifying a build, it was mostly:

src/
bin/

Maven and Gradle use the Maven Standard Directory Layout ( https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html )

src
  main
    {lang}
      packages
    resources
  test
    {lang}
      packages
    resources

You can see that when using Gradle for groovy - https://docs.gradle.org/current/userguide/groovy_plugin.html#sec:groovy_project_layout the lang for the groovy sources is 'groovy'. This is important if you mix groovy, scala, kotlin, and java all in one project. For example (not my project, just one I found out there) https://github.com/bellingard/sample_multi-language-project

More on reddit.com
๐ŸŒ r/javahelp
9
8
September 22, 2018
Maven / project structure question.
In short, all you really need to do is add a dependency clause to your pom.xml and run maven. The pom should be located in the root directory of your project. For IntelliJ to recognize things you should 'import' the pom.xml (or enable auto-importing). If you hit View/Tool Windows/Maven in the menus (I think that's right, but don't have IntelliJ open) you will get a window with the controls do do that, and your dependency should resolve. More on reddit.com
๐ŸŒ r/javahelp
11
3
August 13, 2016
Getting Started with JavaFX 11

JavaFX is a great framework for that use case but it needs some marketing love. At last JUG meeting people was genuinely convinced that Oracle killed it by popping it out the JDK.

More on reddit.com
๐ŸŒ r/java
20
45
July 21, 2018
๐ŸŒ
Medium
medium.com โ€บ @khileshsahu2007 โ€บ maven-multi-module-project-guide-structure-examples-real-world-challenges-d867ff22a0a8
Maven Multi-Module Project Guide: Structure, Examples & Real-World Challenges | by Khilesh Sahu | Medium
April 20, 2025 - A multi-module Maven project is a collection of Maven projects (called modules), all tied together under a single parent project. The parent project defines shared configuration โ€” like dependencies, plugins, and versions โ€” while each module ...
๐ŸŒ
Baeldung
baeldung.com โ€บ home โ€บ maven โ€บ apache maven standard directory layout
Apache Maven Standard Directory Layout | Baeldung
January 8, 2024 - A typical Maven project has a pom.xml file and a directory structure based on defined conventions:
๐ŸŒ
Apache Maven
maven.apache.org โ€บ guides โ€บ getting-started
Maven Getting Started Guide โ€“ Maven
After the archetype generation of your first project you will also notice that the following directory structure has been created: my-app |-- pom.xml `-- src |-- main | `-- java | `-- com | `-- mycompany | `-- app | `-- App.java `-- test `-- java `-- com `-- mycompany `-- app `-- AppTest.java ยท As you can see, the project created from the archetype has a POM, a source tree for your application's sources and a source tree for your test sources. This is the standard layout for Maven projects (the application sources reside in ${project.basedir}/src/main/java and test sources reside in ${project.basedir}/src/test/java, where ${project.basedir} represents the directory containing pom.xml).
๐ŸŒ
Medium
medium.com โ€บ @pvprasanth474 โ€บ understanding-the-maven-directory-structure-a-simple-guide-7c7d636ec614
Understanding the Maven Directory Structure: A Simple Guide | by PV Prasanth | Medium
January 9, 2025 - After Maven finishes building your project, it places everything it created (including all the compiled code) inside the target folder. This is like putting your robot in a showcase, ready to be used or shared. For example, when Maven finishes your project, you might see:
๐ŸŒ
Medium
tabrezshaikh13.medium.com โ€บ spring-boot-maven-project-structure-explained-a45448dcbd4f
Spring-Boot Maven project structure explained. - Tabrez Shaikh
October 7, 2021 - MavenWrapperDownloader.java These files help maven understand what type of packaging (JAR or WAR) is to be used the project and for projects that need a specific version of maven, we need not to install maven locally. Instead of installing many versions of maven, we can just use a project specific wrapper script that is provided when creating the spring boot project.
๐ŸŒ
Codefinity
codefinity.com โ€บ courses โ€บ v2 โ€บ 576fc95d-2c14-44fc-830e-75dfaeef1767 โ€บ a07a2a62-2c24-470c-8049-4b1d2e104857 โ€บ 999196d4-4387-49e4-bd87-0ae879188b69
Learn Standard Maven Project Structure | Getting Started with Maven
This standard structure is one of Maven's core strengths, as it ensures consistency across projects, simplifies build processes, and makes it easier for developers to understand any Maven-based codebase. The default Maven directory structure looks like this: ... com.example โ””โ”€โ”€ my-maven-app/ โ”œโ”€โ”€ pom.xml # Project Object Model file: defines project configuration and dependencies โ””โ”€โ”€ src/ โ”œโ”€โ”€ main/ โ”‚ โ”œโ”€โ”€ java/ # Main application source code goes here โ”‚ โ””โ”€โ”€ resources/ # Application resources (e.g., config files) go here โ””โ”€โ”€ test/ โ”œโ”€โ”€ java/ # Test source code (e.g., unit tests) goes here โ””โ”€โ”€ resources/ # Test resources (e.g., test data) go here
Find elsewhere
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ maven โ€บ maven_creating_project.htm
Maven - Creating Project
[INFO] [INFO] ------------------< org.apache.maven:standalone-pom >------------------- [INFO] Building Maven Stub Project (No POM) 1 [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] >>> archetype:3.4.0:generate (default-cli) > generate-sources @ standalone-pom >>> [INFO] [INFO] <<< archetype:3.4.0:generate (default-cli) < generate-sources @ standalone-pom <<< [INFO] [INFO] [INFO] --- archetype:3.4.0:generate (default-cli) @ standalone-pom --- [INFO] Generating project in Batch mode [INFO] -------------------------------------------------------------
๐ŸŒ
Reddit
reddit.com โ€บ r/learnjava โ€บ how strictly should i follow the standard maven project structure?
r/learnjava on Reddit: How strictly should I follow the standard Maven project structure?
July 16, 2023 -

Hi

I am learning Maven from the official docs. I see that it wants a src/main/java/com/mycompany/appname directory structure. So I did some googling on java packages and I see why these are useful. But my question is, is the java/com/ really necessary?

I really don't like all these nested folders. How about something like src/main/mycompany/appname? It's still a package right? However I am only a java novice so if there is a good reason for structuring it like this, I'd like to know.

๐ŸŒ
Apache Maven
maven.apache.org โ€บ guides โ€บ introduction โ€บ introduction-to-the-pom.html
Introduction to the POM - Apache Maven
But what if the parent is not yet installed and if the directory structure is as in the following example? . |-- my-module | `-- pom.xml `-- parent `-- pom.xml ยท To address this directory structure (or any other directory structure), we would have to add the <relativePath> element to our parent section. <project xmlns="http://maven.apache.org/POM/4.0.0"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.mycompany.app</groupId> <artifactId>my-app</artifactId> <version>1</version> <relativePath>../parent/pom.xml</relativePath> </parent> <artifactId>my-module</artifactId> </project>
๐ŸŒ
Adobe
experienceleague.adobe.com โ€บ en โ€บ docs โ€บ experience-manager-learn โ€บ cloud-service โ€บ developing โ€บ aem-projects โ€บ maven-project-structure
Learn about an AEM Maven project's structure. | Adobe Experience Manager
Because this is a multi-module maven project, there is a top level of a reactor project, and this is represented by the top level pom.xml file. The main purpose is to define any common plugins, dependencies, versions, or variables that might be used throughout any of the sub projects and have a centralized place to manage all of those.
๐ŸŒ
Java2s
java2s.com โ€บ Tutorials โ€บ Java โ€บ Maven_Tutorial โ€บ 1030__Maven_Directory_Structure.htm
Maven Tutorial - Maven Directory Structure
At the top of the project root there are pom.xml file and any properties, maven.xml. In addition, there are text files for the user to read immediately on receiving the source: README.txt, LICENSE.txt, etc. There are two subdirectories of this structure: src and target.
๐ŸŒ
Jenkov
jenkov.com โ€บ tutorials โ€บ maven โ€บ directory-structure.html
Maven Directory Structure
The standard Maven directory structure looks like this: myprojectdir - pom.xml - .mvn - jvm.config - src - main - java - resources - test - java - resources - target ยท The above directories are the most commonly used directories of a Maven project.
๐ŸŒ
O'Reilly
oreilly.com โ€บ library โ€บ view โ€บ java-ee-8 โ€บ 9781788833776 โ€บ 43a61672-4663-4de6-b336-a36a3c5a045e.xhtml
Maven project structure - Java EE 8 Development with Eclipse - Third Edition [Book]
June 29, 2018 - The Java package structure starts from the java folder, that is, src/main/java/<java-packages>. Web content such as HTML, JS, CSS, and JSP goes in the webapp folder under src/main. Compiled classes and other output files generated by the Maven build process are stored in the target folder:
Author ย  Ram Kulkarni
Published ย  2018
Pages ย  596
๐ŸŒ
Sybase
infocenter.sybase.com โ€บ help โ€บ topic โ€บ com.sybase.infocenter.dc01993.0302 โ€บ doc โ€บ html โ€บ nol1363976226656.html
Maven Project Structure - Sybase infocenter
February 12, 2014 - This directory structure is created automatically for a new project: Two Java files, App.java and AppTest.java, are created in the example folders, under main and test, respectively. The POM file, which contains the initial project configuration, is created in the customState folder. You can use this POM file as a starting point for custom-state development. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion>
๐ŸŒ
Java Guides
javaguides.net โ€บ 2018 โ€บ 06 โ€บ apache-maven-standard-directory-layout.html
Apache Maven Standard Directory Layout
July 10, 2024 - scripts: This directory contains scripts used by the project. webapp: This directory contains web application resources. It is structured similarly to a WAR file. This directory contains the test source code and resources. java: This directory contains the Java test files. resources: This directory contains non-Java test resources. filters: This directory contains filter files used during the resource filtering process. The target directory is where Maven stores the output of the build process.