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, pointing to the beans.xml of my project and saying
Referenced file contains errors (jar:file:/D:/Program Files (x86)/GlassFish-Tools-Bundle-For-Eclipse-1.2/dropins/feature-1.0.50/eclipse/plugins/com.sun.enterprise.jst.server.sunappsrv_1.0.50.jar!/ee6_schemas/beans_1_0.xsd).
So i opened the file com.sun.enterprise.jst.server.sunappsrv_1.0.50.jar in the mentioned directory with an archiver, where i found the beans_1_0.xsd in the folder ee6_schemas, which i opened with a text editor.
The targetNamespace of the schema file was pointing to the Seamframework, which sounded strange to me. So i googled to find another beans_1_0.xsd schema file and found one in the Weld trunk, with the targetNamespace=”http://java.sun.com/xml/ns/javaee” – which sounded much better to me.
So i replaced the schema file in the archive with the one from the Weld repo (you have to shutdown the GlassFish Tools Bundle first) and restarted the bundle, made a clean of my project – and voilà, the error vanished!
[EDIT]
I switched back to Eclipse and downloaded the Glassfish adapter seperately. Seems to work faster and more stable to me.
Also, there are some really annoying issues when deploying a Maven JEE6-app on Glassfish within Eclipse (both in bundled and non-bundle version with GF3 adapter). When “enable dependency management” in M2Eclipse is enabled, i can’t deploy the project. When it’s disabled, deploying works – but programming is hard because of the missing dependencies (although it works somehow).
Will write an article about that issue soon…
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 style guide suggests using spaces instead of tabs.
So today i ended my misery with converting text-files and tabs by hand and finally wrote a Bash script. It works both on Linux and on Cygwin.
It solves both problems at once: It converts Windows CR/LF line breaks (only when there is one!), AND replaces those superflous tabs with spaces. And all that with one single line.
Read More »