SPAM reloaded

SI Captcha is not exactly brilliant. We still have SPAM so lets try something different:
If Google’s OCR can’t read it, who can?

reCAPTCHA uses the best OCR mechanism that exists: humans! Go to Plugins->Installed Plugins and enable reCAPTCHA.
Go to Settings->WP-reCAPTCHA and check your settings, make sure “Enable for comments form” is enabled. Get your API Keys here, you need them to configure your WP-reCAPTCHA.
Stay tuned to our fight against spam.

Enjoy a SPAM free blogging experience.

Wie lange brauchst du, um die korrekte Antwort zu finden?

Wenn man am Morgen zu viel Zeit hat, und sich etwas auf Google+ herumtreibt, dann stösst man auch so anscheinend erstaunlich einfach Aufgaben. Ich will Sie euch also auch nicht vorenthalten:

Vielleich möchte sich jemand mittels Kommentaren zur richtigen Lösung äussern!?! Ich kenne an der HSLU mindestens einen Dozenten, welcher seine Freude an dieser Aufgabe haben wird ;-)

Jenkins and the deployment plugin

What I really love about Jenkins is his straightforward approach, when you do things with it. A short installation, a fast first configuration and a lot of good plugins, which can do a lot for you.

So I had also a look to the “Deploy to container Plugin”. It looked tempting, because I have an enterprise application which I want to deploy into an Application Server (GlassFish) after a success build.

First try first error. The plugin alert with

ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
org.codehaus.cargo.util.CargoException: Deployment has failed: Action failed Deploying application to target server failed; File not found : /var/lib/jenkins/jobs/shop/workspace/shop-ear/target/shop-ear-1.0-SNAPSHOT.ear
	at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.waitForProgressObject(AbstractJsr88Deployer.java:220)
	at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.deploy(AbstractJsr88Deployer.java:76)
	at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:142)
	at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:60)
	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:86)
	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:73)
	at hudson.FilePath.act(FilePath.java:785)
	at hudson.FilePath.act(FilePath.java:767)
	at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:73)
	at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:45)
	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:694)
	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:669)
	at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:978)
	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:616)
	at hudson.model.Run.run(Run.java:1429)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:470)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:230)
Finished: FAILURE

After a while of search, try and error I found the problem. My Application Server has not enough permission to access the ear file which is created by the jenkins user. After I include the glassfish user to the same group as the jenkins user it works – yeah!

I was happy and proceed with my work.

But then when I did a new commit on the scm system and jenkins try to build the project new, it couldn’t deploy it again. The build was a success ([INFO] BUILD SUCCESS), but the the deployment plugin alert with:

Deploying /var/lib/jenkins/jobs/shop/workspace/shop-ear/target/shop-ear-1.0-SNAPSHOT.ear to container GlassFish 3.x Remote
ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
org.codehaus.cargo.util.CargoException: Deployment has failed: Action failed Deploying application to target server failed; Error occurred during deployment: Application with name shop-ear-1.0-SNAPSHOT is already registered. Either specify that redeployment must be forced, or redeploy the application. Or if this is a new deployment, pick a different name. Please see server.log for more details.
	at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.waitForProgressObject(AbstractJsr88Deployer.java:220)
	at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.deploy(AbstractJsr88Deployer.java:76)
	at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:142)
	at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:60)
	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:86)
	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:73)
	at hudson.FilePath.act(FilePath.java:785)
	at hudson.FilePath.act(FilePath.java:767)
	at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:73)
	at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:45)
	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:694)
	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:669)
	at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:978)
	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:616)
	at hudson.model.Run.run(Run.java:1429)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:470)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:230)

Now the message was a bit more precisely. I have to force the deployment. In the console I can easily add the parameter “--force” to my asadmin deployment command, but the plugin doesn’t allow this option to me. So what can I do?

My not so well solution, add a “Hudson Post build task” which undeploy the current application from the server. In detail I add a condition which search the “Log text” for the following regex pattern “target/(.+).ear“.
If match is found (means, that the ear file was created) it execute the following script

/PATH/TO/THE/ASADMIN/COMMAND/asadmin undeploy $(basename $(find -name "*.ear") .ear)

Explanation:
$(find -name "*.ear") – looks for a file (inclusiv path) with the extension ear
$basename – strip directory and suffix from filenames
So, the script execution looks like:

/PATH/TO/THE/ASADMIN/COMMAND/asadmin undeploy shop-ear-1.0-SNAPSHOT.ear

After that, I can now deploy the application each time, when a build success. So a success story? Not at all!
When I rethink my solution, why do I deploy my Application not at all with the post build task and skip the deployment plugin…

Erster itgirls@hslu Workshop war ein Erfolg

Der Frauenanteil ist in der Informatik leider immer noch sehr tief.
Dabei wären Frauen sehr gut für diese Branche geeignet.

Viele setzen die Informatik mit dem noch weit verbreiteten (und meiner Ansicht auch falschem) Image von ungepflegten und introvertierten Nerds in Verbindung.
Dabei ist dies überhaupt nicht der Fall. In der Informatik sind Kreativität, Selbstkompetenz, Methodik und auch Sozialkompetenzen (Kundenkontakt etc.) gefragt. Hinter der Informatik stehen keine PC-Freaks dahinter, die tagelang im Keller vor dem PC sitzen. Es sind engagierte Persönlichkeiten, die einen vielfältigen Beruf ausüben und Freude daran haben Herausforderungen anzupacken und diese zu meistern.

Ich bin überzeugt, dass mehr Frauen in der IT-Branche einen positiven Effekt auf diese hätten.
Die noch von Männer dominierte Domäne würde aufgemischt werden und es würden sich neue Synergien zwischen den beiden Geschlechtern ermöglichen.

Die Hochschule Luzern engagiert sich mit einem dreitägigen Ferienprogramm für 14- bis 16-jährige Schülerinnen dem weiblichen Nachwuchs die IT näher zu bringen und Vorurteile  aus dem Weg zu schaffen.

Das Ferienprogramm “ITgirls@hslu” besteht aus mehreren Workshops und Exkursionen und soll den Schülerinnen vermitteln, wie aufregend und vielfältig Informatik sein kann.

Folgende Punkte stehen auf dem Programm:

Die Teilnahme ist kostenlos. Weitere Kurse sind für April und Oktober 2012 geplant.
Weitere Infos

Erfolgreicher Workshop

Der erste Kurs von ITgirls@hslu war schon seit längerem ausgebucht. Das Feedback der 39 Teilnehmerinnen war sehr gut. Sie hatten sichtlich ihren Spass und waren begeistert von der Vielfalt, die in der IT steckt.

Auch die Medien wurden aufmerksam und berichteten: