How to add external jar files to Maven project POM

4 Comments

Maven has made compiling Java projects almost an effortless job. You no longer need to worry about placing all the required class files in your classpath. All you have to do is to include dependencies in your POM file and Maven takes care of the rest. It automatically downloads the jar file that your project depends on and include them in your build classpath. But what if you want to include a jar file that is not available from Maven repositories? To include such jar files you will have to manually install the jar into your local maven repository. Let say you need Oracle driver which is included in ojdbc14.jar. Download the jar file from Oracle and then execute following command.

C:\>mvn install:install-file -Dfile=ojdbc14.jar -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0 -Dpackaging=jar

Then add this dependency to your project POM file.


      com.oracle
      ojdbc14
      10.2.0
      compile

	


Now when you build your project ojdb14.jar will be available.

You can follow the same steps for your own jar files. For example if you have created a jar file (e.g. utils.jar) of helper classes and need that jar file in some other project you will first install the jar to your repository and then add the dependency in your POM file.

C:\>mvn install:install-file -Dfile=utils.jar -DgroupId=com.zparacha.example -DartifactId=utils -Dversion=1.0 -Dpackaging=jar

And the dependency for your POM will be like


      com.zparacha.example
      utils
      1.0.0
      compile

And all the class files will become available to your project.
Enjoy.

article clipper vert How to add external jar files to Maven project POM
 

WordPress 2.6 now available.

1 Comment

Yesterday the WordPress team released WordPress version 2.6 ahead of schedule.
While you will not notice any major visual changes in this release from WordPress 2.5 but there are some significant security enhancements and bug fixes. Other features that many bloggers will like include

  • Press This!: Post from wherever you are on the web
  • Post Revisions: Wiki-like tracking of edits
  • Shift Gears: Turbo-speed your blogging
  • Theme Previews: See it before your audience does
  • Image captions, so you can add sweet captions like Political Ticker does under your images.
  • Stronger better faster versions of TinyMCE, jQuery, and jQuery UI.
  • Bulk management of plugins.
  • A completely revamped image control to allow for easier inserting, floating, and resizing. It’s now fully integrated with the WYSIWYG.
  • and more.

You can visit WordPress blog for additional information. Or you can see the official tour video right here.

There are many cool features and bug fixes so I recommend that you upgrade to WordPress 2.6.

article clipper vert WordPress 2.6 now available.
 

Entrecard reaches to new heights with comments

No Comments

Today Entrecard announced a partnership with SezWho.

SezWho is a universal profile service for the social web that improves community engagement and enables content discovery to be added to blogs, forums, message boards and other social sites.

By partnering with SezWho, Entrecard team is providing yet another incentive for bloggers to leave meaningful comments on other blogs. Not just “nice post” or “I agree” but real insightful comments that add to the discussion. They will get from 1 to 10 Entrecard credits for each comment based on the quality of the comment. By providing valuable comments the visitor will not only get the Entrecard credits but they will be promoting their ideas that in turn generate traffic on their own blogs.


It is definitely a win-win situation for bloggers and their visitors. For bloggers more comments on their posts will indicate an active community and may attract more visitors. The commentators will get the Entrecard credits along with the opportunity to send more visitors to their own blogs.

So what are you waiting for? If you are a blogger sign up for Entrecard today.

article clipper vert Entrecard reaches to new heights with comments
 

Create awesome 3D photo gallery with TiltViewer

3 Comments

Last week I got a project to create a slideshow for a website. My first choice was to go with famous and somewhat ubiquitous LightBox. I actually started creating the slideshow using LightBox but then I thought there must be some other alternative. I am not saying LightBox is not good it’s just too common. So I started searching for LightBox alternatives and I found several other slideshow generators. But the one that stood out from the pack was TiltViewer.

TiltViewer is a free, customizable 3D Flash image viewing application. TiltViewer presents your photos in a modern and attractive style. Rather than sequentially displaying images TiltViewer allows your visitors to interact with your images. It almost gives life to your photos. User can zoom in and out of the photos or flip them to view more information about the images.
More

article clipper vert Create awesome 3D photo gallery with TiltViewer
 

Comprehensive list of resources for web developers.

3 Comments

Last week I started compiling a list of useful resources containing tips, tricks and tutorials for web developers. During my research for the post I came across this wonderful post at BlogWell.

After reading the post I abandoned my own post because I think this post provides a comprehensive list of resources from online code examples to tutorials and online tools. So instead of repeating same content I decided to just link to BlogWell post. I hope you will find that list useful. I’ve bookmarked it for future reference.
Enjoy.

article clipper vert Comprehensive list of resources for web developers.
 

Print large string in PL/SQL.

No Comments

For PL/SQL developers put_line is a quite useful method. I use it for logging purposes. Recently I found out that the method has an annoying limitation. You cannot print more than 255 characters per line!
Now that is a strange feature. I don’t know what is the reasoning behind this restriction but it does make this method somewhat risky to use. Because if you use put_line to log a string more than 255 characters long it will raise an exception and you program might fail. Unless you catch the exception and continue on with your flow. Obviously no good programmer would want the trouble of adding exception handling code for such a mundane task as logging. So far I have not found an alternative method to print out large string in PL/SQL but I came up with a work around.
I created a little procedure to print large string.



Here is the method. More

article clipper vert Print large string in PL/SQL.