Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updated the width and formatting.

...

Argument

Description

<name>

The name of the package

<version>

The version string of the package

<package-file>

The resulting package file name

[ -level <default level>]

Specifies if this software should support update to a running system. The default level can either be platform or execution. Execution implies that the component can be updated when the system is running, for example upgrading to a newer agent version.

Note

Note!

Not all kinds of software using the development toolkit can be updated and also that a third party library being used by the software may or may not support the execution level.


[ -revision <revision>]

Used to show the revision number from which the .mzp file is built, that is from a revision management system.

[ -repository <repository>]

Used to show the repository from which the .mzp file is built, that is from a revision management system.

-hidden

Used if the .mzp file is not supposed to be visible in the system, for example in the ">About dialog.

[ -level <level name>] file=<file-to-include>

The level name can either be platform or execution. Each filename to be included can optionally be preceded by a level.

[ -osgi <true/false> ]

Anchor
myagentkey
myagentkey

Used to indicate if the .mzp file has a separate third party java library file that is not packaged by . The default value is set to false.

Note

Exporting 3PP Packages

It is advisable to use a Java wrapper as a proxy for exporting the packages used by your custom mzp.


Info

Example - Using osgi and exportpackages

Code Block
> mzsh username/password pcreate \
"My Agent" 1.0 my_agent.mzp -level execution \
file=my_agent.jar -level execution file=my_agent_javahelp.jar -osgi true \
-exportpackages com.digitalroute.devkit.mylib.javawrapper



[ -exportpackages <Java wrapper>]

A mandatory option when osgi is set to true. This option is used to export the Java wrapper for use by the DTK plugin.

Note

Library Package Naming Conventions

To ensure that the library files not come into conflict with other library packages, our recommended suggestion is to apply a prefix to the filename of your package.


Info

Example - Usage of exportpackages

A Java wrapper is used to call the actual third party library packages used by the mzp. The example below shows how a Java wrapper can be used.

Code Block
languagejava
package com.digitalroute.devkit.examples.logger;

import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.core.LoggerContext;

public class LoggerWrapper{
    final static Logger logger = Logger.getLogger(LoggerWrapper.class);

    public void logMessageFatal(String message){
        
            LoggerContext context = (LoggerContext) LogManager.getContext(false);
         
            logger.fatal(message);
    }
}


[ -exported <export-version> file=<jar file>]

This option is used to export all Java packages that comes bundled in a third party library package. This option is especially useful when there are multiple large third party library packages that contains large quantities of packages embedded within them.

Info

Example - Usage of exported

Here is an example on how the option can be used. The example shows how multiple hadoop libraries can be exported.

Code Block
languagebash
FILES="-exported 3.1.0 file=hadoop-auth-3.1.0.jar -exported 3.1.0 file=hadoop-common-3.1.0.jar -exported 3.1.0 file=hadoop-hdfs-3.1.0.jar -exported 3.1.0 file=hadoop-aws-3.1.0.jar -exported 3.1.0 file=hadoop-annotations-3.1.0.jar"

mzsh pcreate "Apache Hadoop" "8.1.2.0" apache_hadoop_cdh4.mzp -level platform -osgi true $FILES


Anchor
commit
commit
Committing a User Defined Package

...