ISA Build

16
7/27/2019 ISA Build http://slidepdf.com/reader/full/isa-build 1/16  mySAP TM Customer Relationship Management SAP ® Internet Sales 3.0/3.1/4.0 Building and Updating Modified SAP Internet Sales Web Applications Document Version 1.50 – February 18, 2005

Transcript of ISA Build

Page 1: ISA Build

7/27/2019 ISA Build

http://slidepdf.com/reader/full/isa-build 1/16

 

mySAPTM

Customer

Relationship

Management

SAP® Internet Sales 3.0/3.1/4.0

Building and Updating Modified

SAP Internet Sales Web Applications 

Document Version 1.50 – February 18, 2005

Page 2: ISA Build

7/27/2019 ISA Build

http://slidepdf.com/reader/full/isa-build 2/16

© Copyright 2004 SAP AG. All rights reserved.

 No part of this publication may be reproduced or transmitted in any

form or for any purpose without the express permission of SAP AG.

The information contained herein may be changed without prior 

notice.

Some software products marketed by SAP AG and its distributors

contain proprietary software components of other software vendors.

Microsoft®, WINDOWS®, NT®, EXCEL®, Word ®, PowerPoint® and 

SQL Server ® are registered trademarks of Microsoft Corporation.

IBM®, DB2®, DB2 Universal Database, OS/2®, Parallel Sysplex®,

MVS/ESA, AIX®, S/390®, AS/400®, OS/390®, OS/400®, iSeries,

 pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere®,

 Netfinity®, Tivoli®, Informix and Informix® Dynamic Server TM

are

trademarks of IBM Corp. in USA and/or other countries.

ORACLE® is a registered trademark of ORACLE Corporation.

UNIX®, X/Open®, OSF/1®, and Motif ® are registered trademarks of 

the Open Group.

Citrix®, the Citrix logo, ICA®, Program Neighborhood ®, MetaFrame®,

WinFrame®, VideoFrame®, MultiWin® and other Citrix product names

referenced herein are trademarks of Citrix Systems, Inc.

HTML, DHTML, XML, XHTML are trademarks or registered 

trademarks of W3C®, World Wide Web Consortium, Massachusetts

Institute of Technology.

JAVA® is a registered trademark of Sun Microsystems, Inc.

J2EE™ is a registered trademark of Sun Microsystems, Inc.

JAVASCRIPT® is a registered trademark of Sun Microsystems, Inc.,

used under license for technology invented and implemented by

 Netscape.

SAP, SAP Logo, R/2, RIVA, R/3, SAP ArchiveLink, SAP Business

Workflow, WebFlow, SAP EarlyWatch, BAPI, SAPPHIRE,

Management Cockpit, mySAP, mySAP.com, and other SAP products

and services mentioned herein as well as their respective logos are

trademarks or registered trademarks of SAP AG in Germany and in

several other countries all over the world. MarketSet and Enterprise

Buyer are jointly owned trademarks of SAP Markets and Commerce

One. All other product and service names mentioned are the

trademarks of their respective owners.

Disclaimer

Some components of this product are based on Java™. Any code

change in these components may cause unpredictable and severe

malfunctions and is therefore expressively prohibited, as is any

decompilation of these components.

Any Java™ Source Code delivered with this product is only to be used 

 by SAP’s Support Services and may not be modified or altered in any

way.

Documentation in the SAP Service Marketplace

You can find this documentation at the following address:http://service.sap.com/instguides  

SAP AGNeurottstraße 1669190 Walldorf Germany

 T +49/18 05/34 34 24F +49/18 05/34 34 20www.sap.com

Page 3: ISA Build

7/27/2019 ISA Build

http://slidepdf.com/reader/full/isa-build 3/16

 

Typographic Conventions

Type Style Represents

Example Text Words or characters thatappear on the screen. Theseinclude field names, screentitles, pushbuttons as well asmenu names, paths andoptions.

Cross-references to otherdocumentation

Example text Emphasized words or phrasesin body text, titles of graphicsand tables

EXAMPLE TEXT Names of elements in thesystem. These include reportnames, program names,transaction codes, tablenames, and individual keywords of a programminglanguage, when surrounded bybody text, for example,SELECT and INCLUDE.

Example text Screen output. This includesfile and directory names andtheir paths, messages, namesof variables and parameters,source code as well as namesof installation, upgrade anddatabase tools.

Example text Exact user entry. These arewords or characters that youenter in the system exactly asthey appear in thedocumentation.

<Exampletext>

Variable user entry. Pointedbrackets indicate that youreplace these words andcharacters with appropriateentries.

