Skip navigation
1 2 3 4 5 Previous Next

JBoss Tools

71 Posts authored by: maxandersen

The AS 7 team did a phenomal job with AS 7.0.

 

Rewiring and improving the core of the application server, making it a lean mean machine of isolated modules, concurrent loading and all out greatness. On top of that they took in the best of breed components from JBoss.org and other Java middleware communities and created the best Java EE Web Profile compatible server I’ve used.

 

But the team did not stand still - since AS 7.0 they have been working on improving the server and just last week released AS 7.1.

 

Listening to all of the community feedback that have been given, fixing bugs and implementing features that just did not make it into AS 7.0.

 

The next three days I’ll post a blog a day about each of three features which I have had a personal interest in making it into AS 7.1 and the upcoming JBoss Enterprise Application Platform (EAP) 6: Deployable datasources, Developer Friendly Security & Quickstarts Frenzy!

 

AS 7.1 and JBoss Tools M5

But before I do then just let me say that if you are using JBoss Tools 3.3 M5 then it will work with AS 7.1 just fine except for one small caveat.

 

If you open the server editor for a server configured to work with AS 7.1 it will complain about a missing server port. This happens because AS 7.1 introduced using a system property default value instead of a concrete port number in its XML configuration which M5 does not parse correctly. It will thus show an empty field and mark it is an error.

 

failedport.png

The server will happily still start/stop etc. if you are using defaults, but if you don’t like to see the error in the server editor or are using non-default values then to fix this simply uncheck “Automatically Detect” and type in the port value manually (i.e. 9999).

 

fixport.png

 

This glitch is fixed in the nightly builds of JBoss Tools 3.3 Beta1 which we are working on making stable and available anytime soon.

 

Until then, see you tomorrow to hear about Deployable datasources.

Latest OpenShift enabled port-forwarding for your OpenShift applications.

 

This enables you to use a debugger for your JBoss application and it allows you to connect to the database directly and use tools like Eclipse Database Browser instead of only using phpsqlmyadmin.

Of course once you have these things setup in your Eclipse you can use things like reverse engineering and even run your local app against the remote database.

 

It all works by setting up an ssh tunnel that exposes the internal remote ports running on OpenShift servers on your local machine - this does require some manual steps which i'm outlining in this blog

together with how to configure the database setup in Eclipse and how to remote debug JBoss running on OpenShift.

 

In future releases of JBoss Tools we'll be looking at simplifying these steps, but for now here are the fully manual steps.

Setting up port forward

The simplest way to do this is to use the rhc command line tools.

 

Make sure you got the latest version - how to install/update these for various platforms is documented here.

 

Once you have those run rhc-port-forward -a <appname>.

 

I have an app called ‘fonk’ of type ‘jboss-as7’ and with ‘mysql’ cartridge enabled. For such a setup you should see something like this:

rhc-port-forward -a fonk 
Password: 
Checking available ports...

Binding httpd -> 127.1.255.130:8080...
Binding java -> 127.1.255.129:8080...
Binding mysqld -> 127.1.255.129:3306...

Use ctl + c to stop

OSX gotcha

In case you get an error print out similar to this:

bind: Can't assign requested address
channel_setup_fwd_listener: cannot listen to port: 3306
bind: Can't assign requested address
channel_setup_fwd_listener: cannot listen to port: 8080
bind: Can't assign requested address
channel_setup_fwd_listener: cannot listen to port: 8080
Could not request local forwarding.

You are most likely running OS X which unfortunately(?) does not automatically allow you to have all 127.x.x.x IP’s setup with a so called loopback alias.

 

To fix this you need to add such alias manually for each IP you want to connect to.

 

In my case that is 127.1.255.130 and 127.1.255.129 as seen in the first attempt of using rhc-port-forward. These IP’s will be different for each of your app, thus for `fonk’ app I enable loopback aliases by running the following:

sudo ifconfig lo0 alias 127.1.255.130
sudo ifconfig lo0 alias 127.1.255.129

Now when you run rhc-port-forward you should not be seeing any bind: Can't assign requested address. error messages.

 

Note: these alias’es does not survive reboots - if anyone know how to setup global loopback alias or make these persistent between reboots then I would love to hear about that in the comments

Use OpenShift database locally

When port forwarding is enabled you can start using these, for example to setup and connect to MySql database via Eclipse DTP Tools.

 

To do this open the Data Source Explorer:

datasourceexplorer.png

Click on the “New Connection Profile” and choose MySql and give it a name.

newconnectionprofile.png

Click Next and if you do not have an existing driver for MySQL configured you will see an empty list:

emptydriver.png

To add a driver click the + icon and setup a driver:

mysqldrivermissingjar.png

For OpenShift MySQL the 5.1 option is best, and it just needs to be told where the driver is under the “Jar List” tab. Here you click the “Edit JAR/Zip” and point it to your downloaded mysql-connectoer-java-5.1.jar.

editedjarlist.png

Once that is done you just need to fill in the right connection details:

connectiondetails.png

The important part for the connection details is that you set URL to match the pattern:

jdbc:mysql://<forwarded-ip>:3306/<appname>

For my fonk application that would be:

jdbc:mysql://127.1.255.129.3306/fonk

And then set “User Name” to admin and type in your MySql password.

You can use the “Test Connection” button to verify you can connect.

When you press Finish you should be able to browse your remote mysql database hosted on OpenShift:

datasourceexplorerconnected.png

From here on out you can now use this Eclipse dataconnection with any plugin that supports such connections. i.e. Hibernate Tools reverse engineering features.

Debug JBoss AS

To enable debug with JBoss we need to add a enable_jpda marker file to .openshift/markers.

This is done by simply executing the following:

cd git/fonk
touch .openshift/markers/enable_jpda
git add .openshit/markers/enable_jpda
git commit -a -m "enable jpda"
[master 6f7197c] enable jpda
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 .openshift/markers/enable_jpda
git push
<openshift remote build output>

Note: you can of course also do this all from within Eclipse via EGit integration if you prefer that.

When this have been enabled you need to start/restart port-forwarding to get it to pick up the java jpda port.

rhc-port-forward -a fonk 
Password: 
Checking available ports...

Binding httpd -> 127.1.255.130:8080...
Binding java -> 127.1.255.129:8080...
Binding java -> 127.1.255.129:8787...
Binding mysqld -> 127.1.255.129:3306...

Use ctl + c to stop

Notice the Binding java -> 127.1.255.129:8787.... line, that is the jpda ip and port you are going to use.

Now to set this up in Eclipse JDT debugger you need to create a ‘Remote Java Application’ under “Debug Configurations”

debugconfigurations.png

And here you select ‘Remote Java Application’ and fill in the connection details:

setupremotedebug.png

The important pieces here are to set Host: to the ip number (in my case 127.1.255.129) and the port wich for JBoss AS on OpenShift is 8787 by default.

 

The Project part is optional, but its useful to point it to the matching Eclipse project which will allow it to find the proper source and let you place breakpoints.

 

Once you press “Debug” it should go and connect to the running server. It might take a while, it is after all going into the Cloud

 

And if you now set breakpoints and use a browser to trigger them you get something like this:

debugjsp.png

This showing the remote debugger hitting the breapoint in a jsp page named snoop.jsp.

 

Conclusion

I hope I showed you how powerful OpenShift’s latest release with port-forwarding is and how (fairly) easy it is to setup once you get the port-forwarding working.

 

Being able to connect directly to the remote database and debug you JBoss server makes for a whole new world of possibilities and productivity boost with OpenShift.

 

Hope you like it and continues to have fun exploring OpenShift and JBoss Tools.

 

/max

While everyone except me is having fun at JUDCon in India I thought it would be nice to let you know that there will be a few talks done by us/related to JBoss Tools in the near future elsewhere.

 

FOSDEM - 4-5. February, 2012, Brussels, Belgium

http://fosdem.org/2012/sites/all/themes/fosdem/images/logofosdem2.jpg

 

First up is FOSDEM in Brussels where there is a whole jboss.org DevRoom track of great talks, especially:

 

"JBoss Forge / Arquillian: Two Missing Links in Enterprise Java Development" by Koen Aers on Saturday, 4th February 2012 at 15:00.

 

Expect Koen to do show magic with his Forge Tooling which makes Forge and Eclipse work for you instead of against you.

 

EclipseCon, 26-29th March, 2012, Richmond Virginia

http://www.eclipsecon.org/2012/sites/all/themes/themes/econ2012/images/logo.png

 

This year EclipseCon is moving from "sunny" California on the west coast to Virginia on the east coast. Looking forward to see how the change of scenery will affect the conference.

 

"What's new in the OSGi Enterprise Release 5.0" by David Bosscheart (Red Hat) and Tim Diekmann (Tibco) on Tuesday, 27th March 2012 at 11:15

 

"Tycho - still good, bad or ugly ?" by Max Rydahl Andersen on Tuesday, 27th March 2012 at 16:15

 

"Ceylon - The language and it's tools" by Max Rydahl Andersen on Thursday, 29th March 2012 at 10:15

 

MOW2012, 18-20th April, 2012, Billund, Denmark

http://mow2012.dk/images/mow2012/images/logo_transparent.png

For the second year Miracle Open World which before was a dominantly "Oracle Database" conference is having tracks that includes other languages and especially Java middelware content. I was there last year and it was awesomely fun, even though very few had realized it was more than a database conference.

 

This year I and a few others from Red Hat will be presenting again so hope more will join in on the fun.

The following are the ones related to JBoss Tools, and titles being self-explanatory:

 

"Ceylon - say more, more clearly" by Max Rydahl Andersen on Thursday, 19th April 2012 at 11:00

 

"Death of the slow: 7 reasons to love AS 7" by Max Rydahl Andersen on Thursday, 19th April 2012 at 15:00

 

"JavaEE on the Cloud with OpenShift Express" by Thomas Heute on Friday, 20th April at 11:00

 

See you out there having fun!

We were quite busy up to the holidays getting JBoss Tools 3 M5 out and as a new year gift we updated our early access site for JBoss Developer Studio with its M5 release.

 

https://community.jboss.org/servlet/JiveServlet/showImage/38-2030-10503/earlyaccess.png

 

JBoss Developer Studio is Red Hat's full fledged Eclipse based IDE which is freely available in its standalone version (i.e. without JBoss Enterprise Application Platform) and

the same goes for this milestone 5 release - it is freely available from http://devstudio.jboss.com/earlyaccess.

 

Noticable changes in JBoss Developer Studio M5 are:

 

Universal Installer

We now provide an universal installer that works on all our supported platforms (and then some). This means you no longer have to consider which of the many OS specific installers we provide. You now just download the universal installer, run it and the installer will figure out which OS you are running and install the OS specific bits as needed.

 

JBoss Central

It is now even easier to get started using Developer Studio with JBoss servers via JBoss Central and if you are interested in latest news JBoss Central will give that too.

 

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

Of course if you do not like it and every startup you can just disable the auto-startup and just open it whenever you wish too via the JBoss icon in the toolbar.

 

You can also use JBoss Central Software/Update page to install additional features and 3rd party plugins such as JRebel, FindBugs, SVN and others.

 

 

OpenShift

You can now create OpenShift applications directly from Developer Studio and get developing with Java EE and other OpenShift technologies in the cloud.

 

 

And more...

We've continued to fix bugs and integrate more of the new features found in JBoss Tools plugin set.

 

You can see more about those here and you can download Developer Studio 5 M5 from here

 

Have fun!

…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!

Yesterday JBoss AS team released JBoss AS 7.1 Beta1 - the best release ever with some great stuff and an out-of-the-box secured server.

 

Note:

Since this blog post was written a new version of AS 7.1 and JBoss Tools have been released which works out-of-the-box.

See details at http://community.jboss.org/community/tools/blog/2011/12/23/jboss-tools-m5-is-coming-to-town

 

We knew that the out-of-the-box secured server would require changes to JBoss Tools to handle it, but it also turns out there is an unforseen incompatibility between the AS 7.1 Beta1 and AS 7.0 Final client jars that we use to talk to the AS server.

 

Thus if you use JBoss AS 7.1 Beta1 with JBoss Tools and start it up without changing anything you will see errors similar to this in the console output of the server:

 

19:40:43,780 ERROR [org.jboss.remoting.remote] (Remoting "greybeard:MANAGEMENT" read-1) JBREM000200: Remote connection failed: java.io.IOException: JBREM000201: Received invalid message on Remoting connection 64726693 to /127.0.0.1:62248
19:40:43,895 ERROR [org.jboss.remoting.remote] (Remoting "greybeard:MANAGEMENT" read-1) JBREM000200: Remote connection failed: java.io.IOException: JBREM000201: Received invalid message on Remoting connection 69123787 to /127.0.0.1:62249
19:40:44,006 ERROR [org.jboss.remoting.remote] (Remoting "greybeard:MANAGEMENT" read-1) JBREM000200: Remote connection failed: java.io.IOException: JBREM000201: Received invalid message on Remoting connection 190a621a to /127.0.0.1:62250

 

These are caused from the server seeing our "ping" to the server trying to get an answer to if the server is ready and launched but because of the incompatiblity bug it is resulting in these errors instead.

 

Eventually JBoss Tools will give up and report an error about the server startup not being detected.

 

To avoid seeing these errors and to be able to work with the server even though you secure it, there is a workaround for JBoss Tools.

 

You simply need to change the "Startup Poller" from "JBoss 7 Manager Service" to use "Web Port" instead and disable the Automatic detection of the management port. The details on that is described below.

 

How to workaround AS 7.1 not being recognized

 

In the "Servers" view double click on the server and it should open up the server editor:

 

Note that since JBoss Tools only know about "JBoss 7.0" that is what the default server will be called if you haven't typed in something else.

 

jbossas7_1oob.png

In here are the settings that need to be changed.

 

  1. Change "Startup Poller" to "Web Port"
  2. Remove the checkmark from "Automatically detect" under "Server Ports/Management"
  3. Type in '9999' into the Management field.
  4. Save (Ctrl+S) the configuration

 

Once you have done that it should look something like this:

 

as7_1_fixed.png

 

Now when you start this server we will no longer use the management API to check if the server is running but instead

just check if http://localhost:8080 is available.

 

I'm sorry for the trouble and we are working hard on getting it fixed and supported in next milestone of JBoss Tools.

 

You can monitor JBIDE-10224 to see the progress on the JBoss Tools side.

 

But do try to still Have Fun,

Max

maxandersen

Three Crazy Weeks

Posted by maxandersen Nov 22, 2011

I’ve been on the road two out of the last three weeks, speaking and attending three conferences: JUDCon London, EclipseCon in Ludwigsburg and finally Devoxx in Antwerp.

JUDCon London

At JUDCon I was co-hosting the third live JBoss Asylum Podcast together with Emmanuel Bernard. The topic was “Polyglot JBoss” with Marek Goldmann and Galder Zamarreno as guests talking about how JBoss supports, extends and develop on multiple languages outside just Java.

The recording of this is available on JBoss Asylum site or iTunes.

 

http://1.bp.blogspot.com/-rnnqJg4dzBQ/TrD6Z1ZWqMI/AAAAAAAAGSc/xOl-FFsU7KM/s200/2011-10-31+19.26.23.jpgImage curtesy Eric D. Schabell.

 

After the panel we got a set of lightning talks done by JBossians and external contributors which I had the pleasure of moderating. Was great fun.

I did the first lightning talk about how you make your examples for your framework/distribution the most accessible to users. Not everyone liked the conclusion, but I got good feedback on the content, thus I re-recorded the audio for this talk.

 

I’ve made the slides available together with the audio on JBoss Tools Vimeo group.

 

 

If  you just want the the slides you can get those from my SlideShare

 

At JUDCon I spent most of my time talking with attendees and colleagoues, but also did find time to attend a few talks. One of those stood out, namely “Hibernate Puzzlers” by Patrycja from @yonlabs. She presented a set of puzzlers and even though I knew all the issues she was presenting on, her puzzlers did caught me being unsure what the right answer was. Well worth watching if you get a chance.

 

EclipseCon

At Eclipsecon Europe they were celebrating it was 10 years since the first release of Eclipse the IDE. I unfortunately missed out on the party and cake since I was sure the celebration would be on the Thursday not Wednesday. Instead I spent that evening having early dinner with Fred Bricon and then we went separate ways to prepare for our talks the next day.

 

Fred did his first public presentation for Red Hat called “Workaround Driven Development: How Maven integrates with Eclipse WTP”. He covered how the m2e-wtp project makes Maven usable in context of Eclipse WTP projects and how it was technically done by bridging Eclipse and Maven’s two different worldviews on projects.

 

All during EclipseCon we got very good feedback from users of m2e-wtp and how it was the piece they were missing to actually be productive within their work on enterprise projects - always good to hear we and especially Fred's work are making a difference.

 

My talk was about the experiences we’ve done with the move to Tycho on the JBoss Tools project. It was hard to boil it down to a 20 minutes presentation but I think I succeded.

 

If you want to see and hear the presentation it is available from EclipseCon’s audio/video recordings under: Tycho - The good, the bad and the ugly

 

http://content.screencast.com/users/max.rydahl.andersen/folders/Jing/media/3e93a526-1828-4b5b-82eb-f68706cce976/00000374.png

 

 

Devoxx

Devoxx also had its 10th anniversary in Antwerp and I had the pleasure to attend and speak again this year. This year with a quickie  on how to “Deploy Java EE Applications to OpenShift”. I also got to reveal the news and do a demo of the new Jenkins support on OpenShift. 

 

https://lh6.googleusercontent.com/-eEBJLVkZcNQ/TsreV-JMRWI/AAAAAAAABPQ/rHSCovQS5mY/s720/DSC_2591.JPG

All in all a good talk but I don’t have a recording of this talk but the OpenShift team released a video covering similar content.

 

 

“Deploying Java Apps to the Cloud with the OpenShift Eclipse Plug-in”

They even made a cartoon over the whole OpenShift release including JBoss Tools called “A Comprehensive Lifecycle for Java Developers in the Cloud with OpenShift

 


 

Devoxx is also the conference in Europe where I get to meet up with many of the JBoss folks speaking there and this year was no exception. What was exceptional this year was though that we had a small booth this year leaving no space for the traditional fussball table. That was no fun. Lincoln, Kabir and I did though find a way have fun since there was beer and helium baloons at the booth:

 

 

AS7 is lightweight and superfast

 

 

Beyond having fun with helium I was also happy to hear that Google finally announced their opensourcing of their GWT Eclipse plugin tools. You can read my thoughts on that in my previous blog entry.

 

The most work was though on helping getting the Ceylon website and Eclipse updatesite ready for the planned launch at the end of Emmanuel Bernard and Stephan’s talk about Ceylon.

 

That turned out to be quite tricky despite Devoxx wifi being the best ever, but we made it through and now everyone can try out David Festal's Ceylon IDE by following the instructions on ceylon-lang.org

 

Pierre-Antoine Gregorie snapped a photo of us hacking away on getting the site in shape:

Hacking on Ceylon

 

All in all three very busy weeks and I here I’m not even covering all the other work that went on, but I’ll hopefully be able to write about the end-results of that in the upcoming weeks and months.

 

Until then, Have fun!

Google today announced they are making “Google Plugin for Eclipse” and "GWT Designer" fully open source and available under the Eclipse Public license.

 

We have many developers using Google’s Eclipse plugin to develop GWT-based applications targeting the JBoss Application Server.

 

With the open sourcing of the plugin we are looking forward to working even more closely with the Google team and the rest of the community on making the developer experience even more productive and an integrated part of Eclipse platform.

 

We are especially interested in seeing the Google Eclipse plugins being able to target multiple runtimes such as the JBoss Enterprise Application Platform and Google App Engine in a uniform way, working more seamlessly with standards-based tools and frameworks.

 

This targeting of multiple runtimes will also help users of JBoss AS, Glassfish, Tomcat and any other server that provides an Eclipse Web Tools compatible server adapter.

JBoss Tools GWT Integration

 

JBoss Tools already provide integration with the previous release of GPE via our experimental JBoss GWT Integration.

 

Our experimental plugin allows you to easily use the Eclipse standard web wizards and projects instead of the Google specific wizards to create and deploy projects.

 

One of the reasons we marked this integration “experimental” was because opposite to what many believe large parts of Google’s plugins for Eclipse was not open sourced. That made the implementation dependent on non-public API and to use it you needed the GPE GWT plugins that was not possible to distribute freely.

 

Those concerns were the reasons I’ve been urging Google to make the GWT plugins open source so we and users could actually distribute and use the plugins freely and at the same time we could start contributing fixes and features and not just bugreports.

 

In the end this should allow for much more stable and uniform user experience. This goes not only for JBoss Tools plugins integration, but for integration across the Eclipse ecosystem such as Eclipse Web Tools Project and m2eclipse.

 

Some of the issues we had, have been fixed in GPE 2.0. Now with Google open sourcing their plugin we and others can help contribute and fix the remaining issues and implement enhancements to make easy usage of Google GWT across multiple platforms from Eclipse a reality.

 

None of this of course happen automatically but the open sourcing of the Google plugins definitely make it much easier and I look forward to see and support the work around these plugins.

 

Thank you Google - now let’s go and have Fun

Shift Happens in the last planned milestone of JBoss Tools 3.3. Read on for more...

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

3.3 M4 (Shift Happens)

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

 

This time around we are adding in a central hub for users called JBoss Central, support for OpenShift, some OSGi magic, Runtime downloads and more...

 

Installation

 

As always, get and install Eclipse 3.7 (Indigo) JEE bundle - with the JEE bundle you get majority of the dependencies letting you save bandwidth:

 

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

 

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

 

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


JBoss Central

First time you install JBoss Tools M4 you will be greeted with what we've named JBoss Central. JBoss Central is a hub for getting easy access to Project Wizards, Examples, jboss.org news and additional Eclipse plugin installation.

 

http://docs.jboss.org/tools/whatsnew/images/jbosscentraleditor.png

 

It will show up on every startup by default which if you don't want it can be disabled in preferences. The editor will also show up when there are new updates to JBoss Tools plugins installed.

 

If you want to open central later you can find it under Help > JBoss Central.

 

OpenShift Express

OpenShift Express by Red Hat provides free, auto-scaling platform-as-a-service for Java, Ruby, PHP, Perl and Python applications. Until now to use it you've had to use command line tools like git and rhc-* commands; with JBoss Tools support for OpenShift you can do all of the hard work in the comfort of Eclipse.

 

To get started use the OpenShift Express Application Wizard available from File > New > OpenShift.

 

http://docs.jboss.org/tools/whatsnew/openshift/images/applications.png

 

If you are a new user the wizard will walk you through the needed steps to setup an account, create domain and create applications.

If you are an existing user with existing applications it will allow you to log in, choose an application and import the project into Eclipse and in case of it being a JBoss 7 type application we will even setup a server for you in Eclipse server view that allows you to easily publish directly to OpenShift.

 

This publish is just a Git commit & push which you can also do from command line or manually via eGit in Eclipse - but with the server adapter integration you get a simple and easy way of doing it without having to deal with git manually.

 

Materialize Library

Eclipse likes to encapsulate jar library access in Classpath Container's and sometimes these classpath containers are great to begin with but for various reasons you might want to decouple your Eclipse projects from the plugin providing the classpath container or maybe you've used one of the great Project Examples or quickstarts we provide via JBoss Central but you don't want to use Maven to manage your libraries/build then this feature also comes handy.

 

We've added an experimental feature named "Materialize Library" which is available in the context menu of classpath containers in Eclipse.

 

http://docs.jboss.org/tools/whatsnew/core/images/materialize-lib-context-menu.png

 

Once you click that JBoss Tools will present you with a dialog asking where to put the libraries and once you press Ok your project will no longer be dependent on the classpath container, but instead have a copy of the jars and all configured as it was inside Java Build path still; allowing you to more easy build and migrate your project to another setup if need be.

 

 

Richfaces 4

We've implemented support in the visual page editor for the new and updated JSF components in Richfaces 4.

 

 

http://docs.jboss.org/tools/whatsnew/vpe/images/3.3.0.M4/8950.png

 

CDI & Seam Solder

The CDI tooling this time around continues to add more quick fixes, improved navigation and adds an "Open Named CDI Bean" dialog for easy lookup of named CDI beans.

 

http://docs.jboss.org/tools/whatsnew/cdi/images/3.3.0.M4/openNamed.png

 

It also adds support for the new package naming in Seam 3.1.Beta4 for the Solder and Config modules, while still maintaing support for previous Seam 3 releases.

 

Forge in Color

Forge console now has better editing, is now using color rendering and is made easily available with the new Ctrl+4 (or Cmd+4 on OSX) shortcut.

 

forge-tools.png

 

JBoss OSGi

The JBoss adapter now supports dragging Eclipse PDE (OSGi) projects to the server and it will use the default PDE export to create and bundle the archive.

 

Runtime downloads

JBoss Tools now provide easy access to download runtimes such as JBoss AS and Seam (more to be added in the future).

This feature are directly available from JBoss Tools Runtime Detection preference page.

 

http://docs.jboss.org/tools/whatsnew/as/images/runtimedownload1.png

or via use of Project Examples that requires a runtime.

http://docs.jboss.org/tools/whatsnew/images/jbosscentraldownloadas.png

 

The downloaded runtimes will be installed in a directory of your choosing and will be configured to be ready for use within Eclipse/JBoss Tools.

 

And more...

There are additional screenshot and features to browse over at What's New & Noteworthy

 

This is our last planned milestone, beta is next thus its time to make your voice heard and speak up if there are features that aren't giving you what you need.

 

Leave a comment to let us know!

 

And as always,

Have fun!

European conference season is about to start and I and others will be out and about talking about JBoss Tools and Friends the upcoming weeks/months. Here is an excerpt of those I'll be giving or attending:

 

Switzerland - Puzzle event & Neuchatel JBUG

Tuesday, 18th October at Puzzle Tech Talk 2011, I'll be giving a short introduction on the various flavors of Red Hat OpenShift.

 

Wednesday, 19th October at JBUG Neuchatel, Thomas Heute and I will be giving a more detailed look into using OpenShift Express for scripting languages and especially Java EE development on top of JBoss AS 7.

 

JUDCon, London

Monday, 31st October I get the pleasure to attend my first European JUDCon where I'll be taking the stage a few times:

 

14:30-15:15 - Making Examples accessible - talking about the rare subject on how you make your projects examples easy to use and install from both command line and IDE's. Cancelled.

 

19:00-20:00 - Emmanuel Bernard and I will host a live JBoss Community Asylum podcast from JUDCon inviting speakers and community members on stage to answer questions from the hosts and audience.

 

20:00-?? - Lightning talk showing five approaches to deploy to JBoss AS 7 in five minutes.

 

Do not forget to Register for JUDCon !

 

EclipseCon, Ludwigsburg

This year EclipseCon Europe will be celebrating 10 year annivesary of Eclipse and we'll have two talks there on Thursday, 3rd November.

 

11:30-12:00 Fred Bricon will be giving his Workaround Driven Development : How Maven integrates with Eclipse WTP talk where he will show m2e-wtp and talk about the challenges making it happen within the boundaries of Eclipse WTP.

 

15:30-16:00 I'm presenting on the Good, Bad and Ugly sides of using Tycho for building Eclipse plugins.

 

Devoxx, Antwerp

My favorite conference in Europe - primarily because of its awesome venue but also that I get to meet up with a large bunch of JBoss colleagues and community members.

 

Tuesday, 15th November at 13:00-13:15 I'm doing a Quickie talk covering how to Deploy JEE applications to OpenShift

 

You'll also find me hanging out/talking at the BOF's concerning JBoss technology: CDI, what comes next, JBoss Application Server 7 and Seam Gathering.

 

See you there!

For those interesting in stalking conference speakers and events I recommend checking out Lanyrd.com, been using it extensively to be able to write the above pretty fast You can see my lanyrd schedule here.

 

See you out there!

It's time for a new fresh milestone update of JBoss Tools:

grease_jboss_tools.png

3.3 M3 (Greased Lightning)

[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. For this release we continue to move Maven, CDI, Java EE support forward and also add in a few new "surprise" features.

Installation

 

As always, get and install Eclipse 3.7 (Indigo) JEE bundle - with the JEE bundle you majority of the dependencies letting you save bandwidth:

 

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

 

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

 

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


Maven Profile Selection

In this release we've therefore included an UI which allows you to easily set/change the profiles on single and multiple projects.

 

This is especially something that becomes useful when you use Arquillian where it is a common practice to use Maven profiles to toggle the various dependency sets for each server you wish to test against.

 

It works by you selecting the relevant project(s), press Ctrl+Alt+P or use Maven > Select Maven Profiles... and a dialog box appears allowing you to enable/disable the available profiles for the project(s):

 

maven-profile-selection-single-project.jpg

 

Easier Remote Debugging

Ever been tired of having to manually configure ports, projects and source path lookups for debugging on Remote Applications in Eclipse ?

 

We are, especially after we learned that JVM's running on Hotspot provides API to discover such applications and allow for easy configuration of your debugger. In this release we've thus added a command available from Debug As... > Remote Java Application... in the context menu on any set of resources.

 

Once you select this command, we use the Hotspot API to discover the remote running applications, allows you to select which you application want to connect to and then we do the tedious work of configuring the ports, names and source code lookups (including maven dependencies if applicable) for your Remote debugging.

 

remote-debugging2.png

No need for manual tweaking anymore.

 

Thanks to Aslak Knutsen for bringing us the idea and initial code to make this happen!

 

Running Server Detection

The server adapters now attempt to detect if a server is already running to avoid port conflicts and UI inconcistencies. If a server is detected running you are shown a dialog allowing you to choose to either have the server adapter assume it is already running or force the launch anyway.

 

server-already-running.png

CDI & Seam Solder

The CDI tooling adds a bunch of quickfixes to have JBoss Tools fix common issues. To aid in searching and navigating your CDI application, Find References (Ctrl+Shift+G) will now show the full list of injection points and EL usage of your beans and Seam Solder and Config annotations and XML now have easy hyperlink navigation to it's declarations.

@ManagedBean's

The JSF tooling now detects @ManagedBean annotations. This avoids false warnings/errors when importing JSF 2 examples. Do consider using @Named instead for better integration into the JavaEE stack.

 

SAR Projects

For a long time we have been asked about providing support for SAR style projects for use on older versions of JBoss AS. This style of project packaging is now supported both in pure WTP style projects and via Maven.

 

GWT Tools are back

Since last time, Google released their GWT eclipse plugin in a version that supports Eclipse 3.7 allowing us to reenable the GWT Tools.

 

And more...

There are additional bugfixes and more features to browse over at What's New & Noteworthy

 

Like the new features ? Leave a comment to let us know!

 

And by all means,

Have fun!

Versions for large multi-module osgi projects

Recently I went through JBoss Tools main source code base and fixed a few long standing issues that had made it cumbersome to manage versions over the years. This blog tries to explain what we changed, why and how Tycho helped.

Tycho Version Plugin

Maven has it’s own versions plugin but it only takes care of version references in pom.xml, it does not consider osgi/p2 related references. Tycho therefore has it’s own versions plugin.

Unfortunately there aren’t alot of documentation for this plugin, but by poking to Sonatype, follow the tycho mailing list and looking at a few hints out there I managed to get the it working. Here is my attempt to make the world more aware of the Tycho Version plugin.

Usage

The core command for Tycho Versions plugin are executed in your Maven module that represents your plugin/features. The Tycho Version plugin command looks like this:

mvn org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=<version>

 

Here <version> is the version number you want for your plugins, i.e. 1.2.3.GA. If you use 1.2.3-SNAPSHOT the plugin will use 1.2.3.qualifier in the places necessary (i.e. in manifest.mf and feature.xml).

 

The beauty of this plugin is that with a single command you can update your plugin, features, product and updatesite references.

 

No manual tweaking required, except that to use it effectively your pom.xml’s should follow a few maven conventions.

 

That last part is what kept us in JBoss Tools to use this command until recently.

 

Why you ask ? Well, read on…

Maven Parent/Child relationships

The reason we couldn’t use the tycho version plugin previously was that we had the following layout for each of our modules: 

 

modules_before_reorg.png

Each top level module has a set of submodules: plugins, tests, features and site (there are also a doc module but that is for another blog).

 

Each of these submodules can have children, for plugins that are all the individual plugins the main feature will include, tests are the plugin tests and so forth.

 

That parent represents the parent pom where the shared build configuration for JBoss Tools is stored - we use that to avoid repeating the build instructions in all 350+ buildable units.

 

But there is a big problem with this structure.

 

First of each artifact have a manual maintained version section, but do you notice all those thick red outlined lines going to the Parent from each leaf plugin, feature, etc. ?

 

Those red lines illustrates that each child leaf point directly to the main parent pom which makes it possible to have the build configuration in one central place but it also means that everytime we update the parent pom version we have to change it in each and every node (for us that is 605 locations).

 

It also have the consequence that even though we have this nice modular division of each module into tests and plugins there is not a place to store module or submodule specific settings for our builds - that all have to take place in each leaf plugin instead of being just stated in one place.

 

Thus to make this sharing easier and to make it more explicit what structure is actually being versioned with the Tycho module Denis Golovin and I did a few pom refactorings.

 

modules_after_reorg.png

Notice the difference ?

 

Each “sub-node” now uses their actual structural relative parent as the pom parent (red lines) and only the top level module actually points back to the main JBoss Tools parent module (blue line).

 

This has the following positive features:

  • you can stand in the root of a module and run mvn clean install and it will build the whole module
  • you can override/customize a build locally for a module or submodule
  • maven tycho version plugin will be able to easily version this module on its own

 

The last optimization I did lately was that now that we have this natural structure between parent and child setup we can remove the child modules redundant version info from the pom.xml’s. We unfortunately still have to list the full version info for the parent but with the Tycho versions plugin this becomes trivial to maintain.

The Dirty Details

The essentials parts of the structure is as follows (using hibernatetools as reference):

Module pom:

<project ...>
    ...
    <parent>
            <!-- the only reference to root build parent from a module -->
            <groupId>org.jboss.tools</groupId>
            <artifactId>org.jboss.tools.parent.pom</artifactId>
            <version>0.0.2-SNAPSHOT</version>
            <relativePath>../build/parent/pom.xml</relativePath>
    </parent>
    <groupId>org.jboss.tools</groupId>
    <artifactId>hibernatetools</artifactId>
    <name>hibernatetools.all</name>
    <!-- the only place the module version number needs to be in a pom.xml for a module -->
    <version>3.4.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <modules>
            <module>features</module>
            <module>plugins</module>
            <module>tests</module>
            <module>site</module>
   </modules>
</project>

Sub-Module pom:

<project ...>
    ...
    <parent>
            <!-- this section is maintained by the versions plugin --!>
            <groupId>org.jboss.tools</groupId>
            <artifactId>hibernatetools</artifactId>
            <version>3.4.0-SNAPSHOT</version>
    </parent>
    <groupId>org.jboss.tools.hibernatetools</groupId>
    <artifactId>plugins</artifactId>
    <name>hibernatetools.plugins</name>
    <packaging>pom</packaging>
    <modules>
            <module>org.hibernate.eclipse</module>
            <module>org.hibernate.eclipse.console</module>
            ...
</modules>

 

…and finally the actual plugin/feature pom’s:

<project ... >
<modelVersion>4.0.0</modelVersion> 
<parent>
    <groupId>org.jboss.tools.hibernatetools</groupId>
    <artifactId>plugins</artifactId>
    <version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.plugins</groupId>
<artifactId>org.hibernate.eclipse</artifactId> 
<packaging>eclipse-plugin</packaging>

 

Notice how this setup makes the configuration at the plugin level very concise (or at least as concise as Maven allows them to be). Only if your plugin has custom build logic do they need to be different.

Conclusion

With this setup we can now easily customize our builds at a module level and easily bump our versions number across all the osgi/p2 artifacts within the module.

 

Meaning if I use the Tycho versions plugin to bump a module to 3.5.0, by default everything in that module gets bumped to 3.5.0, no matter if they have changed or not.

 

Purists of osgi might claim that is a bad practice and you should only bump the versions of the plugins that actually received changes and in principle I agree with them, but…

 

…JBoss Tools consists of about 202 plugins and 100 features each with their own feature.xml, MANIFEST.MF and when we included Tycho or rather Maven in the mix they also each have a pom.xml.

 

Add in the various updatesites, and other artifacts and just in the main source code tree of JBoss Tools it all adds up to us having at the current time of writing 628 versionable artifacts.

 

That is alot of versions to keep track of and ensure is uptodate.

 

Until now we have been maintaining the versions of these artifacts manually by hand and just as a precaution we (as many others in osgi/p2 land) do our builds with a .qualifier as the last part of the version number. This ensure the version number is always higher than the previous build. If we don’t, then p2 won’t install the newest build.

 

This actually means that if you don’t realize it then you can easily stay on version 1.0.0 for your plugins forever and ever - no users will complain since they can always get the the newest updated version.

 

The problem of being blind to versions of course show up when you start having multiple branches and even more so when you try to build up API plugins and want to ensure you are using the right compatible version - and here relying on the “random” qualifier string becomes unmanagable.

 

With a handful of plugins it’s “easy”, but with 628 artifacts it can become rather chaotic.

 

Thus I’ll argue its better to do it on the module level which reduces the versionable artifacts to 42 in our case - a much more managable number and much simpler to handle and understand for both developer and user IMO.

 

Notice, that if you are in a situation where you need to manually version specific plugins then you simply set the version explicitly for those plugins/features and Tycho versions plugin will not change them if they are not the same as the module pom.

 

That is another thing I like about this setup

 

- it allows you to do the most manageble thing easily, and if you need the full control you can do that for just the parts you wishes it for.

 

What do you think ?

 

Have you solved this problem differently/better/worse ?


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

3.2.1

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

 

Earlier this week we pushed out an update of 3.2.1 to our updatesite. This release contains a bunch of bugfixes and one main component change that requires care when upgrading. Read below for details.

 

Remember JBoss Tools 3.2.x is for Eclipse 3.6/Helios, if you are on Eclipse 3.7/Indigo use JBoss Tools 3.3.* instead.

Installation/Upgrade

The component upgrade we've done is to move our JBoss Maven integration from m2eclipse 0.12 to support m2eclipse 1.0.0 since it is a massive speed improvement compared to previous releases of m2eclipse.

 

This unfortunately mean that if you used our JBoss Tools Maven integration you have to uninstall JBoss Tools Maven integration and m2eclipse 0.12 to be able to upgrade because m2eclipse changed bundle id's in their migration to Eclipse.org.

 

Same goes if you wish to install you need to be sure you do not have m2eclipse 0.12 installed.

 

You can uninstall Eclipse components in the "About Eclipse" and click "Installation Details" and uinstall all the "JBoss Tools Maven"  or "m2eclipse" components under "Installed Software" and click uninstall.

 

After this you should be able to update without any problems.

 

If everything fails a full installation would be the way forward. You can see the details for that at the JBoss Tools 3.2.0 release blog.

 

Have fun!

 

p.s. this is also my last blog before my vacation so be gentle and see you again in September

We are looking for 2 core developers and a release engineer to work on JBoss Developer Studio product and the JBoss Tools project.

 

If you are into Eclipse development, want to work with some of the greatest talent in the industry and aren't afraid to get your hands dirty then take a look at the following positions recently posted on careers.redhat.com:

 

Core Developer - Webservices & SAP Integration

 

Core Developer - AS, OpenShift & Cloud

 

Release Engineer - Make it all work

 

p.s. no matter what the posting says these positions are available world wide in any country with a Red Hat presence.

 

If you want to hear more mail me at max.andersen at redhat.com or if you already are ready to go then apply directly on the above links.

 

Have fun!

/max

Filter Blog

By date:
By tag: