CloudBees + PlayFramework + Eclipse - eclipse

I want to develop and manage my DEV#CloudBees and RUN#CloudBees workspace from Eclipse, for a PlayFramework project, and I will have to work with it from several different PC. I'm using the Cloudbees SVN repository, Jenkins CI solution, database ... everything.
I installed CloudBees and PlayFramework plugins for Eclipse, created my CloudBees account, SVN repository, project, Jenkins Job and database. I've created my Play project, eclipsified it.
I understand and I have tested each component of my targeted working environment but I didn't manage to make them work smoothly together.
1- I've seen some Play modules for CloudBees but it is only for command-line use. Is there a nice Eclipse plugin wrapper for this ?
2- I have some issues writing the build.xml, especially when referencing the PlayFramework libs, because I can not use the local installation as it won't work on Jenkins.
3- How can I deploy to RUN#CloudBees from Eclipse ? If i use the CloudBees plugin, it doesn't package the PlayFramework libs.
4- How can I use the testing features of Play to be integrated in Jenkins ?
I have a lot of questions but it is enough for now :) By the way, PlayFramework is awesome and CloudBees a life-saving work environment.
Thank you for your help.

Contact the support, they are really helpful..and fast!
they do have a plugin for Jenkins, ask to get it installed on your server..I use the command
play auto-test
and it works fine. You'll need some code to check for failures depending on the .failures files. check this link

I received a very quick and efficient answer from Cloudbees support.
It confirms what mericano1 and Ryan said (thanks to them).
The CloudBees Jenkins service let users install some customization plugins like the Play! Framework one !
After adding it to the core configuration, you can add a new build step "Play!" in your job configuration and set the Play! commands you need. For example "clean", then "deps --sync" and finally "auto-test". You can also add the war -o toto.war if you need the binary.
You can check the "Play! auto-test reports" checkbox. You'll have an additional icon "Play! Test Result" in the left menu of the build result page to watch the ... Play test result page (unbelieavable :)).
Still in the job configuration, you can check the "Deploy to CloudBees" features. I didn't tried but I think the Play! libs issues wouldn't be resolved. So, add the cloudbees 0.2.2 plugin in your Play! project dependencies.yml, and you can add the bees:app:deploy command in your build step.
For Eclipse, the CloudBees plugin is fully functionnal, once you have configurated your Jenkins job. But you should stay with the Play! process to develop locally and not the Run DEV#/CloudBees Local.

1) The cloudbees module is only for the command-line. There is no Eclipse plugin (that I know of). However, the command-line is really simple play bees:app:deploy
2) Not sure here
3) Deploying Play Framework Apps is a bit different from deploying J2EE (because of the necessary play war command), thus deploying a Play app to Cloudbees from Eclipse might not be possible. However, see 1).
4) I think there is a Play plugin for Jenkins. I have never used it on/off Cloudbees.
OK, so I provided some help on questions 2 and 4, and unfortunately, the answers may not have been what you hoped. I suggest switching to command-line when it is time to deploy.

In eclipse click on external tools menu and create a new command as noted by Ryan in 1).
then you can simply click on the external tool icon.

Related

how do I deploy the marketplace-portlet or importing marketplace-portlet dependencies?

