Show TOC Start of Content Area

Procedure documentation Using Shell Scripts to Work with SDAs  Locate the document in its SAP Library structure

Use

If you want to perform single operations over SAP-specific or standard JavaEE archives and you do not have access to an SAP NetWeaver Developer Studio, you can use shell scripts.

Note

We strongly advise you use SAP NetWeaver Developer Studio whenever possible.

Prerequisites

Open a command prompt in the <Installation_Directory>/usr/sap/<SID>/<Instance_Number>/j2ee/deployment/scripts directory.

Procedure

With all commands you can see the working directory in the <Installation_Dicrectory>/usr/sap/<SID>/<Instance_Number>/j2ee/cfg/deployment14.properties file.

Caution

Under no circumstances should you edit this file. If you do, the behavior of the shell scripts will not be predictable.

Generating a Single SDA

...

Execute the command:

make_SDA <path_to_source_file> [-w work_dir] [-d destination_file] [-pr properties_file]

The options are:

      <path_to_source_file> - the path to the source file to produce an SDA from

      [-w work_dir] – the work directory

      [-d destination_file] – the destination SDA file

      [-pr properties_file] – the properties file where SDA attributes are specified

Example

The following examples show possible usages of this command:

§         make_SDA /EARs/MyOldEar.ear -pr JavaEE.properties

Produces an SDA file of software type J2EE from the specified EAR file.

The SDA attributes are taken from the JavaEE.properties file. You can only modify the vendor element by adding your name.

The destination SDA is <work_dir>/SDA/MyOldEar.ear.

§         make_SDA /EARs/MyOldEar.ear

Produces an SDA file of software type J2EE from the specified EAR file.

The destination SDA is <work_dir>/SDA/MyOldEar.ear.

§         make_SDA D:\libs\OurLib.jar -d D:\libs\sda\OurLib.sda -pr library.properties

Produces an SDA file of software type library from the specified JAR file.

The SDA attributes are taken from library.properties.

The destination SDA is D:\libs\sda\OurLib.sda.

§         make_SDA /RARs/OldRar.rar -w /RARs/temp -pr single-module.properties

Produces an SDA file of software type single-module from the specified RAR file.

The SDA attributes are taken from single-module.properties.

The working directory is /RARs/temp.

The destination SDA is <work_dir>/SDA/OldRar.rar.

§         make_SDA /EJBs/OurEJB.jar

Produces an SDA file of software type single-module from the specified JAR file.

The destination SDA is <work_dir>/SDA/OurEJB.jar.

Generating Several SDAs

Execute the command:

make_SDAs <path_to_source_dir> [-w work_dir] [-d destination_dir]

The options are:

·        <path_to_source_dir> - the path to directory with source files

·        [-w work_dir] – the work directory

·        [-d destination_dir] – the destination directory

Example

The following examples show possible usages of this command:

§         make_SDAs /EARs

Produces an SDA file for each source file from the specified directory.

The destination directory is <work_dir>/SDA.

§         make_SDAs D:\libs -d D:\libs\sda

Produces an SDA file for each source file from the specified directory.

The destination directory is D:\libs\sda.

§         make_SDAs /RARs -w /RARs/temp

Produces an SDA file for each source file from the specified directory.

The working directory is /RARs/temp.

The destination directory is <work_dir>/SDA.

Deploying Archives

Execute the command:

deploy <user>:<password>@<host>:<port> <archive> [-no_start]

The options are:

·        <user> - the user with administrators' rights

·        <password> - the password for this user

·        <host> - the target AS Java host

·        <port> - the target P4 port

·        <archive> - the path to archive

·        [-no_start] – the deployed modules will not be started

Example

The following examples show possible usages of this command:

§         deploy administrator:<password>@localhost:50004 /EARs/MyEar.ear

Deploys the EAR file to the specified target using provided credentials.

The deployed application is started afterwards.

§         deploy J2EE_ADMIN:<password>@their_host:50804 /EJBs/OurEJB.jar -no_start

Deploys the EJB JAR file to the specified target using the credentials provided.

End of Content Area