Skip to main content

Posts

Velocity based static website generation under Maven2

For several times I went into the situation where I need to seriously decorate a Maven2 generated website, and a more powerful and scriptable way of writing page content than APT and XDOC is required. CSS can do some decoration work and a customized master velocity layout for maven-site-plugin gives me full control of the template. But still, APT and XDOC are limited as a script language to write content. Velocity content may be ideal. The idea is rendering Velocity template in a way similar to VelocityLayoutServlet and Apache Turbine , which is merging context with velocity template for content body, then put the body into another layout Velocity template. This work can be done within a maven2 goal easily. In existing arapaho-maven-plugin project, I created flatsite mojo to do this Velocity based static website generation. It's basically a one class deal so I didn't make it a standalone maven2 plugin. It's not a maven2 report, it's a simplified version of maven-site-...

"Couselist" demo site backs to business

"courselist" ( http://www.cyclopsgroup.org/projects/courselist ) is an academic small project done by several students in University of Texas at Dallas, back in 2004. It was built on top of waterview and tornado project hosted in cyclopsgroup.org and using commons-jelly as UI rendering tool, hibernate as persistence layer and plexus/avalon as IOC container. The project hasn't be touched in the last two years. I recently found it out and turn it on at http://demo.cyclopsgroup.org/courselist during the domain change. Many thanks to Chris Menken, Javis Cline, John Christin and Josh Allen.

Seattle Sunset: 4th Ave.

Taken on Dec 31, 2006

Run/Debug java webapp without packaging/deploying it with Jetty and under Maven2

Goals As the title mentioned, run(with maven2 command or in IDE)/debug(in IDE) java webapp without packaging the war file, installing/configuring any appserver like tomcat or deploying your code to anywhere. The practice will be "compile and run". Why Jetty ? Jetty is a lightweight, flexible and embeddable Java servlet container. It's so flexible that it can even start servicing a webapp directly from given classpath and a web.xml file without assembling them into a standard webapp. Step by step Introduce several dependencies into you pom file. This is required whatsoever if you want to run/debug jetty in IDE and make sure the servlet-api, xercesImpl and java tools.jar(if you want to run JSP) are in dependency list. <dependency> <groupId>jetty</groupId> <artifactId>org.mortbay.jetty</artifactId> <version>5.1.10</version> <scope>runtime</scope> </dependency> <dependency> <groupId>jetty</gr...

Simplify Avalon components development by switching to plexus

Avalon vs. PicoContainer or Spring Looking for the best IoC container is not the purpose of this article. Well... there is no "the best" without conditions, which means the answer varies according to the project you are working on. Personally I found Avalon useful in several projects where the requirement and scope is extremely uncertain. PicoContainer project has an article which outlines the difference between several popular ways of containing components (not necessarily IoC containers). In general, comparing to the other options, Avalon depicts the lifecycle of a component elegantly and meticulously. And the compensation is to require the code to depend on its framework API. Headache of Avalon? Simplified version of Avalon container that costs you less, Plexus Assume you decide to take what Avalon requires and build the application on top Avalon API as I have done, the headache coming along is usally about: Maintain endless XML meta files for each componenent Bu...