Chapter 4. Usage

Table of Contents

Command-Line Usage
Command Syntax
Command Line Reference
Apache ANT Usage
ANT Setup
ANT Task Reference
ANT Task Examples
Apache Maven Usage
Maven Setup
Maven Plugin Reference
Maven Plugin Examples

Command-Line Usage

The command line client allows Bundlor to be run from the command line of any platform

Command Syntax

To use Bundlor run the following for UNIX and Windows respectively.

$BUNDLOR_HOME/bin/bundlor.sh [options] 
%BUNDLOR_HOME%\bin\bundlor.bat [options] 

Command Line Reference

Command Line Parameters

The following table lists all the parameters that you can specify for the bundlor command line client.

Table 4.1. Attributes

AttributeDescriptionRequired
-f Whether Bundlor should cause a build failure when there are warnings about the resulting manifest No - defaults to false
-i <path> The path to the input to create a manifest for. This can either be a directory or a JAR file. Yes
-m <path> The path to the manifest template. See Chapter 5. Manifest Templates for details. No
-p <path> The path to the OSGi profile. See ??? for details. No
-o <path>

The path to write the manifest to. This can either be a directory, a JAR file, or not specified.

If a directory is specified, the manifest will be written to ${directory}/META-INF/MANIFEST.MF.

If a JAR file is specified, the manifest will be written as the manifest for that JAR file.

If nothing is specified, the manifest will be written to System.out.

No - defaults to System.out
-r <path> The path to a properties file used for substitution. See Specifying property placeholders for details. No

Command Line Property Values

Property substitution values can be optionally specified on the command line instead of as an external file using the -Dproperty=value parameter.

% ./bundlor.sh \
-i ./org.springframework.integration.jar \
-m ./template.mf \
-o ./target/org.springframework.integration.jar \
-Dname="Spring Integration"

Transformed bundle written to ./target/org.springframework.integration.jar
%

See Specifying property placeholders for details.