Archive

Posts Tagged ‘Apache’

Subversion, Apache Server, Subclipse installation & configuration

May 24, 2010 1 comment

 

Ever wanted to have a code repository of your own? Either working on a small project or working with your friends on the next big thing, it would be great to have a repository where you can maintain your code, just as you would while working at your office. Lot of you might have been using version controls at workplaces such as CVS, VSS etc. Many will have an urge to maintain their homework using a version control mechanism. But is it all that easy? Well, it isn’t a one-go shot for a starter. Here is this post throwing light on how precisely to do that.

For beginners, probably the only thing relatable is the name of the version control alone, but how to get it, how to install it, how to configure it and then how to use it, will all be things to follow. There are many open-source free version controls available, do explore their features and chose the one best for you. This post though specifically guides your way through installing and configuring Subversion. Before reading the rest of the post, it would be helpful to get into a primer about subversion / subversion client / using subversion locally/ using subversion remotely etc. For a comprehensive look into subversion, read it hereSubversion  is a small and simple enough version control to run on a development machine to give a full-fledged source code control. You can get down and dirty by manually installing and configuring subversion like many others who have shed enough time doing it manually starting with downloading subversion here.

 

Manual Download/Installation/Configuration of subversion:

Here are the list of few links that should help get started with manually installing and configuring subversion:

Read more…

Ant Primer

September 12, 2009 Leave a comment

 

 

apache ant 

 

Ant Origin:

Ant was conceived by James Duncan Davidson while turning a product from Sun into open source. That product, Sun’s reference JSP/Servlet engine, later became Apache Tomcat. A proprietary version of Make was used to build it on the Solaris Operating Environment, but in the open source world there was no way of controlling which platform was used to build Tomcat. Ant was created as a simple platform-independent tool to build Tomcat from directives in an XML “build file”. From this humble beginning, the tool has gone on to become more widespread than the Tomcat product for which it was created. Ant (version 1.1) was officially released as a stand-alone product on July 19, 2000. Today, Ant is the build tool used by most Java development projects. Most open source developers include build.xml files with their distribution.

 

Ant Introduction:

In recent years, Open Source tool Ant has become the de facto standard for building Java projects. Like its venerable ancestor Make, Ant controls the steps necessary to compile, package, and arrange the files that make up your development project. Built with Java, Ant has been designed to be easy to use, flexible, and platform independent.

Apache Ant is an Apache Jakarta project. It is open source software, and is released under the Apache Software License. It is a java-based tool for automating software build processes. It is similar to Make but is implemented using the Java language, requires the Java platform, and is best suited to building Java projects. The most immediately noticeable difference between Ant and Make is that, Ant uses XML to describe the build process and its dependencies, whereas Make has its Makefile format. By default the XML file is named build.xml.

All modern Java IDEs integrate with it, most open-source Java projects use it. If you are developing Java software and not using Ant, then chances are you’re doing things the hard way. It’s relatively easy to craft an Ant build file by cutting and pasting pieces from other build files, but we don’t want to get into a situation where maintaining the build process is a full-time job. It is important to understand Ant’s capabilities in order to avoid hacking build files. By understanding Ant’s basic data types, syntax, and properties and applying some simple best practice techniques, the build process can be easily controlled, extended, and reused.

ANT enables you to automate the build deploy process of your server-side Java Web components as well, such as custom tags, servlets, and JSPs. Ant gets its cross-platform support by relying on Java for file access, compilation, and other tasks. Ant is extensible through its support for scripting (Jython and NetRexx, among others), Java custom tasks, and the ability to call OS commands, executables, and shell scripts via an Ant exec task (normally a lastresort measure). Ant makes continuous integration possible for server-side components with its automated build script and integration with JUnit, a unit-testing framework for Java. Read more…

Why Ant?

September 11, 2009 Leave a comment

 

 

Imagine that you are working on a large project. The project is a Java project and consists of many .java files. It consists of classes that are dependent on other classes and classes which are stubs or drivers, they are situated in multiple directories and the output files must go into multiple directories too. Suppose you have to perform obvious operations with the .java files as:-

  • Compile the .java files.
  • Put the .class files in a directory.
  • Put the .class files in a .jar.
  • Put all the html/jsp/css and other web files in one directory and package them in .war
  • Package all the third party libraries and dependancies into another .jar
  • Package all the .jars, .wars into .ears for deployment
  • Clean all the directories before every use so that you get fresh compiled versions or packaged structures.

Suppose you are coordinating all of this manually or using some other build utility which doesn’t do what you want it to (which is automate it exactly), then many hours are spent changing directories compiling individual files and so on. All these above operations fall under building and/or deploying a project. Now, imagine if there was a tool that could alleviate the stress and hassle you are experiencing and automate the complete process. Such a tool exists and its called ANT. Before Ant, building and deploying Java applications required a hodgepodge of platform-specific scripts, makefiles, proprietary IDEs, or manual processes. Now, nearly every open source Java project uses Ant. A great number of companies use Ant for internal projects as well.

Ant (originally an acronym for Another Neat Tool), is a java-based build tool with special support for the Java programming language but can be used for just about everything. In theory, it is kind of like make, without make‘s wrinkles. Ant automates software build processes. It is similar to Make but is implemented using the Java language, requires the Java platform, and is best suited to build Java projects.

 

Few of Ant’s features:

  • Ant is platform-independent and hence Cross-platform.
  • It is written purely in Java.
  • Ant is particularly good at automating complicated repetitive tasks and thus is well suited for automating standardised build processes.
  • Ant accepts instructions in the form of XML documents thus is extensible and easy to maintain.
  • More popular than ‘make’ for building Java projects
  • Updated and improved regularly
  • Straightforward XML syntax
  • Plug-in oriented architecture encourages expansion
  • Directly supported by some IDEs (with more coming)
  • Free and open source Read more…
Categories: Why Ant? Tags: , , , ,

Ant Installation & Configuration

  

  

At the time of this post, the latest stable version available form Apache is 1.7. Older releases of Ant can be found here. Old releases are only provided as zip archives that can be extracted by jar xf archive.zip. Its highly recommend to not use old releases but upgrade to Ant’s latest release.

Ant 1.5.4 is the last release that supports JDK 1.1, Ant 1.6.0 onwards requires JDK 1.2 or later. There will be no other compatibility issues with Java versions otherwise. Current version of Ant i.e., 1.7, requires JDK version 1.2 or later, 1.5 or later is strongly recommended. Latest the version of Java is, the more Ant tasks you get. If a JDK is not present, and only JRE is present, then many tasks will not work.

  

Follow the steps below to download, install and configure Ant : Read more…