EXAMPLE TEXT  Keys on the keyboard, forexample, function keys (suchas F2) or the ENTER key.

Icons

Icon Meaning

Caution

Example

Note

Recommendation

Syntax

Page 4: ISA Build

7/27/2019 ISA Build

http://slidepdf.com/reader/full/isa-build 4/16

 

4 February 2004

Contents

Building and Updating Modified SAP Internet Sales Web Appl ications .......................................................................................5 

1 Install ing and Conf iguring the ISA Bui ld Tool .................................6 

2 Working With Ant and the Build Tool ................................................8 

3 Building Modified SAP Internet Sales Web Applications..............11 

3.1 Advanced Features ..............................................................................13 3.1.1 Reusing J ava Sources for Different Applications .......................................................13 3.1.2 Building Two Applications Using the Same SAP Application.....................................13 3.1.3 Adding Own jar-Files...................................................................................................14 

3.1.4 Modifying the Build Process .......................................................................................14 3.2 Deployment and Setting of Deployment Parameters ........................ 14 

4 Updating to a Higher Support Package Level or Applying a HotFix ..........................................................................................................15 

5 Build Tool Targets .............................................................................16 

Page 5: ISA Build

7/27/2019 ISA Build

http://slidepdf.com/reader/full/isa-build 5/16

 

5 September 2003

Building and Updating Modified SAPInternet Sales Web Applications Purpose

Almost every Internet Sales (ISA) project changes or extends the application shipped bySAP. To reduce the implementation effort and upgrade length, we provide you with a buildtool.

 The ISA build tool is based on Apache Ant. Ant is the most common build tool for J avaapplications. It is J ava-based and can be extended using J ava classes. The configurationfiles are XML-based.

For more information on Ant, see the online documentation at the Internet addressant . apache. org.

 The ISA build tool consists of a configuredbui l d. xml file, containing all targets and tasksrequired to update and build modified Internet Sales Web Applications. Additionally, itprovides a template called bui l dmodi f i cat i on. xml , which allows you to create your ownbui l d. xml file.

 The ISA build tool is available as attachement to SAP Note 594370.

Features of the Build Tool

• Building modified Web applications that are based on the delivered SAP version. The toolsupports you in compiling new J ava classes and adding them to your application.

• Creating a conflict list for updates to a higher Support Package level. The conflict listcontains the files that were modified by the customer and SAP in the time between theold and the new Support Package being imported.

Page 6: ISA Build

7/27/2019 ISA Build

http://slidepdf.com/reader/full/isa-build 6/16

1 Installing and Configuring the ISA Build Tool

6 February 2004

1 Installing and Configuring the ISA BuildTool

Prerequisites

• You have downloaded the latest version from Apache Ant (Binary Distribution, at leastversion 1.5.1) from the Internet address ant . apache. org.  

If your are using Windows XP as operating system, do not install Ant version1.6.1., since it is not compatible with the build tool. Use Ant version 1.5.1instead.

• You have downloaded the ISA build tool from SAP Note 594370.

• You have access to an SAP J 2EE Engine with a deployed Internet Sales Web

Application. 

Procedure

 This documentation applies two installations on both Unix and Windows.However, to ensure that the documentation is easy to read, only the Unixsyntax is used when referring to path names.

1. Install Apache Ant according to the Ant installation documentation.

2. Copy <J 2EE Engi ne r oot>/ cl ust er / ser ver / addi t i onal - l i b/ i nqmyxml . j ar  to %ANT_HOME%/ l i b.

3. Unzip the file bui l dt ool . zi p into a separate directory, which is referred to as <I SAbui l d t ool >in this documentation. The following directories are created:

•  <I SA bui l d t ool >/ bi n 

•  <I SA bui l d t ool >/ l i b 

4. Start ant from the command line in the <I SA bui l d t ool >/ bi n directory using thefollowing command:

Windows: %ANT_HOME%\bin\ant init 

Unix: $ANT_HOME/bin/ant init

If you followed the ant installation guide exactly, this can be simplified to ant init.

5. Make the following entries:

Input Descript ion Sample value

project name(project.name) 

 This project name is appended to thecontext root of the deployedapplications. It is used as the defaultname for the j ar file that contains theproject́ s J ava extensions.

Myproject

J2EE Engine root(project.inqmy.root) 

 This directory is required to accessthe j ar files of the SAP J 2EEEngine. They are required to compilethe project́ s J ava extensions and to

Unix: / usr / sap/ SAP/M00/ j 2ee 

Windows:

Page 7: ISA Build

7/27/2019 ISA Build