I'm trying to complete The Official Documentation for Hooks in Liferay. About halfway down that page, there is a note.
Note: If the Liferay server prints the following message to your console,
the Marketplace Portlet and Portal Compatibility Hook must not already be
deployed on your server.
"Plugin example-hook requires marketplace-portlet, portal-compat-hook"
I do get this message, so I attempt to follow the instructions:
You can fork and clone Liferay’s liferay-plugins project from GitHub, checkout the
respective branch and/or tag, and deploy each plugin. You can install the Plugins
SDK in Liferay IDE and import each plugin and deploy them. Here is information on
each of the plugins:
Marketplace Portlet (marketplace-portlet) - is available at liferay-
plugins/portlets/marketplace-portlet.
Portal Compatibility Hook (portal-compat-hook) - is available at liferay-
plugins/hooks/portal-compat-hook.
This is as much information as I can find about setting up the marketplace-portlet.
So I clone, and add the whole repo as an existing Eclipse project, not a liferay project. I check the checkbox for look for nested projects, find and add the marketplace portlet and hit finished. Then I assume to fix the build path by changing plugin-master to portal-6.2.x
As you can see, this solves more than half of the missing .jars, but the ones that are still missing claim the build path is the same, so they are missing from the repo, or need to be built. I have no idea which.
So, how do I deploy the marketplace-portlet?
As requested, combining our comments into an answer:
"Have you tried installing fresh again?" ;)
To make it worth a real answer: The typical bundle installation comes fully runnable (the installation instructions are: unzip, start tomcat) and contains everything you need - especially in a development environment.
If you use Liferay IDE or the EE equivalent Developer Studio (both based on eclipse), they even know how to unzip the server themselves (a necessity if you're developing/redeploying ext plugins).
Glad to be able to help.
This problem happened repeatedly. Something about a bad deploy could cause Liferay to remove its own Marketplace portlet*.
Rather than re-install each time, I grabbed the Marketplace Portlet.war from Liferay's Get Marketplace Portlet page and would deploy it using the Liferay Control Panel.
*: I don't have an exact steps to reproduce, sorry.

Using Eclipse with HTML5 Boilerplate

I just got my new computer and I'm going to learn an IDE fresh. Everyone suggests Eclipse; therefore, I'll go with that. I downloaded Java EE for I may use it later for java programming also. I don't mind the bloat.
What I want to achieve is that every time I create a new website project that HTML5 Boilerplate also gets created as a template to the project. Anyone know how to achieve this?
Also any additional plugins for web dev or anything to do helpful with web development ideas with eclipse would be most appreciated.
If you are using Java EE eventually, I think the best strategy would be creating a Maven archetype. This way once you have your baseline project definition, you can archetype it and create all your subsequent projects from that.
Apache - Guide to creating archetypes
If you don't have Maven yet, you can get it here.
And the Maven Eclipse plugin can be installed from the update site: http://download.eclipse.org/technology/m2e/releases
Finally, since you are new to Eclipse, you can install plugins from Help > Install New Software. Best of luck! I know that's probably a lot to take in.

Boostrapping new Eclipse machines with all the Plugins

Bootstrapping Eclipse on new machines is such a time consuming process, you wind up asking yourself whether you really need each plugin. But there all handy, and help develop consistent habits.
Eclipse bootstrapping problems include:
Explaining / documenting what needs to happen
The actual time pasting in the right URLs and downloading
Version compatibility and dependencies
Eclipse likes to restart after each one
The changeover to the Eclipse Marketplace means that some plugins and instructions you find on the web tend to be inconsistent, depending on when they were written.
The Licenses... over and over and over... yes, yes, yes... I understand that the person installing needs to be aware of it, and have a chance to review them, but there's got to be a better way.
It'd be nice to have "patch file" (either binary or meta) that spells out what I want to add on top of stock Eclipse installation. I'd really like to find (or create) a 1 or 2 step process that sets up Eclipse, plus a favorite batch of plugins:
subclipse
m2eclipse
jetty support like runjettyrun
android sdk and plugin (or at least just the plugin)
aspectj
Web Objects / WOLiops
python, other langs
JVM Monitor, maybe EclEmma
probably a git plugin pretty soon.
Does command line maven help with any of this? It seems like its repository management would fit at least part of the functionality.
On a machine with an Eclipse installation matching your needs use File -> Export -> Install -> Installed software items to file. Import the generated file using the same menu on all other machines.
As Scott says, a good approach is to simply package a fully prepared Eclipse installation once all the plugins you need are installed. The downside is that you have to update most plugins afterwards.
Another option is to use Yoxos. With it, you can create a profile and configure it with all the plugins you need (and apparently Yoxos can do more than that).
Finally, this page might interest you concerning the configuration side of things.
Solution 1 is too search for more advanced Eclipse distributions.
For example, STS (Spring Tool Suite) comes with
AspectJ
EGit
m2e
(and of course) Spring IDE
One small trick can be done with m2e-android - Android Configurator for M2E Maven Integration. If installing it on clean Eclipse, it will also automatically resolve to install :
m2e
Android Developer Tools (ADT)

Continuous integration & eclipse plugin development

I am developing a set of eclipse plugins, and I have several JUnit plugin tests that actually start another instance of eclipse, create a mock workspace and a mock project and runs various operations on them. I want to put that on continuous integration and I am at loss as to where to start. I am using Hudson, would there be any plugins that makes that easier? Can those tests launch eclipse in headless mode or something on the CI server? Pointers would be much appreciated.
I think the best solution for building Eclipse-based software currently is Tycho - it is based on Maven and uses your standard Eclipse files (like manifest, target platform, product definition). I got started with it using an intro from this blog: http://mattiasholmqvist.se/2010/02/building-with-tycho-part-1-osgi-bundles/, and it worked really well. We also use Hudson, and since Tycho is Maven-based, Hudson integration was trivial and worked simply by calling Maven, which Hudson supports out of the box.
As far as I know, Buckminster tries to solve these problems: you can create descriptors, and then Buckminster can execute your tasks.
For Hudson there is a Buckminster module, that helps executing the Buckminster builds.
maybe this helps you to avoid plugin tests? ;) i like to avoid them... by using mock objects...
http://blog.srvme.de/2010/12/10/mock-eclipse-ifile/

JavaRebel with a Multi-module Enterprise Project in Maven

Does anybody have experience working with JavaRebel, specifically for a large web application built using Maven? There is a JavaRebel plugin for Maven that seems under-documented, does anybody have comments on how it works, can you really update one class in a Multi-module Enterprise Project and have it "automagically" change on your Server?
Are there any issues with different IDEs and this setup? For example NetBeans will not let you compile one class at a time in a Maven project (from what I can tell).
Disclaimer: I work for ZeroTurnaround.
JRebel (formerly JavaRebel) installation involves the application configuration file "rebel.xml" and modifying the container startup command line.
The Maven plugin is used to generate the "rebel.xml" file, that is used by the JRebel agent running in the container to find the files in the workspace. This allows to use IDE building to compile .java files and skip the Maven build process, as the changes to files will be picked up from the workspace. However as it relies on the IDE to compile the classes, it does depend on the IDE ability to compile efficiently. I know for sure that Eclipse will compile classes one at a time and am fairly sure you can configure NetBeans and IntelliJ IDEA to do the same.
In addition to the Maven/rebel.xml configuration you also need to configure the container startup command line. You may also need to install and IDE plugin or do some additional configuration to have the best expirience with JRebel. Following through the steps of Installation manual ensures that.
Hope this helps.
Disclaimer: I've not actually used this plugin myself.
This tutorial implies that JavaRebel works well with Eclipse 3.4. If you are also using m2eclipse it should work ok with Maven projects as well (as long as you ensure that Maven and Eclipse are compiling to the same target folder so the Eclipse incremental compiler can be used to modify the class file).
According to this post, you should configure the javarebel-maven-plugin to generate the rebel.xml (used to mount external folders to the application classpath). There's also a general installation guide you may find useful.