I've moved things around so everything is close to where you'd expect things to be in the Maven standard directory layout if Maven had explicit support for PHP. Changed the copyright notices to license notices and fixed up tabs and line endings.

To "build", install a command-line php and pear (likely using your OS's package manager), phpunit and phpdoc (likely using Pear), JDK 1.4 or later, and Maven 2.0.6. The Maven project descriptor (pom.xml) defers an Ant build file (build.xml) to run the PHP executables. build.xml is not intended to be used independently.

mvn compile   - runs php -l on everything in src/main/php
mvn test-compile - previous plus runs php -l on src/test/php and src/ examples/php mvn test - previous plus runs phpunit src/test/php/AllTests and php on everything in src/examples/php mvn site - previous plus generates HTML content and phpdoc (home page in target/site/index.html) mvn site assembly:assembly - previous plus generates distribution .tar.gz and .zip files in target directory.

There are a few things that should be moved around, but require corresponding changes to the tests:

src/examples/php/*.properties and src/examples/php/*.xml should be moved to src/examples/resources and configure files in src/test/php should be moved to src/test/resources.

working directory for phpunit tests should be changed to "target" (best not to write anything to source directories)

I had to build php from source since phpunit required a later PHP than provided with Ubuntu 6.06-1. I'd like to start with an pre- configured VMWare appliance (http://www.vmware.com/vmtn/appliances/) as a standard build environment. I've been using Ubuntu 6.06-1 for log4j and log4cxx, but maybe log4php should start with something a little different to avoid having to build PHP from source.

When I tried building on Mac OS/X using MAMP, phpunit and phpdoc would both result in "Command not found", though I had placed / Applications/MAMP/bin/php5/bin on the path and was executing the MAMP version of php.




Reply via email to