http://slidepdf.com/reader/full/isa-build 7/16

1 Installing and Configuring the ISA Build Tool

February 2004 7

process some style sheets.

Windows: Use slashes (/) instead of 

backslashes (\) for path names. Antcannot handle backslashes.

d: / usr / sap/ SAP/M00/ j 2ee 

SAP application name(project.sap.app.name)

 This identifies the default SAPapplication to modify or update.

b2b

Page 8: ISA Build

7/27/2019 ISA Build

http://slidepdf.com/reader/full/isa-build 8/16

2 Working With Ant and the Build Tool

8 February 2004

2 Working With Ant and the Build Tool

Calling ISA Build Tool Commands

 The <I SA bui l d t ool >/ bi n directory contains the bui l d. xml file. This file contains thetargets for the ISA build tool.

A target consists of several task elements. An ant task is an executable command. A targetcan depend on other targets.

When Ant is called without stating a build file it automatically looks for a bui l d. xml file inthe directory where it was started.

 To call an ISA build tool target, enter ant [target]. 

 To call a target and specify a property at the same time, enterant –D<propertyname>=<value> [target]. 

 The targethelp displays an overview of all available targets in the ISA buildtool.

Naming Conventions

 The following variables are used in this documentation. The values for these variables aresaved in the <I SA bui l d t ool >/ bi n/ t empl at es/ pr oj ect . propert i es file.

Variable Descript ion Default value

<I SA bui l d t ool >  Root directory of 

the ISA build tool

Current working directory during

installation of the ISA build tool.<pr oj ect . sap. app. name> Name of SAP

application that isbasis for themodified version

 This value was set during installation.

<pr oj ect . war . name>  Name of the warfile to be created

<pr oj ect . sap. app. name> _<proj ect . name> 

<pr oj ect . j ar . name>  Name of the j arfile to build fromthe projectspecific javaclasses

<pr oj ect . name> 

<pr oj ect . ear . name> Name of themodifiedapplication

Directory Structure

 The build tool requires the following directory structure. All these directories, except thesubdirectories of the project directory are created, when you install the build tool. You mustcreate the subdirectories of the project directory manually. If you did not create the <I SA

bui l d t ool >/ pr oj ect / <proj ect . war . name>directory, it will be created when you call

the build target or the clean target, since it is mandatory for the build process.

Page 9: ISA Build

7/27/2019 ISA Build

http://slidepdf.com/reader/full/isa-build 9/16

Page 10: ISA Build

7/27/2019 ISA Build

http://slidepdf.com/reader/full/isa-build 10/16

2 Working With Ant and the Build Tool

10 February 2004

pr oj ect _ear    The new modified Web application is builtinto this directory. This directory is filledwhen you execute the ant target build .

l i b  Contains additional libraries necessary forupdating ISA Web applications. Normallynot modified.

ol d_sap_ear   Only relevant for a Support Packageupdate or an update to a higher patch levelof a Support Package. This directorycontains the SAP application (*. ear  package) that was the basis for the lastmodified version. The files are used tocheck what changes were done by SAPand also to manually compare individualfiles.

Copy the SAP applicationsthat were the basis for theformer modified version to thisdirectory.

sap_ear   Contains the SAP application (*. ear  package) that is the basis for the currentmodified version

Copy the SAP applicationsyou want to use as basisversion for modifications tothis directory.

ISA 3.1 and later: If you wantto build SDM deployable files,copy the sda_bui l d. xml tothis directory.

t emp  Temporary directory for compiled classfiles

Page 11: ISA Build

7/27/2019 ISA Build

http://slidepdf.com/reader/full/isa-build 11/16

3 Building Modified SAP Internet Sales Web Applications

February 2004 11

3 Building Modified SAP Internet SalesWeb Applications

The Build Process

 The build process searches in the<I SA bui l d t ool >/ sap_ear directory for an SAPapplication file (*. ear file) and extracts its war file into a work directory. If a <I SA bui l dt ool >/ pr oj ect / j ava/ <proj ect . j ar . name> directory exists it compiles all javasources that are contained in this directory and builds a j ar file from the compiled J avasources. Then, it builds a new Web application from the following files:

• All files in the sap_ear directory

• The project j ar -file

• The project specific web application files that are contained in the

<I SA bui l d t ool >/ pr oj ect / <pr oj ect . war . name>directory The new application is built into the <I SA bui l d t ool >/ proj ect _ear /<proj ect . ear . name> directory. If there are files that have the same name in the <I SAbui l d t ool >/ pr oj ect / <proj ect . war . name> directory and in the SAP application, thefiles from the <I SA bui l d t ool >/ pr oj ect / <pr oj ect . war . name>are copied to thenew Web application and the files from the SAP application are ignored.

