Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Popular folder structure for build

Tags:

I am wondering what the popular or best way to organise your build assets and source code within a project is?

like image 212
Xian Avatar asked Jan 15 '09 08:01

Xian


People also ask

What is a good folder structure?

One folder structure best practice is to avoid having folders that compete with one another. Try not to create folders with overlapping categories. Instead, create folders which are distinct from one another, and use nesting to arrange them as needed.

What is the most common way of structuring directories?

Tree-structured directory – A tree structure is the most common directory structure.


1 Answers

I have

/src    - source files (test files are within a package 'test' here, or 'test' subpackage of what is being tested) /lib    - required libraries /doc    - text documentation and development notes /build  - where we build (each separate build item within a subfolder here) /conf   - configurations (each config, production, test, developer, etc gets a folder in here, and when building Jars and Wars the correct set is copied across) /extras - other stuff /extras/resources - resources that should be included within generated Jars, e.g., icons 

with

/websites - Web related content and configurations (each website in its own folder here) /websites/$site/webcontent - All the web content here /websites/$site/conf - website related configuration files here (instead of /conf) /websites/$site/build.xml - ANT build script for website that creates a war, etc  (remember you might have an admin site and a public site for a single project, hence the multi-site configuration within a single project, or even site v1 and site v2, etc) 

In the end you have to be a bit flexible depending on the project itself, and whether you use ANT or Maven. I use ANT, and either put the ANT scripts in /build, but they have appeared elsewhere in some projects (like in /websites/ for some).

like image 131
JeeBee Avatar answered Nov 03 '22 04:11

JeeBee