February 2012 M T W T F S S « Jan 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Blogroll
Funny stuff
-
RSS Links
-
Meta
Category Archives: General
Python script: Wait for a site to come up and notify me
For the last weeks, i’ve been working a lot with different servers, which take longer and longer to deploy new application bundles. Mostly i know that the deployment is complete when the website or the webservices of that application are up and return a successful status code (not 404).
Another use case is when trying to [...]
Bash script: Recursively convert line breaks in all files from Dos/Windows to Unix AND Replace Tabs with Spaces.
It’s really annoying that on Windows, nearly every program that deals with text saves the text in Windows-format. That’s not good when you work in a multi-OS-environment.
Another annoying thing are TABS, which often are much wider in Linux editors than in Windows, and are generally superflous as i think. Especially when programming Scala, where the [...]
Get Weld project running in Glassfish Tools Bundle for Eclipse 1.2
Today i took a look into the GlassFish Tools Bundle for Eclipse to see if it could speed up my Java EE6-development. I was especially curious about the hot-deployment capabilities.
After downloading the Glassfish Tools from the download site and importing a simple Weld-JEE-project (i was using the Maven archetype “weld-jsf-jee-archetype”), an error showed up, [...]
Enable Weld Logging on Glassfish with Maven
Just figured out how to use a Weld-injected Logger on Glassfish.
Unfortunately, i couldn’t get Log4J12 as SL4J Implementation running, like the author of this post did (i hope i’ll find out later), but with the sl4j-jdk14 binding, the logging just works.
Steps:
Add the following dependencies to the pom.xml:
<!-- SL4J API -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.0</version>
</dependency>
[...]
Use Ant-Contrib Tasks in Maven
I just messed around a while to get a simple Ant-contrib task running inside a Maven build – a simple <if>.
The examples on the net weren’t very helpful or too bloated, so i’ll post a very simple one.
The problem with Ant-contrib is that this library doesn’t come with the regular Ant-distribution. So it has to [...]
Batch script: Convert long folder name to short 8.3 name
When running Windows, i often had problems with long folder-names, especially on the command line.
Since Scala also has a problem with a JDK lying in a folder like “Program Files(x86)” i decided to write a little batch-helper to convert long folder names to the short 8.3-form.
Then i put the short name of my JDK folder [...]
Programmer approaching
And now for something completely different:
No, i wasn’t the pilot. Not yet
Posted in General Leave a comment
Maven & Scala: Add source folder to Eclipse Project
EDIT:
You don’t need to do the things described here if you’re also using Scala. In this case, you can switch to the m2eclipse-scala integration which automatically adds the Scala source folder (beside some other useful things).
Just solved one another annoying problem:
Everytime i had to clean my maven-eclipse-project with “mvn eclipse:clean” and re-created the project, i [...]
Maven Scala Build Error “error while loading Function1, class file needed by Function1 is missing”
Scala and Maven… a kinda’ fragile combination
Today i got the following error when trying to compile my scala-project with “mvn compile”:
[ERROR] error: error while loading Function1, class file needed by Function1 is missing.
[INFO] reference value Unit of package scala refers to nonexisting symbol.
[ERROR] one error found
[INFO] ————————————————————————
[ERROR] BUILD ERROR
[INFO] ————————————————————————
[INFO] wrap: org.apache.commons.exec.ExecuteException: Process exited [...]
Flex: Show HTML text inside an Alert