2

After developing a Java application, I ran the command

mvn clean install

the build resulted in SUCCESS. Now, I tried to run the app in the local environment with the command

mvn scp:clean scp:push -pl application

It resulted in the error as below.

No plugin found for prefix 'scp' in the current project and in the plugin groups

Can someone please help me?

Thanks, Sankeerth

Sankeerth
  • 249
  • 3
  • 12
  • 5
    Did you generate your project using the sdk archetypes? Can you confirm that your pom file (application) lists the scp-neo-maven-plugin? – Daniel Kurzynski Apr 13 '18 at 15:02
  • Yes, I generated the project using the SDK archetype for Cloud foundry with below command. `mvn archetype:generate -DarchetypeGroupId=com.sap.cloud.s4hana.archetypes -DarchetypeArtifactId=scp-cf-tomee -DarchetypeVersion=LATEST` – Sankeerth Apr 13 '18 at 15:35
  • Do we have any plugin for deployment to the local runtime of SAP Cloud Platform cloud foundry environment? – Sankeerth Apr 13 '18 at 15:41
  • For the Cloud Foundry environment, the archetypes use `mvn jetty:run` for the `scp-cf-tomcat` archetype, `mvn tomee:run` for the `scp-cf-tomee` archetype, and `mvn spring-boot:run` for the `scp-cf-spring` archetype. – Sander Wozniak Apr 13 '18 at 19:12
  • If the provided answer was helpful would you mind accepting it? Thank you! – Philipp Herzig Apr 21 '18 at 20:52

1 Answers1

0

scp:push is the command to deploy an application locally which is built for the neo environment as described here. It is required that you generated your project with a neo archetype, such as scp-neo-javaee7.

On Cloud Foundry for the tomee archetype you should be able to execute the following command to start the application locally: cd application mvn tomee:run

Additional information can be found in the Tutorial for Cloud Foundry

  • 1
    The command depends on the archetype. You can use `mvn jetty:run` for the `scp-cf-tomcat` archetype, `mvn tomee:run` for the `scp-cf-tomee` archetype, and `mvn spring-boot:run` for the `scp-cf-spring` archetype. – Sander Wozniak Apr 13 '18 at 19:14
  • mvn tomee:run is working, but it didn't give me an option to provide "ErpQueryEndpoint" details. So, I added the destination as an environment variable in manifest.yml file. But when I run the application it gave an error as below. **HTTP Status 500 - com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException: Failed to retrieve destinations from environment variable "destinations". Have you defined this variable?** – Sankeerth Apr 13 '18 at 19:21
  • 2
    Locally, you can set destinations simply via environment variables like on CF: https://stackoverflow.com/questions/49636397/how-to-add-multiple-destinations-for-a-java-application-in-cloud-foundry. Use your OS-specific command to set environment variables (Linux: export, Windows: set). – Philipp Herzig Apr 13 '18 at 19:25