Skip navigation
2011

…or any other DropBox enabled tablet...

 

I was trying to locate a Git client for iOS to allow easy editing of OpenShift repositories from my iPad but did not manage to find anything but some barebone github viewers.

 

Instead I started playing around with Hazel, DropBox, OpenShift and my iPad and I managed to create a little “Cloud IDE” to enable editing and deployment to OpenShift from my iPad.

 

openshiftonipad.png

 

Note, I use Hazel and an iPad in this blog which unfortunately makes it Mac/OSX specific but you should be able to do this on any OS and tablet as long as you have something similar to Hazel that can execute commands based on changes to a directory and your tablet have an DropBox enabled editor. If you have such a setup on a another OS/tablet combo I would love to hear about it in the comments.

 

Finally, in this blog I assume you already have git installed to be used from your machine. How you setup your OpenShift application, wether with JBoss Tools or command line clients is not relevant for this usecase - only necessary to have git working for this.

Once you have that the remaining steps are as follows:

Setup DropBox

Download and install DropBox - this link is a reference link and both you and I get 250 MB extra bonus space if you are creating a new DropBox account.

 

DropBox should be installed on a machine that is “always” online or at least while you want edits done on your iPad to take effect.

Then git clone your favorite OpenShift application into a sub-directory within your DropBox, i.e. here is what I did to get my app named super into code on my DropBox:

cd ~/DropBox/code
git clone ssh://yourprivateid@super-man.rhcloud.com/~/git/super.git/

If you do not know your git URL you can use rhc-user-info to find it.

 

Once you have the content on DropBox verify that it is possible to deploy to OpenShift from the machine. Edit a file and execute

git commit -a -m "1-2-3 testing"
git push origin

If that completes without errors your DropBox machine is ready to run.

Setup Hazel

Download Hazel on the same machine as you have DropBox setup and running on and add a rule that looks like the following for the directory where you want the script to be executed:

 

hazel_codeexec.png

 

The conditions are:

  • Extension is sh
  • “Date Last Modified” “is after” “Date Last Matched”

 

and when it finds a file matching these criteria then setup an action that does the following:

 

“Run Shell Script ”embedded Script":

touch $1.running
sh $1 &> $1.log
rm $1.running
touch $1.log
exit 0

 

The Hazel rule is straight forward. It executes any updated .sh files on the machine and in the process it creates a temporary ‘.running’ marker file to let you know it process is running and then pipe all the log output to a .log file and finally exit with status 0 since the actual script could fail but that should not be treated by Hazel as an error.

Add ‘short-cut’ scripts

To avoid too much annoying typing on your tablet I suggest you create a commitpublish.sh with the steps necessary to do a commit and push for your OpenShift application.

 

For my super app I created a commitpublish.sh with the following content:

cd super
git commit -a -m "Committing via DropBox"
git push origin

You can also add other useful shortcuts such as an status.sh that gives you latest log for your app:

 

rhc-ctl-app  -c status -a super -p <yourpassword>

Edit & Deploy via iPad

For the actual editing and deployment you should be able to use any DropBox enabled editor such as DropText, PlainText, etc. but I ended up using Koder since it was the only one I could find that had nice syntax highlighting and a good and fully functional DropBox integration.

 

Once you have configured a DropBox project in Koder you cans simply edit the content.

 

editindexxhtml.png

 

Once you are ready to publish it to OpenShift simply edit the commitpublish.sh file and make sure to Upload the file to DropBox and Hazel will take action and get it published.

editcommitpublish.png

 

Once the command and publish have completed you should be able to refresh in Koder and see a ‘commitpublish.sh.log’ file with the output.

 

checklog.png

 

If it completed succesfully you should now be able to see the result in a browser for your OpenShift application.

 

resultinbrowser.png

 

Have fun and do leave a comment if it works out for you or if you got an alternative for the above.

 

Happy New Year!

Just in time for the holidays I'm happy to let you know JBoss Tools 3.3 M5 is available for download.

http://in.relation.to/service/File/10824

3.3 M5

