Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose for the resource folder in Maven?

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?

like image 673
Elijah Avatar asked Sep 11 '14 11:09

Elijah


People also ask

What is purpose of resource folder?

The res/values folder is used to store the values for the resources that are used in many Android projects to include features of color, styles, dimensions etc.

What is resource folder in Maven?

Maven resources folder is used to store all your project resources files like , xml files, images, text files and etc. The default Maven resources folder is located at “yourproject/src/main/resources“.

What is the use of resource folder in Java?

The Resources folder in Figure 1 contains folders for storing binary files, data files, image files, and Include and Library folders that are used to store code used by external functions.

What is resources file in Java?

In the Java programming language a resource is a piece of data that can be accessed by the code of an application. An application can access its resources through uniform resource locators, like web resources, but the resources are usually contained within the JAR file(s) of the application.


1 Answers

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

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.

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.

like image 139
Dave Newton Avatar answered Oct 17 '22 21:10

Dave Newton