Difference between revisions of "Maven distro directory layout"

From Gcube Wiki
Jump to: navigation, search
(README)
Line 6: Line 6:
 
Each gCube component must include a README file that must be included in distribution packages of the component. The file briefly describe the component and the gCube system and provide references to the source code, binaries, documentation as well as to the INSTALL and LICENSE file.
 
Each gCube component must include a README file that must be included in distribution packages of the component. The file briefly describe the component and the gCube system and provide references to the source code, binaries, documentation as well as to the INSTALL and LICENSE file.
  
In order to have as much as possible uniform README files across components and to reduce the effort to maintain the file updated, a standardized template is provided. The template makes use of placeholders (delimited by <code>${...}</code>) that are replaced at build-time with the value of Maven properties. This approach allows to keep the same README in the source code while containing always updated information.
 
  
This is the README file that all components should have in their <code>distro/</code> folder:
+
In order to have as much as possible uniform README files across components and to reduce the effort to maintain the file updated, a standardized template is provided. The template makes use of placeholders (delimited by <code>${...}</code>) that are replaced at build-time with the value of Maven properties. This approach allows to keep the same README in the source code while distributing files containing always updated information.
 +
 
 +
 
 +
By convention, the README file should be located under the <code>distro/</code> folder (together with the other metadata files: LICENSE, MAINTAINERS, INSTALL, ...). It should follow this template (only minor changes to fits the component needs are allowed):
 +
 
 +
 
 
<source lang="text" highlight="21,22,39,40,41">
 
<source lang="text" highlight="21,22,39,40,41">
 
The gCube System - ${name}
 
The gCube System - ${name}
Line 73: Line 77:
 
</source>
 
</source>
  
* the highlighted lines should be replaced with appropriate data
 
* all the placeholders must correspond to Maven properties. There are two source of properties:
 
** the component <code>pom.xml</code>
 
** the gCube <code>maven-parent</code> ([http://maven.research-infrastructures.eu/nexus/index.html#nexus-search;gav~org.gcube.tools~maven-parent[[User:Gabriele.giammatteo|Gabriele.giammatteo]] ([[User talk:Gabriele.giammatteo|talk]]) here])
 
  
 +
The <span style="background-color: #ffc">highlighted lines</span> in the template should be replaced with appropriate data for the component before commit it in SVN. It is very static information and use dynamic property values for that does not have any advantage. In any case developers are free to define properties in their <code>pom.xml</code> and use them in the README file.
 +
 +
 +
All the placeholders delimited by <code>${...}</code> must correspond to Maven properties. There are two source of properties:
 +
* the component pom.xml. It is possible to access custom-defined properties in the section <code><properties></code> of the pom as well as default properties defined by Maven (e.g. <code>${version}</code>, <code>${name}</code>);
 +
* the gCube <code>maven-parent</code> (available [http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-externals/org/gcube/tools/maven-parent/ here]);
 +
The properties are replaced during the build by the [https://maven.apache.org/shared/maven-filtering/ filtering mechanism] used by the plugins that create the distribution packages (i.e. the [http://maven.apache.org/plugins/maven-assembly-plugin/ assembly pluygin]).
  
 
=== Common properties ===
 
=== Common properties ===

Revision as of 17:27, 3 March 2016

The guidelines provided in this page have been decided and being adopted starting from March 2015

distro

README

Each gCube component must include a README file that must be included in distribution packages of the component. The file briefly describe the component and the gCube system and provide references to the source code, binaries, documentation as well as to the INSTALL and LICENSE file.


In order to have as much as possible uniform README files across components and to reduce the effort to maintain the file updated, a standardized template is provided. The template makes use of placeholders (delimited by ${...}) that are replaced at build-time with the value of Maven properties. This approach allows to keep the same README in the source code while distributing files containing always updated information.


By convention, the README file should be located under the distro/ folder (together with the other metadata files: LICENSE, MAINTAINERS, INSTALL, ...). It should follow this template (only minor changes to fits the component needs are allowed):


The gCube System - ${name}
--------------------------------------------------
 
${description}
 
 
${gcube.description}
 
${gcube.funding}
 
 
Version
--------------------------------------------------
 
${version} (${buildDate})
 
 
Authors
--------------------------------------------------
 
* John Doe (john-AT-acme.org), Acme Inc., New York.* [other maintainers] 
 
Download information
--------------------------------------------------
 
Source code is available from SVN: 
    ${scm.url}
 
Binaries can be downloaded from the gCube website: 
   ${gcube.website}
 
 
Documentation 
--------------------------------------------------
 
Documentation is available on-line in the gCube Documentation Wiki:
    Developer Guide - ${gcube.wikiRoot}/[page name here]    User Guide - ${gcube.wikiRoot}/[page name here]    Admin Guide - ${gcube.wikiRoot}/[page name here] 
Installation
--------------------------------------------------
 
Please see the file named "INSTALL" in this directory.
 
 
Support 
--------------------------------------------------
 
Bugs and support requests can be reported in the gcube issue tracking tool:
    ${gcube.issueTracking}
 
 
Licensing
--------------------------------------------------
 
This software is licensed under the terms you may find in the file named "LICENSE" in this directory.


The highlighted lines in the template should be replaced with appropriate data for the component before commit it in SVN. It is very static information and use dynamic property values for that does not have any advantage. In any case developers are free to define properties in their pom.xml and use them in the README file.


All the placeholders delimited by ${...} must correspond to Maven properties. There are two source of properties:

  • the component pom.xml. It is possible to access custom-defined properties in the section <properties> of the pom as well as default properties defined by Maven (e.g. ${version}, ${name});
  • the gCube maven-parent (available here);

The properties are replaced during the build by the filtering mechanism used by the plugins that create the distribution packages (i.e. the assembly pluygin).

Common properties

Following properties are

LICENSE

${gcube.license}

https://joinup.ec.europa.eu/sites/default/files/ckeditor_files/files/eupl%20v%20%201%201%20-%20EN.txt.txt