Difference between revisions of "Creating gCube Maven components: How-To"
From Gcube Wiki
(Created page with '= Developing a gCube Maven Component = = Creating the ETICS Configurations = ETICS configurations must satisfy the follow requirements: * they must directly or indirectly depe…') |
(→Creating the ETICS Configurations) |
||
Line 5: | Line 5: | ||
ETICS configurations must satisfy the follow requirements: | ETICS configurations must satisfy the follow requirements: | ||
− | * they must directly or indirectly depend on the ETICS configurations of all gCube components that are specified in the POM, including | + | * they must directly or indirectly '''depend on the ETICS configurations of all gCube components that are specified in the POM''', including ''maven-parent''. Dependencies on third-party components available in Maven Central (or other Maven repository specified in the POM) do '''not''' need to be configured in ETICS (i.e. Maven repositories replace ETICS ''externals'') |
− | * the ''compile'' target of their ''Build Commands'' must invoke Maven to build the components up to the deploy phase (e.g. <code>mvn deploy</code>). This allows the deployment of components into Maven repositories directly from ETICS builds | + | * the ''compile'' target of their ''Build Commands'' must invoke Maven to build the components up to the deploy phase (e.g. <code>mvn deploy</code>). This allows the deployment of components into Maven repositories directly from ETICS builds |
* the ''install'' target of their ''Build Commands'' must copy the gCube profile of the component in the <code>${prefix}</code> directory. This allows the registration of the profile with the Software Gateway when the component is released. It remains a good practice to copy also the outcome of the compilation (usually jar files) in <code>${prefix}</code> in order to include them in packages generated by ETICS. | * the ''install'' target of their ''Build Commands'' must copy the gCube profile of the component in the <code>${prefix}</code> directory. This allows the registration of the profile with the Software Gateway when the component is released. It remains a good practice to copy also the outcome of the compilation (usually jar files) in <code>${prefix}</code> in order to include them in packages generated by ETICS. | ||
− | |||
− | |||
Sample build commands for a maven-based component should look like the one in the picture below: | Sample build commands for a maven-based component should look like the one in the picture below: | ||
[[Image:maven-component-configuration.png|600px|center|Example of maven-component's build commands]] | [[Image:maven-component-configuration.png|600px|center|Example of maven-component's build commands]] |
Revision as of 11:16, 3 May 2012
Developing a gCube Maven Component
Creating the ETICS Configurations
ETICS configurations must satisfy the follow requirements:
- they must directly or indirectly depend on the ETICS configurations of all gCube components that are specified in the POM, including maven-parent. Dependencies on third-party components available in Maven Central (or other Maven repository specified in the POM) do not need to be configured in ETICS (i.e. Maven repositories replace ETICS externals)
- the compile target of their Build Commands must invoke Maven to build the components up to the deploy phase (e.g.
mvn deploy
). This allows the deployment of components into Maven repositories directly from ETICS builds
- the install target of their Build Commands must copy the gCube profile of the component in the
${prefix}
directory. This allows the registration of the profile with the Software Gateway when the component is released. It remains a good practice to copy also the outcome of the compilation (usually jar files) in${prefix}
in order to include them in packages generated by ETICS.
Sample build commands for a maven-based component should look like the one in the picture below: