Archive for July, 2009

Tika uses Commons Compress

Friday, July 31st, 2009

It just came in with a newsletter: Tika 0.4 is using Commons Compress from now on. Thats really great! It’s the first big app I know which is using Commons Compress. Hopefully that motivates me to get back bugfixing Compress in near future :-)

More TIKA changes: http://www.apache.org/dist/lucene/tika/CHANGES-0.4.txt

SVN Properties – Client Config

Sunday, July 5th, 2009

You  know I am working on several open source projects, and lately one of my comrades told me I should stop coding asap and:”please correct your client configs I don’t want to fix the stuff anymore.”. This shout made me think about my bad behaviour and to be honest, I didn’t know why I should do this and how.

After some small googling, I figured out that the most cool feature of the SVN properties is to ensure that if you check out something from repository, you’ll get the line endings you need.

“In other words, if a user on a Windows machine checks out a working copy that contains a file with an svn:eol-style property set to native, that file will contain CRLF EOL markers. A Unix user checking out a working copy which contains the same file will see LF EOL markers in his copy of the file.”

Quote from: http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.5

So, this is client config. That means YOU have to make sure that you add your files with the correct properties. Let’s assume you want to add a file named test.txt. You would do:

svn add test.txt

After adding you need to perform:

svn propset -R svn:eol-style native test.txt

to set the properties correctly.

Having that beeing said. most people will complain now that this is a difficult task and very error proven. Well it is. But you don’t have to take care if you are sure that only one operating systems (means: one development enviroment)  is set up. This is true for most projects I guess.

If it is NOT the case, you can force your developers to create a default config setup. On windows it just some entries in the registry (please try this, I am not using windows for open source stuff anymore), on Mac OS X and Linux the file ~/.subversion/config must be edited.

In my case, this did do the trick:

[miscellany]
enable-auto-props = yes
[auto-props]
*.java = svn:mime-type=text/plain;svn:eol-style=native
*.css = svn:mime-type=text/plain;svn:eol-style=native

or at least mostly.  SVN told me, after I wanted to change properties to native, that my css files were binary, which this wasn’t the case, of course! I couldn’t change it, until Sebastian Bazley came up with the following:

svn pl -v

showed:

Properties on 'maven.css':
  svn:mime-type
    application/octet-stream

He further told me to do:

svn pd svn:mime-type maven.css

And that was it – SVN is forced to use mime type I want.

Last but not least, here is the link to the apache recommendation or SVN config.

JavaMagazin article about Commons Compress

Friday, July 3rd, 2009

javamagazin82009In the latest edition of the JavaMagazin you’ll find a small introduction into Apache Commons Compress. It’s not explaining everything, just a good start. Having this beeing said, I think I should note that this one has been written by myself :-) – consider this blog entry as shameless self promotion. :-)

However, if you read the article: please enjoy. If there are any further questions about the usage of Commons Compress, consider to add yourself to the mailinglists.

  • Categories

  • Recent Posts

  • Tags

  • Wave Notifications

    Download Adobe Wave now!

    This application requires Adobe® AIR™ to be installed for
    Mac OS or Windows.




Feeds