Difference between revisions of "GCube Project Layout"

From Gcube Wiki
Jump to: navigation, search
(File Templates)
(File Templates)
Line 71: Line 71:
 
= File Templates =
 
= File Templates =
  
* [https://code-repo.d4science.org/gCubeCI/Templates/src/branch/master/gCubeComponents/CHANGELOG.md| CHANGELOG.md]
+
* [https://code-repo.d4science.org/gCubeCI/Templates/src/branch/master/gCubeComponents/CHANGELOG.md CHANGELOG.md]
* [https://code-repo.d4science.org/gCubeCI/Templates/src/branch/master/gCubeComponents/LICENSE.md| LICENSE.md]
+
* [https://code-repo.d4science.org/gCubeCI/Templates/src/branch/master/gCubeComponents/LICENSE.md LICENSE.md]
* [https://code-repo.d4science.org/gCubeCI/Templates/src/branch/master/gCubeComponents/README.md| README.md]
+
* [https://code-repo.d4science.org/gCubeCI/Templates/src/branch/master/gCubeComponents/README.md README.md]
* [https://code-repo.d4science.org/gCubeCI/Templates/src/branch/master/gCubeComponents/FUNDING.md| FUNDING.md]
+
* [https://code-repo.d4science.org/gCubeCI/Templates/src/branch/master/gCubeComponents/FUNDING.md FUNDING.md]

Revision as of 04:47, 26 July 2020

Standard Project Layout

gCube projects for new software components are primarily developed with the Java language using Maven as build automation tool. The layout of a project mostly reflects the common conventions used for Maven with some variations.

- project folder/
  |-pom.xml
  |-src/
     |-main/
        |-java/
        |-webapp/
        |-resources/
     |-test/
        |-java/
        |-resources/
  |-gcube/
     |-extra-resources
        |-WEB-INF/
        |-META-INF/  
  |-CHANGELOG.md
  |-LICENSE.md
  |-README.md
  |-FUNDING.md

Project Layout Explained

File or Directory Role
pom.xml an XML file that contains information about the project and configuration details used by Maven to build the project.
src/main/java/ application source code
src/main/webapp/ web application source code
src/main/resources/ resources packaged at root level in the output jar/war
src/test/java/ source code for tests
src/test/resources/ resources available on the test classpath
gcube/extra-resources/WEB-INF/ extra resources to add to the WEB-INF dir of the output jar/war. These resources are filtered
gcube/extra-resources/META-INF/ extra resources to add to the META-INF dir of the output jar/war. These resources are filtered
CHANGELOG.md a curated, chronologically ordered list of notable changes for each version of a project
LICENSE.md project's license
README.md a quick and simple way for other users to learn more about the project and how to use it
FUNDING.md sponsors and funding options for the project

Note: if the project is composed by multiple maven modules, the layout above is repeated for each module, because the module is an independent distributed unit of software.

File Templates