views:

39

answers:

0

Trying to create a Maven PHP project (just test) for Sonar

  1. Generated empty project with

    mvn archetype:generate -DarchetypeGroupId=org.phpmaven -DarchetypeArtifactId=php5-web-archetype -DarchetypeVersion=1.0 -DgroupId=org.sample -Dartifact=my-app

  2. Then trying to compile empty test project with

    mvn clean compile -e

And get an error

[ERROR] BUILD ERROR

[INFO] Execution of php failed. Maybe the php.exe is not in path



What path do I need to fix? "php" command is accessible with terminal.

Or I made something wrong with project ?



System info

$ mvn --version
Apache Maven 2.2.1 (rdebian-1)
Java version: 1.6.0_18
Java home: /usr/lib/jvm/java-6-openjdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-24-generic" arch: "i386" Family: "unix"



Full error info

 xxx@xxx-desktop:/var/www/MavenTest/wf-project$ mvn clean compile -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Sample PHP 5 web project
[INFO]    task-segment: [clean, compile]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting file set: /var/www/MavenTest/wf-project/target (included: [**], excluded: [])
[INFO] [plugin:descriptor {execution: default-descriptor}]
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /var/www/MavenTest/wf-project/src/main/resources
[INFO] [php:php-validate {execution: default-php-validate}]
[ERROR] Error while execution php -v
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
 comandLine:0

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Execution of php failed. Maybe the php.exe is not in path 

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Execution of php failed. Maybe the php.exe is not in path 

 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
 at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:616)
 at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
 at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
 at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
 at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Execution of php failed. Maybe the php.exe is not in path 

 at org.phpmaven.plugin.build.PhpValidate.execute(PhpValidate.java:76)
 at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
 ... 17 more
Caused by: org.phpmaven.plugin.build.MuilplePhpCompileException: Execution of php failed. Maybe the php.exe is not in path 

 at org.phpmaven.plugin.build.AbstractPhpCompile.goRecursiveAndCall(AbstractPhpCompile.java:350)
 at org.phpmaven.plugin.build.PhpValidate.execute(PhpValidate.java:74)
 ... 19 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Mon Aug 02 16:23:34 EEST 2010
[INFO] Final Memory: 17M/264M
[INFO] ------------------------------------------------------------------------



POM.XML contents - http://pastebin.com/V8AaPCwH