Procedure

1. Copy the SAP application (<pr oj ect . sap. app. name>) that you want to modify to the<I SA bui l d t ool >/ sap_ear directory.

2. Copy the Web application files you want to modify or add to the

<I SA bui l d t ool >/ pr oj ect / <pr oj ect . war . name>.3. If you want to add project specific J ava classes, create the directory

<I SA bui l d t ool >/ pr oj ect / j ava/ <pr oj ect . j ar . name>.

4. Copy the project-specific J ava source files to<I SA bui l d t ool >/ pr oj ect / j ava/ <pr oj ect . j ar . name>.

ISA 3.1 and later: If you want to build SDM deployable files, copy thesda_bui l d. xml to the directory sap_ear  

5. Execute the ant target build .

 This creates a project Web application in the<I SA bui l d t ool >/ proj ect _ear directory.

Use the project name (project.name) mypr oj ect and modify the SAPapplication b2b. ear .1. Copy b2b. ear to <I SA bui l d t ool >/ sap_ear .  2. Copy your modified WEB- I NF/ web. xml file to <I SA bui l d

t ool >/ pr oj ect / b2b_mypr oj ect / WEB- I NF/ web. xml .3. To add your own java classes, create the directory

<I SA bui l d t ool >/ pr oj ect / j ava/ mypr oj ect .  

Page 12: ISA Build

7/27/2019 ISA Build

http://slidepdf.com/reader/full/isa-build 12/16

3 Building Modified SAP Internet Sales Web Applications

12 February 2004

4. Copy your own java class (com. your company. i sa. Yourcl ass) to the<I SA bui l d t ool >/ pr oj ect / j ava/ mypr oj ect / com/yourcompany/ i sa/ Yourcl ass . j ava directory.

5. Execute the ant target build . The build tool creates the ear file <I SA

bui l d t ool >/ pr oj ect _ear / b2b_myproj ect . ear

Page 13: ISA Build

7/27/2019 ISA Build

http://slidepdf.com/reader/full/isa-build 13/16

3 Building Modified SAP Internet Sales Web Applications

February 2004 13

3.1 Advanced Features

3.1.1 Reusing Java Sources for Different ApplicationsIf you have already created modifications for one SAP application (for example b2b. ear ),you can reuse them to modify another SAP application (for example b2c. ear ).

1. Copy the SAP application (for example b2c. ear ) you want to modify into the<I SA bui l dtool >/ sap_ear directory.

2. Call ANT –Dproject.sap.app.name=<project.sap.app.name> -Dproject.ear.name=<project.sap.app.name> _ <project.name>  build .

If you added some J ava classes for the B2B application and you want to use

them for the B2C, too, copy b2c. ear to the <I SA bui l dtool >/ sap_ear  directory and call Ant –Dproject.sap.app.name=b2c -

Dproject.ear.name=b2c_myproject build .  This creates a B2C application based on the SAP application b2c. ear. Itcontains modified Web files from the proj ect / j ava/ b2c_myproj ect  directory and the same J ava classes that were already used for the B2B Webapplication.

3.1.2 Building Two Appl ications Using the Same SAP ApplicationIf you want to create two similar applications with different context roots, you must set theparameters

pr oj ect . sap. app. name,  pr oj ect . war . name and proj ect . ear . name accordingly.

Both applications have the same content but different context roots. This is necessary to runtwo independent Internet Sales applications on the same SAP J 2EE Engine. It is required forthe partner portal scenario.

When you call the build target make the following settings:

•  proj ect . sap. app. name =SAP application that is the basis for the modifiedapplication

•  proj ect . sap. war . name =Name of the war file of an already modified application

•  proj ect . ear . name =Name of the new application

In this case, the build tool generates a new application that contains the same modified webfiles as a previously built application.

If you want to build a b2r _myproj ect . ear file based onb2b_myproj ect . ear , set:

•  pr oj ect . sap. app. name to b2b

Page 14: ISA Build

7/27/2019 ISA Build

http://slidepdf.com/reader/full/isa-build 14/16

3 Building Modified SAP Internet Sales Web Applications

14 February 2004

•  pr oj ect . war . name to b2b_myproject

•  proj ect . ear. name to b2r_myproject

3.1.3 Adding Own jar-Files

 You can add your own j ar -file to the application by putting it into the<I SA bui l dt ool >/ proj ect / <pr oj ect . war . name>/ WEB- I NF/ l i b directory. All filesin this directory are available in the class path during compiling.

3.1.4 Modifying the Build Process

 To modify the build process you can use the pr oj ect / bui l dmodi f i cat i on. xml file. You can modify this build file and use it to compile and package the application.

3.2 Deployment and Setting of DeploymentParameters

After you have created the modified web application deploy it as usual.If you are upgrading with SDM for deployment, use the Use existing Deployment Parameter  option in the Deployment Configuration dialog box of the SDM user interface.

If you use the SAP J 2EE Deployment Tool, save the deploy project to a file to reuse it forlater upgrades or patches. For more information, see the SAP J2EE Deployment Manual (located in the <j 2ee- r oot>/ docs/ directory  as depl oymanual . pdf  after installationof the SAP J 2EE Engine). If you use this project later for an upgrade or patch, the parameteryou entered during deployment will not be reused.

Keep in mind that any deployment parameter overwrites the settings in theweb. xml file of the J 2EE application.Never change a file directly in the application folder on the SAP J 2EE Engine. These changes will be lost after the next upgrade or patch. This applies toweb. xml and all other files of the Web application.

If a context parameter of the web. xml file is not displayed in the deployment tool you use,you can modify web. xml by putting your modified version into thepr oj ect / <pr oj ect . war . name>/ WEB- I NF/ web. xml directory. Otherwise, you canchange it using the deploy tool.

Page 15: ISA Build

7/27/2019 ISA Build

http://slidepdf.com/reader/full/isa-build 15/16

4 Updating to a Higher Support Package Level or Applying a Hot Fix

February 2004 15

4 Updating to a Higher Support PackageLevel or Applying a Hot Fix

Purpose

 The build tool supports the update to a higher Support Package level by creating a list of filesthat were either modified by the customer or by SAP. If there are files that were modified byboth parties, you must manually merge the modifications. The compile task automaticallyuses the new J ava libraries. Incompatible changes may lead to compiling errors, which youmust resolve.

Prerequisites

• You have configured the ISA build tool.• You have modified the application as described in the previous sections.

Procedure 

1. Copy the old SAP version of <pr oj ect . sap. app. name>. ear that was the base foryour modified project version into the <I SA bui l d t ool >/ol d_sap_ear directory. These files will be used to compare all files of the application later.

2. Copy the new SAP versions of <pr oj ect . sap. app. name>. ear and sda_bui l d. xml  from your Internet Sales distribution to the <I SA bui l d t ool >/sap_ear directory. You only need ansda_bui l d. xml file for SAP ISA 3.1 and higher.

3. Call the targetextract.ears to extract all files from the new and old SAP version intothe corresponding wor k. <pr oj ect . sap. app. name> directories.

4. Execute the ant targetcompare to create an ht ml file that documents the differencesbetween both SAP versions (old and new) and between the old SAP version and your

project version.

 The files di f f er ences. <proj ect . ear . name>. ht ml anddi f f er ences. <pr oj ect . ear . name>. xml are located in the <I SA bui l d t ool > directory.

5. Adjust your modifications to the new Support Package in the following cases

• A file has been changed by SAP that you also had modified for your project version

• A file of your project version relies on an SAP file which was modified

6. Call the target build to rebuild your application based on the new Support Package.

7. Deploy the application as described in section 3.2 Deployment and Setting of 

Deployment Parameters [on page 14].

Page 16: ISA Build

7/27/2019 ISA Build

http://slidepdf.com/reader/full/isa-build 16/16

5 Build Tool Targets

16 February 2004

5 Build Tool Targets

Target Description

cl ean  Creates directories for project-specific files (<I SA bui l d t ool > /pr oj ect / <pr oj ect . war . name>/ WEB- I NF/ l i b, for example)  and deletes the wor k.<pr oj ect . sap. app. name>subdirectories of the folders ol d_sap_ear and sap_ear .

i ni t   Execute this task when you use the ISA build tool for the first time. Itconfigures the build tool and creates the directory structure.

ext r act . ear s  Extracts the ear files in ol d_sap_ear and sap_ear into the subfolderwor k.<pr oj ect . sap. app. name>.  

compar e  Lists all files that were modified by the customer and have changedbetween the old and the new SAP version of the application. The list isin the <I SA bui l d t ool >directory. It is available as an ht ml file(di f f er ences. <pr oj ect . ear . name>. ht ml ) and an xml file(di f f er ences. <pr oj ect . ear . name>. xml ).

bui l d  Compiles the customer J ava extensions (if any) and creates an SDAmerging the files from the sap_ear directory with the files from the<I SA bui l d t ool >/proj ect / <proj ect . war . name>folder.