Hi @all,
I want to use the current PHPUnit Version 3.6.7 as dependency in my Testproject and just followed the instructions at
http://www.php-maven.org/tut-add3partylibs.html But getting the tar from
http://pear.phpunit.de/get/PHPUnit-3.6.7.tar and installing it successfully to my local repo from zip leads to following error while executing "mvn package":
[ERROR] Failed to execute goal org.phpmaven:maven-php-plugin:1.1:phpunit (default-phpunit) on project my-php-lib: ~/Develop/php/org.sample.my-php-lib/target/phpinc/PHPUnit/Autoload.php (No such file or directory) -> [Help 1]
So I compared the size of both jar's (3.3.9 and 3.6.7) in my local repo and discovered that the new jar file is smaller:
-rw-r--r-- 1 721386 2011-10-19 20:56 phpunit5-3.3.9.jar
-rw-r--r-- 1 284683 2012-01-16 14:30 phpunit5-3.6.7.jar
I guess the new (generated) jar doesn't include all required dependencies, so the way to install as it's described doesn't work for me.
In a second try I used the PHPUnit folder at /usr/share/php/PHPUnit which is the one of the PEAR installed version and zipped that one for installation as 3rd party lib. This generated jar has a similar size to the 3.3.9 jar...
-rw-r--r-- 1
720377 2012-01-16 14:41 phpunit5-3.6.7.jar
Unfortunely this version doesn't work either. Updateing the dependency in my project's pom.xml leads to the following error now:
[ERROR] Failed to execute goal org.phpmaven:maven-php-plugin:1.1:phpunit (default-phpunit) on project my-php-lib: [ERROR] PHP Fatal error: Class 'PHPUnit_Runner_BaseTestRunner' not found in ~/Develop/php/org.sample.my-php-lib/target/phpinc/PHPUnit/TextUI/TestRunner.php on line 60PHP Stack trace:PHP 1. {main}() ~/Develop/php/org.sample.my-php-lib/target/phpinc/PHPUnit/TextUI/Maven.php:0PHP 2. require_once() ~/Develop/php/org.sample.my-php-lib/target/phpinc/PHPUnit/TextUI/Maven.php:5 in [ERROR] File: [ERROR] ~/Develop/php/org.sample.my-php-lib/src/test/php/org/sample/AppTest.php [ERROR] Command: [ERROR] php -d include_path=":~/Develop/php/org.sample.my-php-lib/src/main/php:~/Develop/php/org.sample.my-php-lib//src/test/php:~/Develop/php/org.sample.my-php-lib/target/phpinc:~/Develop/php/org.sample.my-php-lib/src/test/php/org/sample:~/Develop/php/org.sample.my-php-lib/target/test-classes:~/Develop/php/org.sample.my-php-lib/target/classes:" "~/Develop/php/org.sample.my-php-lib/target/phpinc/PHPUnit/TextUI/Maven.php" "~/Develop/php/org.sample.my-php-lib/src/test/php/org/sample/AppTest.php" "~/Develop/php/org.sample.my-php-lib/target/surefire-reports/AppTest.xml"+
I'm still on my former setup: Ubuntu 10.10, maven 3.0.3, Java 1.6.0_24, PHP 5.3.3
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100) Maven home: /opt/apache-maven-3.0.3 Java version: 1.6.0_24, vendor: Sun Microsystems Inc. Java home: /usr/lib/jvm/java-6-sun-1.6.0.24/jre Default locale: de_DE, platform encoding: UTF-8 OS name: "linux", version: "2.6.35-30-generic", arch: "amd64", family: "unix"
PHP 5.3.3-1ubuntu9.7 with Suhosin-Patch (cli) (built: Dec 13 2011 17:53:00) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Xdebug v2.1.2, Copyright (c) 2002-2011, by Derick Rethans
Any suggestions? Thanks in advance.