UI5 source upload to SAP NetWeaver ABAP
npm install grunt-nwabap-ui5uploader
'grunt-nwabap-ui5uploader' is a Grunt Plugin which allows a developer to deploy SAPUI5/OpenUI5 sources to a SAP NetWeaver ABAP system as part of the Grunt task chain.
Starting from version 2.0.0 this deployer uses the OData Service /UI5/ABAP_RESPOSITORY_SRV for deploying UI5 sources. Please make sure that the service is activated on your system (for details you can check SAP note 2999557). The new service does some sanity checks like e.g. virus scans. If you have not configured virus scan profiles or want to disable virus scanning please have a look to SAP note 2437892.
Current deployer versions starting from version 2.0.0 can be used with SAP systems on which component SAP_UI 753 is installed. On systems with a lower version of component SAP_UI, you have to use version 1.x.x of this deployer.
Some further information can be found in the SAP Community.
1.0.1If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you are familiar with that process, you may install this plugin with this command:
``shell`
npm install grunt-nwabap-ui5uploader --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
`js`
grunt.loadNpmTasks('grunt-nwabap-ui5uploader');
to the data object passed into grunt.initConfig().`js
grunt.initConfig({
nwabap_ui5uploader: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
}
});
`$3
#### options.conn.server
Type:
StringDefines SAP NetWeaver ABAP server (for instance 'http://myserver:8000').
#### options.conn.client
Type:
StringOptional parameter to specify the client (transferred as sap-client URL parameter). In case the option is not specified the default client is used if specified.
#### options.conn.useStrictSSL
Type:
Boolean
Default: trueSSL mode handling. In case of self signed certificates the useStrictSSL mode option can be set to
false to allow an upload of files.#### options.conn.proxy
Type:
StringOptional parameter to specify proxy used for communication with SAP NetWeaver ABAP server (for instance 'http://myproxyhost:3128').
#### options.conn.testMode
Type:
Boolean
Default: falseOptional parameter to define if upload is done in test mode or not.
#### options.conn.customQueryParams
Type:
ObjectOptional parameter with key/value pairs of custom parameters which are added to the call to the SAP NetWeaver ABAP server. For instance:
`js
customQueryParams: {
myCustomParameter1: 'myCustomValue1',
myCustomParameter2: 'myCustomValue2'
}
`#### options.auth.user
Type:
StringDefines the user which is used for access to the SAP NetWeaver ABAP server. It is not recommended to store the user in the Grunt file. It should be passed as argument.
#### options.auth.pwd
Type:
StringDefines the users password for access to the SAP NetWeaver ABAP server. It is not recommended to store the password in the Grunt file. It should be passed as argument. Do also not store the password as not masked value in a CI server environment. Use plugins to create masked variables (for instance the 'Mask Passwords Plugin' for Jenkins).
#### options.ui5.language
Type:
String
Default: ENDefines the objects original language.
#### options.ui5.package
Type:
StringDefines the development package in which the BSP container for the UI5 sources is available or should be created.
#### options.ui5.bspcontainer
Type:
StringDefines the name of the BSP container used for the storage of the UI5 sources. Length is restricted to 15 characters (exclusive customer specific namespaces, e.g. /YYY/).
#### options.ui5.bspcontainer_text
Type:
StringDefines the description of the BSP container.
#### options.ui5.transportno
Type:
String
Optional in case options.ui5.package is set to '$TMP'.Defines the transport number which logs the changes. For the transport number it would also make sense to pass it via an argument.
#### options.ui5.create_transport
Type:
Boolean
Default: falseSet this option to true in case a new transport should be created each time the application is uploaded.
#### options.ui5.transport_text
Type:
StringOptional in case options.ui5.create_transport is set to false.
Text for the new transport to be created.
#### options.ui5.transport_use_user_match
Type:
Boolean
Default: falseOptional, if set to true, it will be tried to find a transport request of the given user. If no transport is found and
create_transport is enabled a new one will be created and used for further file uploads.#### options.ui5.transport_use_locked
Type:
Boolean
Default: falseOptional, if set to true and a file upload failed due the BSP application is locked in another transport, the old (original one) one will be used to upload the files.
#### options.resources.cwd
Type:
StringDefines the base folder which contains the sources (for instance 'build'). It should be avoided to use everything from the
webapp folder, because some directories in it should not be packaged and uploaded into a BSP application. To create a build, use another grunt task to copy the relevant files to the build folder. In addition for instance you can use the openui5_preload task from the grunt-openui5 plugin to create a component preload file.#### options.resources.src
Type:
String or array of String Defines files for upload.
$3
#### Upload to '$TMP' package
`js
var sUser = grunt.option('user');
var sPwd = grunt.option('pwd');grunt.initConfig({
nwabap_ui5uploader: {
options: {
conn: {
server: 'http://myserver:8000',
},
auth: {
user: sUser,
pwd: sPwd
}
},
upload_build: {
options: {
ui5: {
package: '$TMP',
bspcontainer: 'ZZ_UI5_LOCAL',
bspcontainer_text: 'UI5 upload local objects'
},
resources: {
cwd: 'build-folder',
src: '*/.*'
}
}
}
}
});
`#### Upload to a transport tracked package
`js
var sUser = grunt.option('user');
var sPwd = grunt.option('pwd');grunt.initConfig({
nwabap_ui5uploader: {
options: {
conn: {
server: 'http://myserver:8000',
},
auth: {
user: sUser,
pwd: sPwd
}
},
upload_build: {
options: {
ui5: {
package: 'ZZ_UI5_REPO',
bspcontainer: 'ZZ_UI5_TRACKED',
bspcontainer_text: 'UI5 upload',
transportno: 'DEVK900000'
},
resources: {
cwd: 'build-folder',
src: '*/.*'
}
}
}
}
});
`#### Upload to a transport tracked package, creating a new transport for each upload
`js
var sUser = grunt.option('user');
var sPwd = grunt.option('pwd');grunt.initConfig({
nwabap_ui5uploader: {
options: {
conn: {
server: 'http://myserver:8000',
},
auth: {
user: sUser,
pwd: sPwd
}
},
upload_build: {
options: {
ui5: {
package: 'ZZ_UI5_REPO',
bspcontainer: 'ZZ_UI5_TRACKED',
bspcontainer_text: 'UI5 upload',
create_transport: true,
transport_text: 'Transport for ZZ_UI5_TRACKED container'
},
resources: {
cwd: 'build-folder',
src: '*/.*'
}
}
}
}
});
`#### Upload to different servers
`js
var sUser = grunt.option('user');
var sPwd = grunt.option('pwd');grunt.initConfig({
nwabap_ui5uploader: {
upload_build_740: {
options: {
conn: {
server: 'http://myserver740:8000',
},
auth: {
user: sUser,
pwd: sPwd
},
ui5: {
package: 'ZZ_UI5_REPO',
bspcontainer: 'ZZ_UI5_TRACKED',
bspcontainer_text: 'UI5 upload',
transportno: 'DEVK900000'
},
resources: {
cwd: 'build-folder',
src: '*/.*'
}
}
},
upload_build_750: {
options: {
conn: {
server: 'http://myserver750:8000',
},
auth: {
user: sUser,
pwd: sPwd
},
ui5: {
package: 'ZZ_UI5_REPO',
bspcontainer: 'ZZ_UI5_TRACKED',
bspcontainer_text: 'UI5 upload',
transportno: 'DEVK900000'
},
resources: {
cwd: 'build-folder',
src: '*/.*'
}
}
}
}
});
`#### Create and reuse a transport request
`js
var sUser = grunt.option('user');
var sPwd = grunt.option('pwd');grunt.initConfig({
nwabap_ui5uploader: {
options: {
conn: {
server: 'http://myserver:8000',
},
auth: {
user: sUser,
pwd: sPwd
}
},
upload_build: {
options: {
ui5: {
package: 'ZZ_UI5_REPO',
bspcontainer: 'ZZ_UI5_TRACKED',
bspcontainer_text: 'UI5 upload',
create_transport: true,
transport_use_user_match: true,
transport_text: 'Transport for ZZ_UI5_TRACKED container'
},
resources: {
cwd: 'build-folder',
src: '*/.*'
}
}
}
}
});
``