Wednesday, 18 July 2007

Ant Syntax

Projects
1) name: project name
2)default: the default target to use when no target is supplied.
3)basedir: the base directory from which all path calculation are done.

Targets
A target is a set of tasks that you want to be executed.
A Target can depend on other targets.

It should be noted that Ant's depends attributes only specifies the order in which targets should be executed, it does not affect whether the target that specifies the dependency gets executed if the dependent target did not run. Keep in mind that a target can get executed earlier when an earlier target depends on it.


Path-like Structures:
1)Path-type reference have attributes path and location
2)ClassPath reference have attributes classpath and location

Tasks
A task is a piece of code that can be executed, which may have multiple attributes (or arguments). The value of an attribute might contain reference to a property. properties should be defined prior to tasks.

Property
A property has a name and a value; the name is case-sensitive. Properties may be used in the value of task attributes. This is done by placing the property name between "${" amd "}" in the attribute value.

Static imports in Java 5

Java 5 added an import static option that allows static variables (typically constants) to be referenced without qualifying them with a class name. For example, after import static java.awt.Color;
It would then be possible to write Color background = RED;
instead of Color background = Color.RED;
Adding this "feature" wasn't the best idea because it leads to name pollution and confusion about which class constants come from. Even Sun (see References below) basically advises not to use it!

Can Jackson Deserialize Java Time ZonedDateTime

Yes, but must include JSR310. Thus ZonedDateTime can be deserialized directly from JSON response to POJO field. <dependency> <g...