Skip to Content
Author's profile photo Former Member

How to use SMP3 sample code for SMP extensions

As a developer with the customer, I may want to be able to build server extensions based on sample code I receive from SAP. This code must run out of the box w/o any dependencies on SAP internal build infrastructure, here you go how to use SMP3 sample code.

1. Download sample source code

    Latest source code address: SAP/sap_mobile_platform_extend_functionality · GitHub

    Download it and unzip it to you work folder, e.g. c:/sample.

2. Prerequisites

  2.1 maven/maven repository, customer should have their own repositories.

        For example in my test, I mapped central Repository, SMP3 use spring framework bundles, it’s required too, for example, Spring OSGI Bundle Repository Sample

        P2 unzip repository used for build p2 artifacts, e.g., see repository.javaweb property in submodule sample.parent.

  It’s used when building p2 features/repository. see featuren pom or repository pom.

  2.2 SMP3 installed/Upload dependencies to reporisotory from SMP3

        There is an utility in SMP3 installation folder named which can uploaded dependencies to their repository incase missing maven artifacts.

            Usage: java -jar bundles/


            <DIST DIRECTORY>, e.g. ../

            <NEXUS URL>, e.g. http://localhost/nexus

            <REPOSITORY NAME>, e.g. repo

            <USERNAME>, e.g. admin

            <PASSWORD>, e.g. password

            <put|rest> for using the PUT or REST Nexus interface, defaults to REST (which auto-generates POM files too)

            e.g. I have local nexus, smp3_customer is one repository. admin/admin123 is user/password. After unzip the sample code to c:/sample, the file c:/sample/ is there, suppose SMP3 install in folder C:\smp3, open command line, go to C:\smp3\extras\dependencies, run below command to upload dependencies to smp3_customer repository.

        java -jar c:\sample\ C:\smp3\plugins smp3_customer admin admin123

3. Customize and build samples source code

    3.1 Build sample code

        The submodule sample.parent need to build first first, then build each samples separately, customer can customize the code as need.

    3.2 Build p2 repository

        P2 update-site include features and repository, Open command line, go to update-site folder, run maven command mvn clean install build it, the p2 repository will be generated in folder repository/target/repository.

  If some of features are not required, customer can comment it.   

4. Install features/repository in Admin UI

    4.1 Go to SMP ADMIN UI->SETTINGS -> REPOSITORIES, add new repository.

        e.g. Unzip the code to c:/sample, then generate p2 repository to c:/sample/update-site/repository/target/repository, input file:/c:/sample/update-site/repository/target/repository to text box in adminUI, save it.

    4.2 Go to SMP ADMIN UI->SETTINGS -> FEATURES&COMPONENTS, enable features added in previous step.

5. Verify if it is take effect or not

  5.1 JPA

        Visit URL http://localhost:8080/
        Output in browser, more actions can be done by below API






  5.2 Properties

      Output in console:

      The full URL is:

  5.3 Servlet


      Output in browser:

      Service processed by NoSlash at URL http://localhost:8080/NoSlash

  5.4 Filters

      If you open url http://localhost:8080/public/abc in browser, output in SMP console:

      noauthfilter forwarding /public/abc to /abc

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Martin English
      Martin English

      None of the *.sap..* links resolve. The implication is that they are SAP intranet links.

      How is this of ANY use at all to someone who does not work for SAP ?

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      I attached the zip file, it need remove .txt suffix then unzip to local.

      I'm requesting OSS approval, after that, I can upload it to github.


      Author's profile photo Former Member
      Former Member

      Hello everyone,

      is there any description about SMP3 technical specification ? How does it work ? I need to add some custom feature to Agentry application so I analyze server code. I see that equinox is used and some low lewel (dll) libraries (via JNI). Do you know know how 'synchronization' works ? which steps are included ?