Access Keys:
Skip to content (Access Key - 0)
In This Section

The fabric_pkg utility is a command line client that enables you to validate a fabric application or achive (including services, service applications and service configuration files) and bundle its files into a fabric-deployable package. The resulting package is a compressed file called 'my-fabric-app.fabric' or 'my-FAR.far'. A '.fabric' package contains only one fabric application. The fabric_pkg (glossary) command automatically verifies the syntax of the XML files, performs semantic checks and (some) application library validation before creating the application package. Additionally, you may extract the contents of the package or view its contents.

Usage
fabric_pkg command [options] [xml-file|package-file]

Packaging Linux Executables On Windows

Windows will unset the 'execute' bit for Linux executables, causing the package to fail to run after you deploy it to the fabric. If your Linux-bound package has an executable in it, be sure to package it on a Linux platform and make sure the executable is set to 'execute'.

Options

Option Arguments Description
-h
--help
optional: command The help command displays information about the fabric_pkg utility and its commands.

Example
-v
-version
--version
ignored The version command displays the version of fabric_pkg utility. This command has no additional arguments.

Example

Commands

create

Create app/far package from xm spec file. Create is the default command for fabric_pkg, when followed by an XML filename. The type of file created by the create commandwill be determined by the type the input XML: Fabric Application Definition XML will produce a '.fabric' file and Fabric Archive (FAR) Definition XML will produce a '.far' file. All files to be included in the package must be in the working directory or a sub-directory of the XML file.

Usage
fabric_pkg create [options] XML-FILE

Options Arguments Description
-c
--classpath
PATH Set the classpath for fabric applications that use Java and require classes or JARs that are not included with the app.

Example
-f
--fabric-home
DIR Used to override environment variable FABRIC_HOME when locating fabric JARs while packaging Java applications. The fabric_pkg utility will look for a '/classes' sub-directory in the new location.

Example
-d
--fars-dir
DIR Used to locate fars which are dependencies of the app. When packaging fabric applications that have a dependency on a FAR archive, any fars named in the app xml must either be in the fars directory (FABRIC_HOME/fars/) or the -fars-dir option should be set to the directory containing the mentioned FAR files.

Example
-V
--verbose
none Enable verbose output during create. By default, fabric_pkg create behaves quietly. The -verbose option will instruct fabric_pkg to be verbose when executing.

Example

Example


check

Check validity of the Fabric Application Definition XML or Fabric Archive (FAR) Definition XML file.

Usage
fabric_pkg check [options] XML-FILE

Options Arguments Description
-c
--classpath
PATH Set the classpath for fabric applications that use Java and require classes or JARs that are not included with the app.

Example
-f
--fabric-home
DIR Used to override environment variable FABRIC_HOME when locating fabric JARs while packaging Java applications. The fabric_pkg utility will look for a '/classes' sub-directory in the new location.

Example
-d
--fars-dir
DIR Used to locate fars which are dependencies of the app. When packaging fabric applications that have a dependency on a FAR archive, any fars named in the app xml must either be in the fars directory (FABRIC_HOME/fars/) or the -fars-dir option should be set to the directory containing the mentioned FAR files.

Example
-V
--verbose
none Enable verbose output during create

Example


extract

Decompress and extract the files in a fabric application or FAR package to the local directory.

Usage
fabric_pkg extract [options] PACKAGE

Options Arguments Description
-V
--verbose
none Enable verbose output during extract
-i
--internal
none Perform extract the way it is done internal to the fabric
Arguments Description
PACKAGE .far or .fabric file

Example


list

List contents of fabric application or FAR package file.

Usage
fabric_pkg list PACKAGE

Arguments Description
PACKAGE '.far' or '.fabric' file

version

Display version of app/far package file

Usage
fabric_pkg version PACKAGE

Arguments Description
PACKAGE .far or .fabric file

Example

Messages

Message Definition Suggested Solution
AmbiguousMatchException.Found multiple methods that matched the expected signature 'public static bool <method name> (<parameters>)' for class <class name> Two or more methods with the same name and signature exist.
  • Change the name of one of the methods.
  • Change the signature of one of the methods.
DuplicateAnnotationException.More than one field with annotation <annotation> found in task <task name> A task cannot contain multiple fields for the specified annotation.
  • Verify the specified task contains only one field with the specified annotation.
DuplicateAttributeException.More than one property with attribute <attribute name> found in task <task name> A task cannot contain multiple properties for the specified attribute.
  • Verify the task contains only one property with the specified attribute.
DuplicateMethodException.More than one occurrence of method <method name> found in task <task name> The method appears in the specified class more than once.
  • Verify the method name is spelled correctly in the task definition file.
  • Change the name of one of the methods in the class and task definition file.
FieldKeyMissingException.TaskField name <name> was not found in the request in task <task name> The field name was not found in the request.
  • Verify the request contains the required field name.
InvalidAnnotationException.<annotation> annotation is only applicable to type <type> in task <task name> The annotation can only be defined as the specified type.
  • Verify the annotation is declared as the correct type.
InvalidAnnotationException.<annotation> annotation must be declared public in task <task name> The annotation must be defined as public.
  • Verify the annotation is defined as public.
InvalidAttributeException.<attribute> attribute and its property are only applicable to type <type> in task <task name> The attribute and its property can only be defined as the specified type.
  • Verify the attribute and property are declared correctly.
InvalidAttributeException.<attribute> attribute cannot be assigned a null value in method <method name> in task <task name> The attribute has a null value.
  • Verify the specified method returns a non-null value.
InvalidAttributeException.<attribute> attribute must have public property methods in task <task name> The attribute must have its property defined as public.
  • Verify the property for the attribute is defined as public.
InvalidMethodDeclarationException.Method <method name> must be public in task <task name> The method must be declared as public.
  • Verify that the method is declared as public.
InvalidMethodDeclarationException.Method <method name> must be static in task <task name> The method must be declared as static.
  • Verify the method is declared as static.
InvalidMethodSignatureException.Method <method name> is not allowed to take parameters in task <task name> The onStartup, onShutdown, or isAvailable task method does not accept parameters.
  • Remove the parameters from the task method.
InvalidMethodSignatureException.Method <method name> must return boolean in task <task name> The task method must return boolean.
  • Verify the task method returns a boolean.
InvalidMethodSignatureException.The background task method <method name> is not allowed to take parameters in task <task name> The background task method does not accept parameters.
  • Remove the parameters from the background task method.
InvalidRequestMappingException.Request key <key name> is being assigned by multiple TaskProperty attributes in task <task name> A task cannot have two or more TaskProperty attributes with the same name.
  • Verify each TaskProperty attribute has a unique name.
NoAnnotationException.Parameter number <parameter number> for method <method name> in task <task name> has no annotation All parameters in the method must have a TaskParameter annotation.
  • Verify each parameter has a TaskParameter annotation.
NoSuchMethodException.Method <method name> is not defined for class <class name> The method is not defined in the class.
  • Verify the method belongs in the specified class.
  • Add the method to the class or remove the method name from the task definition file.
NoSuchMethodException.Method 'public static bool <method name> (<parameters>)' is not defined for class <class name> The static method and parameters are not defined in the class.
  • Correct the parameters associated with the task method.
ParameterKeyMissingException.TaskParameter <parameter name> was not found in the request in task <task name> The parameter was not found in the request.
  • Verify the request contains the parameter name required by the task.
  • Change the name of one of the methods in the class and task definition file.