[Download] [Update Site] [What's New] [Forums] [JIRA] [Twitter]

 

JBoss Tools is a set of plugins for Eclipse that complements, enhances and goes beyond the support that exist for JBoss and related technologies in the default Eclipse distribution.

 

We were planning on this being named Beta, but for this release we got many new features which we thought deserved a (hopefully) final milestone. The new features are JBoss AS 7.1.x support, OpenShift Cartridges, Mobile Browser Simulator, Experimental Hibernate multi-version support, an updated JBoss Central with easy installation of 3rd party plugins and more!

 

Installation

 

As always, get and install Eclipse 3.7.1 (Indigo) JEE bundle - with the 3.7.1 JEE bundle you get majority of the dependencies preinstalled.

 

Once you have installed Eclipse, you either find us on Eclipse Marketplace under "JBoss Tools (Indigo)" or use our update site directly.

 

The update site URL to use from Help > Install New Software... is:

 

http://download.jboss.org/jbosstools/updates/development/indigo/


JBoss AS 7.1.x Support

Now both AS 7.0 and AS 7.1 is now supported. We include the AS 7.1.b1 client libraries and the AS team just verified their just released AS 7.1.CR1 is compatible and working with this release.

 

I'm especially proud of the AS team's ingenious approach to having AS7 out-of-the-box being secured and locked-down for remote access but still allowing easy developer use of an local AS7. This allows tools like JBoss Tools, Maven, Arquillian etc. running locally under the same user as AS 7 to work seamless without additional security credentials setup - it just works

 

OpenShift

You can now use existing WTP projects when setting up an OpenShift Express Application - making it easier to go from local development and then later into the OpenShift PaaS. How this works is demo'ed in the following screencast:

 

 

We also added support for managing OpenShift cartridges which allows you to easily add things like mysql, mysqladmin, mongo and Jenkins support to your application.

 

http://docs.jboss.org/tools/whatsnew/openshift/images/embed-cartridge.png

You can now also get easy access to log files via the new "Show In > Remote Console" available in the context menu of the server adapter.

 

Finally we adjusted the OpenShift server adapter to be independent of an AS7 runtime, meaning you can use the server adapter without even installing AS7 locally.

 

Note: This change does make it necessary to remove M4 server adapters and add a new one since it required an incompatible change in the server adapter metadata. 

 

JBoss Central

In M4 we introduced JBoss Central, a "hub" for getting easy access to tutorials, 3rd party plugins and news related to JBoss technology.

Project Wizards

In M5 we are adding a set of Project Wizards to JBoss Central which makes it easy to get started with Java EE, HTML5, Richfaces and Spring MVC all tested and working on AS 7 based servers. Furthermore all the projects are following best practices with respect to using JBoss maven dependencies.

 

http://docs.jboss.org/tools/whatsnew/images/jboss-central-create-projects.png

Note, all of these projects are deployable to OpenShift Express as AS 7 applications out-of-the-box.

 

3rd Party Plugin Installation

We've added a set of often used and now tested and verified 3rd party plugins to JBoss Central for easy installation into an Eclipse running JBoss Tools. The current list of plugins for easy installation are:

 

  • Subclipse (without the notorious issue of having to install additional svn connector plugin)
  • JRebel (currently tested to work with AS 7.0)
  • Google GWT Plugin (their license now allows open redistribution)
  • FindBugs
  • PMD
  • SpringIDE
  • TestNG

Mobile Browser Simulator

We've added a browser simulator to allow for easy and basic testing of your application layout when running in a mobile browser.

http://docs.jboss.org/tools/whatsnew/vpe/images/3.3.0.M5/9539.png

Hibernate Multi-Version

Hibernate Tools now support both Hibernate 3.5 and Hibernate 4.0.

http://docs.jboss.org/tools/whatsnew/hibernate/images/console_configuration_hibernate_version.png

Please be aware that this feature is still experimental and not all parts of Hibernate Tools works

smoothly with Hibernate 4. Code generation and query execution should though work

for basic cases. We will be working on this heavily through January thus you should see fast improvements on this area in the nightly builds

getting closer to beta.

 

If you do bump into bugs please let us know in forum or jira making sure we know about your specific Hibernate configuration that is causing problems and can help expaned the list of supported Hibernate 4 setups.

 

And more...

When we return in January I and others will be going into more details about the various many new and awesome features JBoss Tools 3.3.0 has to offer, until then there are additional screenshot and features to browse over at What's New & Noteworthy

 

Leave a comment to let us know what you think!

 

Happy holidays and as always,

Have fun!

The JBoss Central editor includes several quickstarts that provide a quick run-through of Java EE 6 features.

The quickstarts are based on amazing Pete Muir's JBoss AS7 quickstarts - JBoss AS 7.0 - Getting Started Developing Applications Guide

and are adapted to work with Eclipse/JBoss Tools.

This blog guides you how to install JBoss Tools 3.3 and start work with Java EE 6 using these tutorials.

 

Installing JBoss Tools 3.3

 

In order to install JBoss Tools 3.3, you need to perform the following steps:

  • install Eclipse Java EE IDE for Web Developers

      Download the appropriate archive for your OS, unpack it and start Eclipse.  

  •   Call Help>Install New Software..., click the Add button and enter the following update site:

  http://download.jboss.org/jbosstools/updates/development/indigo/

jeeblog1.png

 

  • select the Abridged JBoss Tools 3.3 category

    jeeblog2.png

      Click Next, Next, check "I accept the terms of the license agreements" and click Finish.

 

  • Wait for Eclipse to download and install the JBoss Tools 3.3.  
  • Restart Eclipse when required.   

 

You have installed JBoss Tools 3.3.

 

JBoss Quickstarts (JBoss Central)

 

After Eclipse restarts, you will get the JBoss Central editor.

jeeblog3.png

Expand the JBoss Quickstart widget in the Project Examples section

 

jeeblog4.png

The helloworld, numberguess, login and kitchensink quickstarts will guide you through creating a Java EE 6 application.

Here I will describe to you how to create the helloworld application.  The rest of the applications are used in a similar way, but they introduce new concepts as shown in the following figures:

jeeblog5.png

jeeblog6.png

jeeblog7.png

jeeblog8.png

The HTML5 is a template project that doesn't include any cheat sheet.

jeeblogX.png

Helloworld quickstart

 

In order to create the helloworld Java EE 6 application, you have to do the following:

 

  1. click the Helloworld project example in the JBoss Central editor

    jeeblog9.png

  2. JBoss Tools will warn you that you have to install JBoss AS 7.0 or 7.1 in order to create, deploy and run this application.
    If you have already installed and configured JBoss AS 7.x, you won't see any requirement and will be able to skip to the step 3.             

       

    • If you have already downloaded JBoss AS 7.x, you will be able to configure it using the Install button.

      jeeblog10.png

      Add the directory where you downloaded your JBoss AS and JBoss Tools will configure a JBoss AS 7.x server for you.

       

    • If you don't have any JBoss AS 7.x server, click the Download and Install... button and JBoss Tools will, for you, download JBoss AS 7.0.2

       

      jeeblog11.png

      jeeblog12.png

       

  3. When the JBoss AS is installed and configured, you will get the following dialog:

    jeeblog13.png

    Click the Start button.

    The jboss-as-helloworld project will be imported and you will get the helloworld cheat sheet that will help you to review the application.

    jeeblog14.png

    jeeblog15.png

    Read the introduction to learn how the application works and click Click to Begin.

    The following screen will appear:

    jeeblog16.png

    After reading a detailed description, click Click when complete.

    jeeblog17.png

    The HelloWorldServlet.java section explains the HelloWorld servlet in detail.  When clicking the action, the cheat sheet will open the appropriate section of the code.

    jeeblog18.png

    Run or skip all the actions in the HelloWorldServlet.java section. You will get the HelloService.java section.

    jeeblog19.png

    Click Click to perform. The following screen will show up:

    jeeblog20.png

    That's it. You are ready to deploy and run the application on the JBoss AS 7 server you previously installed and configured.
    Click Click to perform

    jeeblog21.png

    Click Next

    jeeblog22.png

    Finally, click the Finish button.

    The cheat sheet will start the server, deploy the application and open it in a browser.

    jeeblog23.png

     

In a similar way, you will be able to create and review the numberguess, login and kitchensink applications. Kitchensink is an especially interesting application. In addition to explaining many Java EE 6 features (CDI, JSF, EJB, JTA, Bean Validation, JAX-RS, Arquillian), it automatically runs an Arquillian test and enables you to create your starting project.
Some advanced Java EE developers might also be interested in reviewing this application.

jeeblog24.png

Filter Blog

By date:
By tag: