Sources are available for checkout from the svn repository. Please review instructions under page Source Repository.


PerfectJPattern sources are separated in different sub-modules:

  • perfectjpattern-api: Contains pure API interface definitions for all design patterns. The intention is to have the client code depending as solely as possible from the API module rather than the core implementation. There are other reasons for the separation e.g. the API does not have any dependencies to e.g. Apache commons or Junit
  • perfectjpattern-core: Provides implementation for all the API interfaces implementing the core patterns as well as concurrency pattern implementations and design pattern gadget extensions.
  • perfectjpattern-jee: Provides implementation for all the API interfaces corresponding to JEE-specific patterns e.g. Pure JPA DAO, Service Locator etc.
  • perfectjpattern-hibernate: Provides extended Hibernate based Generic DAO implementation.
  • perfectjpattern-spring: Provides extended Spring based Generic DAO implementation.
  • perfectjpattern-examples: Provides example code for all patterns implemented including those core and jee modules.

Building with Maven

Building the resources requires installing and configuring the latest version of Maven 2 and running the following command:

  • For Windows systems use: $ %PERFECTJPATTERN_HOME%\build.bat
  • For Unix systems use: $ $PERFECTJPATTERN_HOME/

These scripts include most of the options I regularly use while building, there are some configuration profiles e.g. ydoc I only include in my Maven local settings.xml. Users may modify these scripts to remove the activation of the ydoc generation profile.

Creating Eclipse project

Creating an Eclipse Project requires Maven 2 properly installed. Then you may either download PerfectJPattern source distributions from sourceforge or checkout the project from the Subversion repository as explained above.

Then execute the following command in the directory where the pom.xml is located:
mvn eclipse:eclipse

Please note that if you download API source alone and try to create the Eclipse project from the parent pom.xml it will fail. This is because the API source distribution does not include Core source distribution. You need to cd under perfectjpattern-api and run the command from there.

When all project files are generated then you may import them into Eclipse.


If you download the binary jar files directly from sourceforge you will also need to get all dependencies yourself e.g. PerfectJPattern Core depends on Apache Commons Lang. Please check under "Project Reports" for each project the dependency reports for an exhaustive list of all its dependencies and pointers to the location where to get them.