serviceDeploy command-line utility

Use the serviceDeploy command to package Service Component Architecture (SCA) compliant modules as Java™ applications that can be installed on a server. The command is useful when performing batch installs through wsadmin.
The serviceDeploy command builds an .ear file from a .jar or .zip file that contains service components. When serviceDeploy completes processing, it creates an .ear file in the directory from which the command is run unless the -outputApplication parameter is specified.
Note: Parameters are not case-sensitive.

Roles

This command can be issued by users with the following roles:
  • Administrator
  • Deployer

Syntax

serviceDeploy
inputarchive
-classpath jarpathname 
-cleanStagingModules
-freeform
-ignoreErrors
-keep
-novalidate
-outputApplication inputarchive
-uniqueCellID
-workingDirectory temppath

Parameters

-inputarchive
A required, positional parameter that specifies the .jar, .zip or .ear file that contains the application to be deployed. If the command is not issued from the path in which the file resides, this must be the full path for the file. The .zip file can be either a nested archive or an Eclipse Project Interchange format file.
-classpath
An optional parameter that specifies the locations of required resource files (.jar and .rar) files. The path to each file should be a fully-qualified path separated by semicolons (;) with no spaces.
-cleanStagingModules
An optional parameter that specifies whether to delete staging modules within an input .ear file before deployment. By default, the serviceDeploy command imports existing staging modules and their contents.
-freeform
An optional parameter that specifies that the Java EE subdirectory in the service.jar should be treated as a free-form project.
-help
An optional parameter used to display the parameters for this command.
-ignoreErrors
An optional parameter that specifies that the serviceDeploy command builds an .ear file regardless of errors while building or validating the application. By default, the serviceDeploy command does not generate an .ear file if there are errors with an application.
-keep
An optional parameter that specifies whether to save any temporary files generated after deployment. By default, the serviceDeploy command deletes the temporary workspace.
-novalidate
An optional parameter that specifies whether to disable validation of all artifacts when using serviceDeploy. By default, the serviceDeploy validates all artifacts for the application.
-outputApplication
An optional parameter that specifies the name of the .ear file the serviceDeploy command creates. The default is inputarchiveApp.ear, where inputarchive is the filename minus the extension specified for the input .jar file.
-uniqueCellID
An optional parameter that specifies a string identifier that is used to create a unique instance of the application. The identifier must be unique in the context of the cell.
-workingDirectory
An optional parameter that specifies a directory the serviceDeploy command uses to write temporary files.
Note: The parameters -fileencoding, -javadebug, -noJ2eeDeploy , and -nojavasource are no longer applicable and have been deprecated. Using these parameters causes no effect.

Inputs

The following file types can be used as input to the serviceDeploy command:
jar
The most useful file type for the simplest applications. The resulting .ear file contains a single .jar file and any needed generated staging modules. The .jar file must contain the service.module file.
zip (Project Interchange)
You can export from Integration Designer an archive file in project interchange format. This format is unique to the Eclipse development. The exported zip file must contains exactly one project with the service.module file. The resulting .ear file contains any number of modules, depending upon exactly what is in the project interchange.
zip
You can create a zip file containing .jar files, .war files, and .rar files. Exactly one .jar file must contain the service.module file. All contained archives become members of the final exported .ear file.
ear
You can always run the serviceDeploy command against an .ear file as long as exactly one .jar file in the .ear file contains a service.module file.

Examples

The following command example:
  • Creates an application file called MyValueModule.ear from the MyValueModule.jar file.
  • Specifies that the resources reside in the directories c:\java\myvaluemoduleres.rar and c:\java\commonres.jar.
  • Enables the Java subdirectory within the .jar file as free-form.
  • Keeps the temporary files generated during deployment.
servicedeploy MyValueModule.jar 
-classpath "c:\java\myvaluemoduleres.rar;c:\java\commonres.jar"
-freeform true -keep