94 views
1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 4.67 out of 5)
Loading ... Loading ...

20.01.12

Maven Checkstyle Plugin — Usage

Posted in Blogroll, Tech at 1:11 am by Liv About Liviu Tudor

The title might not be the best, I’ll give you this, however, having just spent some time trying to get Checkstyle to run in the site phase of one of my maven projects I have figured out that a lot of the resources you find out there miss out a few important details. So if you are looking for the complete usage guide of the Maven Checkstyle plugin, this post isn’t what you’re looking for. However, if just like me you found yourself adding the configuration example given on the Maven Checkstyle plugin and then issuing a mvn site only to find out that Checkstyle plugin doesn’t kick in, then this is post is probably for you.

I’m not going to show you here how to configure your Checkstyle rules but rather what you need to include in your pom.xml to actually get the checkstyle plugin to generate the reports when you issue a mvn site.

Read the rest of this entry »

Disclaimer

325 views
1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 5.00 out of 5)
Loading ... Loading ...

18.01.12

Running Tomcat on Port 80 on a Mac — shell script

Posted in Blogroll, Tech at 1:22 am by Liv About Liviu Tudor

If you’ve been messing about with Tomcat on a Mac OS X, you probably came across the problem of not being able to run the damn Tomcat on port 80. This to many won’t come as a problem, as in most cases port 8080 works fine for local development/testing. However, I found out that this becomes a bit annoying when you are doing some hosts-file hacking to redirect live browser requests to a local instance of Tomcat (for testing purposes) — as the requests would actually end up on port 80, while your Tomcat is running on 8080. So I finally got off my lazy arse to cobble together this script to redirect port 80 to whatever port your Tomcat is running on.

Granted this is not something new — just a bit tidy if you want — so even though you might have solved the above problem already, this post might give you a nicer/tidier script to do this.

Read the rest of this entry »

Disclaimer

83 views
1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 5.00 out of 5)
Loading ... Loading ...

17.01.12

Advertising or Information?

Posted in Blogroll, News, Photos, Random Thoughts, Tech at 10:52 pm by Liv About Liviu Tudor

This goes out to all you ad skeptics out there who bang on about how useless the internet advertising is and how it should be banned / destroyed / 101′d etc: it is sad that not often advertising is delivered as a complement to the content being viewed, and as such it doesn’t come across as an intrusive piece on the page. However, when it happens, it creates something useful!

I have just experienced something like this just now, looking at some technical article online — and even though I worked for Vibrant Media before, there’s no hidden agenda in highlighting this ad unit I spotted as one such piece of great advertising. (I know I slagged them off in the past as well, hope they don’t take it personally : guys, I’ve slagged off Google more than you, so don’t read too much into it! :) )

Read the rest of this entry »

Disclaimer

127 views
1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)
Loading ... Loading ...

23.12.11

Groovy Scripting at the Power of Commons CLI

Posted in Blogroll, Random Thoughts, Tech at 9:04 pm by Liv About Liviu Tudor

ScriptingI’ve found myself more and more scripting stuff in Groovy — partly I’m guessing it’s cause of my Java background, partly because I’m probably not such a good bash/awk/perl/sed/etc script hacker :) Nevertheless, make no mistakes, Groovy is an awesome scripting tool! (I’m not going to praise its benefits in terms of building applications — they do exist! — just strictly concentrate on using it as a scripting tool.)

While it has its own powers on its own — I found a new cool mix recently: Groovy + Apache Commons CLI. The 2 allow you to quickly mix up the Groovy scripting facilities with the power of parsing command line parameters and validate them — the result being a more flexible command-line scripting framework.

Read the rest of this entry »

Disclaimer

126 views
1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 4.67 out of 5)
Loading ... Loading ...

System Console Support — JDK 1.6

Posted in Blogroll, News, Tech at 12:26 am by Liv About Liviu Tudor

I’m sure some of you have found the need occasionally to use the “console” input/output support provided by the JDK via System.in and System.out — if nothing else just to implement an occasional more complicated command-line “scripty” app to be run in a Linux environment and piped input in or out from/to another program.

The problem so far has been the fact that while System.out is a PrintStream instance — System.in is an InputStream implementation! So while the output deals with characters, the input deals with bytes — and you have to start wrapping it up (through a few layers!) into a BufferedReader so you can read input line by line.

Luckily, JDK 1.6 introduces a nice function on the System class : console() — which does solve these problems.

Read the rest of this entry »

Disclaimer

« Previous entries Next Page » Next Page »