I have a source code folder with following structure
main
- java (folder structure for java files)
- resources
- META-INF
- ESAPI.properties
- importdata.properties
- webapp
- resources
- jar files
- templates
- styles
- scripts
- WEB-INF
- spring(webmvc-config.xml)
- views (jsp files)
- web.xml
- other files
As my knowledge this project is web application build on spring framework. I do not have any eclipse workspace for this.
Now I have to build war file by upgrading few features. How can I make appropriate workspace/project structure to develop and deploy the system?
Related
I am currently working on a project with a React frontend using Node and a Kotlin Spring Boot backend using Gradle. I want to use IntelliJ to edit those projects in the same window. So I opened the root folder as a project and added both the server and the client as modules. My file structure is roughly as follows.
/project
- /.idea
- /package.json
- /client
- /package.json
- /...
- /server
- /build.gradle.kts
- src
But if I import it like this my gradle module won't compile without errors and if I click "auto-import changes" in Intellij, it removes my npm module.
How would I go about something like this without making my client a gradle-project (which I definitely do not want!)?
I have the following folder structure in my Spring application:
src
\__main
\ \__resources
\_test
How can make use of the files in resources folder while unit testing the application? In otherwords, how can I load the files in src/main/resources folder into test-classes which gets created while executing tests?
You can create another folder by the same name, i.e "resources" under the test package. This is a standard resource folder under Maven. All the files under this folder is accessible to the test classes under the test package during runtime.
Please guide since i wanted to understand on the build tool maven 'directory structure' intelli j as IDE where main/test divided into two separate folders but both have the same files.
Ps- I recently moved into QA automation so want to understand it better.
FYI per maven main website:
a. The main directory is the root directory for source code related to the application itself, not test code.
b. The test directory contains the test source code.
Maven search for the files in the below directory structure.
src/main/java - Source Java files
src/main/resources - Source resource files
src/test/java - Test cases
src/test/resources - Test resource files
Maybe this site would be helpful to you: https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
Maven uses a strict folderstructure. Are you sure, that there are the same files in the folders? As Bhargav Kumar R mentioned before, in the test-folder there will be your test-classes, in the resource-folder there will be the resources for your tests.
I have two (Java) projects, a library and an executable which uses the library. The two projects reside in subfolders of the same folder but I don't want to add anything (like settings.gradle) in the root folder (they come from different git repositories, thus, I cannot have the files in the common parent source controlled). Here is my layout:
lib - has some runtime dependencies (from the maven repo)
app - depends on lib and has some (different) runtime dependencies
The goal is to produce a folder (Gradle's build\libs is good enough), containing a jar file and a lib subfolder with all runtime dependencies. What is the best approach with Gradle? Here is the result I am looking for:
app\
build\
libs\
app.jar
lib\ - all dependencies are here
With ant for instance, I bring everything together when building the executable (referencing the lib's source code via ../lib/). That's somewhat ugly, but get's the job done. Ideally, I would think that it's more flexible to have the lib build as a dependency, when building the executable, just adding another jar to the app's lib subfolder.
Thanks in advance
You can put your root build.gradle file and the settings.gradle file in a folder named master next to your lib and app folder:
lib - has some runtime dependencies (from the maven repo)
app - depends on lib and has some (different) runtime dependencies
master - root build.gradle file + settings.gradle file
gradle looks for a master folder when searching for a settings.gradle file
I have a web source code includes two folders: META-INF and WEB-INF directory is structured as:
WhatJobs
|META-INF
|WEB-INF
|application
|classes
|framework
|lib
|resources
|web.xml
how I can load project in NetBean. Please help me.
Netbeans will need project property file by reading which, netbeans will be able to understand what type of project is. So either netbeans will check for the nbproject folder where in project.properties file will reside or it should be eclipse project where in netbeans can read eclipse project property file.
Your provided structure will not work.
If you want your project in netbeans, then you can create new project and copy paste files according to your requirement in that new project.