Skinning Drools Guvnor - jboss

I am fairly new to Jboss 5.1 and Guvnor 5.3 and have been trying to figure out how to change the look and feel of Guvnor. I haven't been able to find a solution and may be missing something. I realize you can edit the CSS file, but I'm looking for a way to edit it while seeing what I'm doing.

If you just want to edit the CSS-file then I would use FireBug in Firefox or Chromes dev tools to see my changes immediately and then copy the changes to the CSS-file. I should warn you that it is not possible to edit everything using the CSS.
For bigger changes you need to clone the source codes and compile your own war [1]. Some experience in GWT and java will not hurt here. I recommend using one of the tags in the Guvnor GitHub repository as your base. The master can be unstable. Check the README [2] for how to set up the project in your IDE. To build the war you need to run "mvn -Dfull clean install" the wars will be in the guvnor-distribution-wars -folder.
[1] https://github.com/droolsjbpm/guvnor
[2] https://github.com/droolsjbpm/droolsjbpm-build-bootstrap/blob/master/README.md

Related

Automating the export of a legacy eclipse e4 application

I've had a legacy eclipse e4 application product dropped in my lap. Plugin-based, circa 2014.
Right now the build process is "Run eclipse, then do these point-n-click things". It needs the build & product-export processes automated. That is, made invoke-able from a command line.
Build automation was trivial. The Eclipse-created ant scripts work fine.
Product-export automation is proving quite annoying.
So far I see four options:
Invoke eclipse's Product Export Wizard from the command line.
Identifying the wizard specifics was easy (via the Plugin Selection Spy).
But there seems to be no way to make eclipse run a wizard from the command line.
Convert the existing plugin project to Maven/Tycho.
Theoretically modern and nice, but the details are messy.
Configure | Convert to Maven Project runs with no errors, but the resulting maven configuration is badly broken.
The project also has numerous out-of-date dependencies with no standard maven repo.
So a conversion to maven is far from straightforward.
Completely reorganize under a new maven/tycho project, just bringing over source files, icons, etc.
This still has the dependency issues, plus whatever unknowns crop up.
It would also trigger an in-depth QA cycle. I'd rather avoid that.
Create a second e4 application that (using EASE) runs the product-export wizard on the existing project.
IMO this is a blatant hack. I hate this idea, even though it would probably work.
Note: This is eclipse 4.15 on Windows. The installation is very fragile. It cannot be easily updated, because some of the code depends on the out-of-date dependencies.
I'd really prefer #1. Its non-invasive and bypasses a whole raft of issues.
But I'm stuck on the wizard-from-command-line.
Anyone done this particular type of eclipse automation?

Google App Engine, Maven and Eclipse development setup

I'll try keep this short. I have Eclipse with an installed M2E (Maven to Eclipse) plugin. I have a GAE (Google App Engine) project I'm working on. Everything is working ok apart from one really annoying thing: I have to stop/start the devserver every time I make a change.
If you have any experience with this setup then you might be able to answer this simple question?
I start the development server with "mvn appegnine:devserver" on the command line. Now I would expect that if I made changes to a *.jsp for example that those changes would automatically be updated on the devserver. Is this what happens with you?
I have noticed that if I make changes to *.jsp files under my target folder then devserver will see those changes and updates as I would expect. I think my problem lies with Eclipse not copying changes to target folder, but not sure if is even suppose to?
Does anyone have any suggestions on how I should progress investigating this? I've ran out of ideas :-/
I thank you in advance for any comments you may have.
P.s I know I can run "mvn package" to update files, but this is slow and the devserver runs out of memory after a do it twice.
This can be little painful, depending on how you want to work and which version of eclipse you're using.
Install the m2e-wtp plugin if you haven't. It's the secret sauce that makes appengine projects work in eclipse. Note this isn't m2e - but another plugin.
Install the GPE - the google plugin for eclipse if you haven't
Make sure your project is being managed by m2e as a maven project.
Go into your project properties - enable it as an appengine project using the GPE (listed under 'Google'). Don't forget to tick HRD while you're here.
Go to your project build path (Properties -> Java Build Path).
Ensure on the source tab that your src/main/resources doesnt have an ** exclusion.
Ensure on the libraries tab your have the three libraries 'JDK', 'Google Appengine' and 'Maven Dependencies' and nothing else
Ensure on the order and export tab that the appengine dependencies are above the maven dependencies.
It sounds pretty ridiculous - i'm not really sure why its still so painful, but that is a good recipe for success. Once that's done, this should allow you to run in debug from eclipse itself, with hotloading of code, jsps, css, scripts etc. I've had this work in helios, indigo and juno.
You can read more about the m2e-wtp setup instructions here. They refer to GWT but it's the same for appengine (I'm not sure why the emphasis on using GWT on GAE) because its actually about the correct setup of GPE and Maven.
You will also find that you may need to repeat some parts of step 5 pretty frequently - if your app isn't loading properly take a quick look to ensure that your resources haven't been excluded. This happens when you update your project configuration using the m2e plugin.
The wtp-m2e plugin updates the target folder as resources modified - so this should also resolve your issues running from the command line, but i can't vouch for that - I prefer to run straight out of eclipse.
I have the same problem as you, however I resolved with other way. I use FileSync plugin (which can be found in the market place).
With this plugin you configure an input directory (webapp) and output directory (target).
Any change made to the webapp will be passed to the target.
I have helped too.
You can use rsync like this:
rsync -r --existing src/main/webapp/ target/ROOT
where "ROOT" is the project build finalName.
The below point worked for me.
Ensure on the order and export tab that the appengine dependencies are above the maven dependencies.

Coldfusion deployment process

I am trying to figure out what's the best process to implement for build & deployment for coldfusion project.
I am much more familiar with the regular java stack: some back-end framework (Spring, Struts, etc), bunch of JSP files, then use maven to compile and bundle everything to a .war file that I simply deploy (copy) over to a tomcat webapp directory
Are cfm files practically same as jsp? What are the similarities & differences between Java vs Coldfusion build/deploy process?
The resources I found so far make it sound like to just copy & paste the physical files, which doesn't sound quite right.
The thread here Best Practices for Code/Web Application Deployment? - goes on the generic deployment process, which we already have implemented. We have code repository and maven to manage our build & deployment process, can coldfusion work straight out of the box with the same set up as regular Java/war projects?
A thread in Adobe forum does not give much insights either: Deploying ColdFusion 8 project via EAR/WAR file, plus it talks about EAR rather than WAR.
This is an old link from 2007: build tools: maven and coldfusion seem to indicate maven is not straight out of the box solution, also seems like Coldfusion has no need for dependency management that maven is so useful for?
Can someone help point me to the right direction for build & deployment of coldfusion projects with the following stack:
Code repository, doesn't matter much: Git, svn
Maven build
Deploy project as war into Tomcat7 (not built in)
MySQL db connector
and Lastly - how would the solution be different between CF8 vs CF10? Looks to me CF8 may be worse as it doesn't officially support Tomcat, whereas CF10 runs on modified version of Tomcat?
Thanks!
When it comes to deploying CFML out the box then you really just have to copy and paste the file into your web server. In your case if you are using git just pull it from your repository. You don't have to do anything other then that. However, in some cases you may need to clear your CFML Cache if you don't see the changes immediately. This is my personal process:
Make changes on local machine running a CFML Development environment.
Commit and Push changes to git repository.
Pull changes to Production Server
Clear cache if needed.
It really is simple as that as long as your code makes it that simple.
Answer 1:
I have worked on some substantial apps were the process was zip up all the files, send them to a deployment team and they will unzip at the appropriate location.
Answer 2:
I suspect you are looking for something like CAR files. http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf364104-7fd3.html

How to partition a JSF project for developers vs UI coders, when using Git as the code repository

I am migrating my JSF application to Cloudbees - basically a Maven/Jenkins/Git platform. Unfortunately, I don't have a lot of experience with Maven/Jenkins/Git.
I want to create a simple way that UI developers can stay in synch with the xhtml and related UI files, without needing the Java code on their machines. Java developers would need both the UI code and the java code. In both cases, when they push their content, it should be integratable with Jenkins continuous build process.
Is there a good pattern or suggestion you could make to partition the project, so that the UI developers have their XHTML and other files (images, CSS, etc), while the Java developers have everything? This would need to work with Maven, Git, and Jenkins. Thanks for all the help.
One last thing - java developers will be using Eclipse. UI developers don't need to use Eclipse, so the link will be Git.
This is really just a Maven/JSF question. Jenkins does not really enter the equation, and neither does CloudBees (note we [cloudbees] also support Subversion hosted repositories which may or may not fit your project structure better... in any case GIT is IMHO “better” so I would go for GIT over Subversion if it was me)
You have three options really.
Keep the XHTML in a separate GIT repository
Keep everything in one repository.
A kind of mix of 1 & 2
Option 1
This will drive you down the road of GIT submodules... that is the one case where I would favour Subversion over GIT... and no I don't mean that svn:externals is better that GIT, more that Subversion allows you to check out a portion of the repository, so the UI team could just check out the sub-path where the XHTML files live, IOW
$ svn co https://svn-user1530669.forge.cloudbees.com/jsf-app/trunk/web-module/src/main/webapp web-content
$ cd web-content
would work for the UI team and
$ svn co https://svn-user1530669.forge.cloudbees.com/jsf-app/trunk jsf-app
$ cd jsf-app
$ mvn package
will work for the Java developers.
To achieve the same with GIT requires the use of sub-modules, so you would have one sub-module at web-module/src/main/webapp in the jsf-app GIT repo.
Where this becomes a pain is when the Java developers need to make tweaks to the XHTML files as well, depending on the IDE it can be tricky to get the commits in the submodule to take correctly. Also you now do not have a single revision to track, the two repos can move independently... which can degrade some of the features of GIT.
When you want to use the Maven release plugin (and you should want to) Submodules will prevent you, as both the idea of tagging submodules is not currently supported by the release plugin, and there is that two separate repos to track issue again.
Option 2
This really is the better option... even though it is doing exactly what you said you didn't want to do.
The trick here is to make the UI developer's life easier.
You should set up a nice Maven profile with a default goal which ends up running the web application with e.g. jetty:run see for example This pom profile If you check out that project and just run
$ mvn -Pdemo
It will fire up the web application from the sub-module having built all the dependent modules.
Using this approach means that the UI guys can also test the UI changes integrated into the JSF app reducing the load on the Java guys.
Option 3
This is a kind of mix, you have separate GIT modules for the XHTML and the Java, but they are valid Maven projects.
You can achieve this in two ways...
Have the XHTML module be a <packaging>war</packaging> which is extracted into the Java web-app using Maven War Overlays
Have the XHTML module be a <packaging>war</packaging> which has the Java dependencies pulled in directly.
The first has the advantage that the Java developers can work with the Java code quickly, but the side-effect is fixing XHTML is tricky e.g. data-binding attributes
The second makes tweaking the Java harder (have to keep running mvn install), the UI guys have to pull down the Java .JARs from the remote Maven repo if they want to spin up the Maven packaging, and hence you may expose some of your java internals to the UI guys.
TL;DR
Personally, unless keeping things secret from the UI guys is something that is important, I would pick Option 2

Moving my GWT, GAE installation into my project for source control

I use the google plugin for eclipse with GWT and Appengine libraries. Every so often I upgrade one of the libraries, which currently involves:
I install the update somewhere on my HD
I add the update as an alternative SDK in eclipse, with a generic name
I update the project settings to point to the new generic name
I commit the changed settings files (which do NOT include the upgraded library) to our source control
The problem here are in unfortunate steps 5-7:
5 Everyone else's builds stop working past the change,
6 I go from machine to machine, repeating steps 1 and 2, and
7 I think for the nth time, "I should really find a way to automate this."
I'm here for the elusive step 8: Actually automating this. I want to include the SDK in my source control, so when I switch between versions or set up shop on a new machine, the relevant SDKs are automatically installed and downloaded. I don't want to have to configure eclipse settings at all. In my ideal situation, I am willing to install Eclipse and the GPE on each machine, but after that I just want to clone my repository and go.
I've tried doing this by removing the GWT library from my build settings, copying the entire GWT installation folder into the root of my project, and adding gwt-user.jar and gwt-dev.jar to the build path from there. This almost works, but eclipse complains that it can't find gwt-servlet.jar (even though it exists precisely where it claims to be looking for it!). There also seem to be other magical settings I don't understand.
Finally, the question: If this is the right track, what settings do I need to manually control? If this is the wrong track, what's the right one?
+1 good question. This may or may not answer your question, but I can share with you what I do. I also work with GAE and GWT.
I just include the SDK .tar/.zip files in my repository, remove the version numbers from the filename, and update it when I want to move to a new version. If that version migration fails, I can easily revert to the old SDKs. I also use GXT and a bunch of other GWT extensions, so my problem is even worse than yours. I don't use eclipse for GAE nor GWT, so I can't relate to the problems you are having there. If you don't want to have to configure eclipse every time, then don't use eclipse.
Disclaimer: I hate eclipse.