Code Monkey home page Code Monkey logo

liferay-blade-tools's Introduction

Blade Tools

Build Status Gitter

Blade Tools is a set of modular developer tools for building Liferay 7.0 modules built with OSGi.

Install

Right now the only installable tool is the blade CLI tool that provides a few commands. It can be installed using the following:

Install Blade (Mac, Linux)

$ curl https://raw.githubusercontent.com/gamerson/liferay-blade-tools/master/installers/global | sudo sh

OR

Install JPM (Windows) then Install blade

Visit the JPM4J [Windows installation](https://www.jpm4j.org/#!/md/windows) setup guide.
$ jpm install -f https://liferay-test-01.ci.cloudbees.com/job/blade.tools/lastSuccessfulBuild/artifact/com.liferay.blade.cli/generated/com.liferay.blade.cli.jar

How to build blade cli jar from sources

Clone this repo, and then from the command line execute following command:

$ ./gradlew clean build -x check

Install Blade Tools jar using JPM

Install from downloaded jar from above.

$ (sudo) jpm install -fl <downloads_dir>/com.liferay.blade.cli.jar

OR Install from newly built jar if you buildt from source.

$ (sudo) jpm install -fl com.liferay.blade.cli/generated/com.liferay.blade.cli.jar

Now you should have the blade executable in your path. Try it by running:

blade

Usage

Once you have the blade cli installed you can see the list of commands just type

blade

Or java -jar com.liferay.blade.cli.jar if not using JPM.

Current available commands

Create

The Create command allows you to create new Liferay 7 module projects based on gradle.

$ blade create mvcportlet helloworld 

This will create a new helloworld portlet module project that contains an OSGi component built by a gradle script. To see all the options of the create command just run $blade create -h for all options.

Deploy

First, start Liferay 7 Portal, once it is running you can build your Liferay 7 module and deploy it

helloworld $ gradle build
helloworld $ blade deploy build/libs/helloworld-1.0.jar

Shell

Liferay 7 has a built-in gogo shell that can be accessed with telnet client on port 11311. However, many times you just wish to be able to run a gogo command remotely from the cmdline and return the results directly to the console. Use the blade sh to do just that.

$ blade sh <gogo-command>

Some examples:

List all bundles running in the framework.

$ blade sh lb

Search for all services that provide javax.portlet.Portlet

$ blade sh services | grep javax.portlet.Portlet

Agent

When the blade tool executes gogo shell commands using the blade sh <gogo-command> it needs to connect to a remote agent running in the module framework. To install the agent into Liferay 7 execute this command:

$ blade agent install

If this command fails it will prompt you for what additional information you need to specify in order to install the remote agent.

Release

Blade Tools is continuously built and released on CloudBees.

Built on DEV@cloud

License

All source to this project is available under Apache 2.0 License

liferay-blade-tools's People

Contributors

andywu2015 avatar david-truong avatar denissignoretto avatar gamerson avatar jrao avatar lovettli avatar

Watchers

 avatar  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.