You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Alexander Hars <do...@inventivio.com> on 2006/09/11 15:05:11 UTC

PHP and Maven2?

Hi,

Is anybody using Maven2 for a PHP project? Are there any best practices 
to start out with (e.g. directory layout etc.)?
I would like to use Maven for a new PHP project but all I found so far 
was a Php Plugin for Maven1.

Thanks,

 Alexander



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: PHP and Maven2?

Posted by Doug Douglass <do...@gmail.com>.
Alexander,

Maybe you found the PHP plugins for maven 1 I developed at my previous
company[1]? Unfortunately, it appears they haven't been updated since I
left. All of the plugins were simply command-line wrappers around PHP,
usually building a temporary PHP script to be executed. Such capability
should be fairly easy to move into a Mojo using either the plexus command
line component/wrapper or ant.

As for best practices, the project for which those plugins were written was
using the Mojavi MVC framework (I think it's now merged with Agavi, very
nice IMHO). Mojavi, like Rails (also very nice IMHO), has a specific
application directory layout that nicely facilitates in-place development (
i.e., edit the source, hit refresh in your browser to see your changes), but
we continually found in-place webapp development to only work for the
simplest of applications. Instead, we chose to use the standard maven
directories (i.e., src/main/php, src/test/php, src/main/webapp) and used the
plugins to build the required application layout via configuration. Yes this
is a "more traditional" edit-build cycle and does take longer than in-place
edits, if only by seconds, but we were also filtering resources and
extracting dependencies (i.e., javascript, images, php) into the target
application, so the build step was required. Plus, building required running
the unit tests (via SimpleTest in our case, again, very nice IMHO) which is
A Good Thing.

HTH,
Doug

[1] http://projects.denverdata.com/maven/plugins


On 9/11/06, Alexander Hars < do.not.reply@inventivio.com> wrote:
>
> Hi,
>
> Is anybody using Maven2 for a PHP project? Are there any best practices
> to start out with (e.g. directory layout etc.)?
> I would like to use Maven for a new PHP project but all I found so far
> was a Php Plugin for Maven1.
>
> Thanks,
>
> Alexander
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>