The Eclipse ServiceStage Plugin provides simple integration with Huawei Cloud's ServiceStage service for application developers.
A pre-built ServiceStage plugin jar can be found under the servicestage-eclipse-plugin/plugins
folder. If you would like to build the plugin from the ServiceStage plugin source code, see Build to first build and obtain the plugin jar file.
At this moment, the plugin must be installed manually. Once you have the ServiceStage plugin jar, place it in ${ECLIPSE_INSTALLATION}/dropins
. For example, if Eclipse is install in /eclipse
on your system, then place the plugin jar inside /eclipse/dropins
. Then restart Eclipse to pickup the changes.
Note: you may use the right-click context menu, tool bar or the main menu to perform the Configure, Deploy, and Status actions. Deploy will only be visible when a java war/jar file or a Node.js project are selected.
Configure ServiceStage Preferences (Window > Preferences > ServiceStage
)
The page also provides a Reset Token
button, if you are having issues later, it may help to reset the token.
Now you can create your own application projects, each project in your workspace will have a different set of ServiceStage settings associated with it. These settings will be stored in servicestage.xml
at the project root. Note: this plugin currently supports tomcat WAR file, Java Jar package and node.js or PHP applications.
ServiceStage > Configure
servicestage.xml
file will be created/updatedOnce your preferences and application information have been configured, you are ready to deploy your war file.
ServiceStage > Deploy
The deployment process is as follows:
If there is an issue with the deployment at any stage, a dialog appears showing the reason for the failure. You can also view the Error log
view for details.
If you the deployment fails, or the application is deleted from the ServiceStage Web Console, you will need to use a new ID to redeploy the application. This can be done by opening the Configure dialog again, and clicking Reset ID, then Finish.
You can check the status of your application at any time.
ServiceStage > Status
The plugin has a dependency on servicestage-client.jar. A copy of the file has already been included in the ./lib
directory.
If you make changes to the servicestage-java-client
client, it must be built again. Put the servicestage-java-client project in the same parent directory as this plugin project. For example:
workspace
├── com.huawei.cloud.servicestage.eclipse
│ ├── lib
│ └── get-dependencies.sh
└── servicestage-java-client
If your Eclipse workspace running within an Linux environment, you can run get-dependencies.sh
from inside the plugin's project root directory. This will build servicestage-client.jar
and place it under the ./lib
directory.
If your Eclipse workspace running within a Windows environment, you can run the following steps manually to compile and place servicestage-client.jar
:
mvn clean package -DskipTests -DfinalName=servicestage-client
copy .\servicestage-java-client\target\servicestage-client.jar ..\servicestage-eclipse-plugin\lib\
servicestage-eclipse-plugin
and select Exportplugins
directoryFollow the instructions under Build to get started.
Before submitting changes, make sure to format the code correctly, this will make merging code easier.
Import formatter profile:
Window > Preferences > Java > Code Style > Formatter
JavaFormatter.xml
from the project's root directory.Next, right-click on the source packages under the project, e.g. src/main/java
and select Source > Format
.
Apache 2.0. See LICENSE.txt.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.