项目作者: GreenButtonAlliance

项目描述 :
Spring Framework implementation of a Green Button Third Party OpenESPI Application
高级语言: Java
项目地址: git://github.com/GreenButtonAlliance/OpenESPI-ThirdParty-java.git
创建时间: 2013-08-20T16:22:15Z
项目社区:https://github.com/GreenButtonAlliance/OpenESPI-ThirdParty-java

开源协议:Apache License 2.0

下载


CircleCI
Quality Gate Status

OpenESPI-ThirdParty — Archived January 29, 2024

NOTE: This repository has been archived and is no longer being maintained. The code is preserved here for historical
reference and access to the code base.

The Open Energy Services Provider Interface (ESPI) Third Party Repository Providing implementations of the interface used to provide energy usage information to retail customers.

An operational sandbox with these services operating may be found at:
Green Button Alliance Third Party Sandbox

Setup

Note: You need to download and install OpenESPI-Common-Java into your local Maven repository to build this project.

First clone the project from github:

  1. git clone https://github.com/GreenButtonAlliance/OpenESPI-ThirdParty-java.git
  2. cd OpenESPI-ThirdParty-java/

Build and start tomcat7 using maven (note: you must have first built the OpenESPI-Common-java jar):

  1. mvn tomcat7:run

Now the application should be available at http://localhost:9000/.

Building

  1. # for the default test profile
  2. mvn clean install
  3. # or for a specific profile
  4. mvn -P <profile name> -Dmaven.test.skip=true clean install

IDE Setup

Eclipse Setup

Open Eclipse and import a Maven project (File > Import… > Maven > Existing Maven Projects).

Spring Tool Suite Setup

Open Spring Tool Suite and import a Maven project (File > Import… > Maven > Existing Maven Projects).

To Run from within STS:

right click on project and select RunOnServer

To run the DC and/or the TP:

do a maven build and install accordingly. Then the WAR files will be in the right position.

To Start server:

  1. sudo /home/bitnami/springsource/vfabric-tc-server-developer-2.9.3.RELEASE/base-instance/bin/tcruntime-ctl.sh start

To Stop server:

  1. sudo /home/bitnami/springsource/vfabric-tc-server-developer-2.9.3.RELEASE/base-instance/bin/tcruntime-ctl.sh stop

IntelliJ Setup

Open IntelliJ and open the project (File > Open…).

Testing

Unit Tests

To run all Unit tests:

  1. mvn test

Run a single test class:

  1. mvn -Dtest=<TestClassName> test
  2. mvn -Dtest=HomeControllerTests test

Run a single test in a single class:

  1. mvn -Dtest=<TestClassName>#<testMethodName> testMethodName
  2. mvn -Dtest=HomeControllerTests#index_whenNotLoggedIn_displaysHomeView test

Cucumber Features

To run all Cucumber features:

  1. mvn verify