.. ******************************************************************************* * MetaFactory.io R2 * Technical Documentation * * File name : CIX_JCIE_ExternalJavaPackage.rst * Created by : Marnix Bochove (original text) * Updated by : Niels de Nies * * MetaFactory BV Amsterdam ******************************************************************************* .. include:: /metadata_include.txt .. include:: /inline-images.txt External Java package ===================== .. rubric:: Code reuse To support reuse of code instructions between projects, java_packages can be collected in :ref:`(external) libraries `, which are accessable from outside. .. rubric:: Same attributes The external_java_package calls the package in the library. So the external_java_package acts as an include. The external_java_package has exactly the same kind of attributes as the java_package. But because the external_java_package is part of a different project, for some attributes it will need different values. *This is why the external_java_package's attributes overrule those of the original java_package.* .. rubric:: Usage .. code-block:: xml :caption: definition syntax :name: external_java_package-01 :linenos: :emphasize-lines: 5-10 ... id="libName/pathInsideLibraryToFile" name="" path="" foreach="package|object|attribute|reference" condition="" package="" ... .. rubric:: Attributes .. list-table:: **attributes of ** :widths: 10 90 :header-rows: 1 :class: tight-table * - Name - Details * - id - id of the external java package. Required The syntax of the id attribute is as follows: .. code-block:: xml id="libName/pathInsideLibraryToFile" Say there is an external library defined with name: lib1. You want to use a code instruction file with the name *authentication.xml* located in the folder: 'packages/seam/component/' under the code_instruction_folder of lib1. The value of the id attribute must then be defined as follows: .. code-block:: |Exclam M| Do not repeat the value of as defined in the external_library in the external_java_package id. * - name - The name of the java package made * - path - The path relating to the java output folder as defined in the MetaFactory project. * - writePolicy - Generates the source only if the source does not already exist. Values: once|always. Default: allways * - code instruction base - |Loupe S| :ref:`Code instruction base `.