Difference between revisions of "Developing gCube Maven Components"

From Gcube Wiki
Jump to: navigation, search
(Created page with '= Dependencies = == gCube Maven Repositories == == Third-party Repositories == == Common Dependencies == = Common = == Maven Parent == == Service Archive == == Profile == = Libra…')
 
Line 1: Line 1:
 +
We assume familiarity with Maven concepts and terminology and notice that Maven components for gCube must satisfy the following requirements:
 +
 +
* their <code>groupId</code> must be of the following form:
 +
 +
<pre>org.gcube.<class></pre>
 +
 +
: where ''class'' identifies a functionally correlated set of components and helps a range of users (developers, administrator) to discover components in various UIs/reports used within the system and in tools. Logically, the class corresponds to the gCube class of the component's, as specified in its gCube Software Profile. However, more specific, or else cross-class groups may be agreed upon among developers. In all cases, the group should align with official Maven [http://maven.apache.org/guides/mini/guide-naming-conventions.html guidelines]. By agreement, for example, components in gCube class <code>DataAccess</code> declare a <code>groupId</code> of <code>org.gcube.data.access</code> and those in gCube class <code>DataTransfer</code> declare a <code>groupId</code> of <code>org.gcube.data.transfer</code>. On the other hand, also by agreement, components in gCube class <code>InformationSystem</code> declare a <code>groupId</code> of <code>org.gcube.informationsystem</code>.
 +
 +
* their <code>artifactId</code> must follow Maven conventions (e.g. ''avoid capital letters or punctuation other than hyphens'').
 +
 +
* they must inherit from '''maven-parent'''. This ensure and promotes compliance with project-wide requirements, from the enforcement of minimal Java and Maven versions to generation and packaging of Javadoc documentation and component sources;
 +
 +
* for each deployable artefact they produce (primary or secondary), they must include the Maven coordinates of the arteact in the corresponding package section of the gCube Software Profile. Specifying package dependencies in the Software Profile, on the other hand, is no longer required;
 +
 +
* whenever they are associated with a gCube Software Archive (SA), they must produce it as a secondary <code>tar.gz</code> artefact with classifier <code>servicearchive</code>. Note that the SA of Maven components does ''not'' need to include Javadoc documentation (as this documentation is produced and published directly as a Maven artefact);
 +
 
= Dependencies =
 
= Dependencies =
 
== gCube Maven Repositories ==
 
== gCube Maven Repositories ==

Revision as of 15:37, 18 July 2012

We assume familiarity with Maven concepts and terminology and notice that Maven components for gCube must satisfy the following requirements:

  • their groupId must be of the following form:
org.gcube.<class>
where class identifies a functionally correlated set of components and helps a range of users (developers, administrator) to discover components in various UIs/reports used within the system and in tools. Logically, the class corresponds to the gCube class of the component's, as specified in its gCube Software Profile. However, more specific, or else cross-class groups may be agreed upon among developers. In all cases, the group should align with official Maven guidelines. By agreement, for example, components in gCube class DataAccess declare a groupId of org.gcube.data.access and those in gCube class DataTransfer declare a groupId of org.gcube.data.transfer. On the other hand, also by agreement, components in gCube class InformationSystem declare a groupId of org.gcube.informationsystem.
  • their artifactId must follow Maven conventions (e.g. avoid capital letters or punctuation other than hyphens).
  • they must inherit from maven-parent. This ensure and promotes compliance with project-wide requirements, from the enforcement of minimal Java and Maven versions to generation and packaging of Javadoc documentation and component sources;
  • for each deployable artefact they produce (primary or secondary), they must include the Maven coordinates of the arteact in the corresponding package section of the gCube Software Profile. Specifying package dependencies in the Software Profile, on the other hand, is no longer required;
  • whenever they are associated with a gCube Software Archive (SA), they must produce it as a secondary tar.gz artefact with classifier servicearchive. Note that the SA of Maven components does not need to include Javadoc documentation (as this documentation is produced and published directly as a Maven artefact);

Dependencies

gCube Maven Repositories

Third-party Repositories

Common Dependencies

Common

Maven Parent

Service Archive

Profile

Libraries

Services

Portlets