Code Monkey home page Code Monkey logo

proto-java_hcp_bluegreen's Introduction

#################################################
# Welcome to the SAP Cloud Platform SDK Samples #
#################################################

Runtime    : Java Web Tomcat 8
Version    : 3.25.12
Build Date : 2017-03-16


1. Introduction

All samples can be imported as Eclipse projects or as Maven projects.
We focused on Eclipse and Maven for their wide adoption, but the principles apply also to other IDEs and build systems.

2a. Prerequisites and Import Steps (for Eclipse projects)

(1) As a prerequisite you will need to install the SAP Cloud Platform Tools for Java (Eclipse).
For more information about installing and configuring these tools, see https://tools.hana.ondemand.com.

(2) As a prerequisite you will have to create a server runtime environment called "Java Web Tomcat 8".
You can do so through the menu: Window->Preferences->Server->Runtime Environment->Add...->SAP->Java Web Tomcat 8...
If you imported a sample not having done the above you will have an error: "Faceted Project Problem: Target runtime Java Web Tomcat 8 is not defined".
You can now do as described above or simply run the sample which will guide you through the creation of the runtime: Run As->Run on Server...

Import Steps for Eclipse projects:
  Import as Eclipse Project:
    Menu: File -> Import... -> General -> Existing Projects into Workspace

2b. Prerequisites and Import Steps (for Maven projects)

(1) As a prerequisite for the Maven import you will need to do the above and in addition install the appropriate Eclipse Maven tools as well.
You require the Maven-Eclipse integration and the Maven-Eclipse-WTP integration that bridges between Maven, Eclipse, and the WTP tooling which is useful for web projects.

To install the Maven Integration for Eclipse WTP, proceed as follows:
  From the main menu of the Eclipse IDE, choose  Help -> Eclipse Marketplace.
  Enter 'Maven' in the Find field and choose Go.
  Locate the 'Maven Integration for Eclipse WTP' item and choose the Install button.

Import Steps for Maven projects:
  Import as Maven Project:
    Menu: File -> Import... -> Maven -> Existing Maven Projects

3. Maven Support

The Maven build shows how to completely automate a headless build & test that:
- builds a Java web application based on the SAP Cloud Platform API
- shows how to run rudimentary unit tests (not present in all samples)
- installs, starts, waits for, and stops the local server runtime
- deploys the application to the local server runtime and runs the integration tests
- starts, waits for, and stops the cloud server runtime
- deploys the application to the cloud server runtime and runs the integration tests

The above build procedure makes use of the Maven Plugin for SAP Cloud Platform,
see https://help.hana.ondemand.com/mavenSite/index.html. 

You can activate the local integration tests with the following Maven profile:
mvn clean verify -P local-integration-tests ... (see below for additional Maven properties you need to define as well) 

You can activate the cloud integration tests with the following Maven profile:
mvn clean verify -P cloud-integration-tests ... (see below for additional Maven properties you need to define as well)

In order for the cloud integration tests to pass, you need to provide Maven properties for account, user name, and
password to access the SAP Cloud Platform data center:
mvn clean verify -P cloud-integration-tests -Dsap.cloud.account=... -Dsap.cloud.username=... -Dsap.cloud.password=...

Hint: To avoid retyping the above whenever you call Maven, you can of course add the properties directly to the pom.xml.
      You may like to use environment variables and set the properties in the pom.xml based on their values,
      especially when it comes to sensitive information like passwords which you should avoid to store in clear text.

If you have a (trial) developer account only, you will have to additionally override the default data center host:
mvn clean verify -P cloud-integration-tests ... -Dsap.cloud.host=hanatrial.ondemand.com

If HTTPS Internet access requires a proxy, you will have to additionally provide the following Maven property/ies:
mvn clean verify ... -Dhttps.proxyHost=... -Dhttps.proxyPort=...

Hint: If your proxy requires authentication, you may like to pass along proxy user name and password and implement
      an Authenticator (http://docs.oracle.com/javase/7/docs/api/java/net/Authenticator.html). That is not shown
      in these SDK samples for the sake of better readability.

proto-java_hcp_bluegreen's People

Contributors

wolframk avatar penchalavamshikrishna avatar

Watchers

Vamshi Penchala avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.