URGENT : Cannot complete the install because some dependencies are not satisfiable org.phpmaven.eclipse.feature.feature.group [2.0.0.201111111508] cannot be installed in this environment because its filter is not applicable

1,484 views
Skip to first unread message

Ryan RAJKOMAR

unread,
Jan 30, 2012, 5:29:04 PM1/30/12
to Maven for PHP
Can anyone help me ?
As mentioned in a earlier post which nobody even deigned to reply to,
I've followed every step of the isntallation process of maven and
maven for php, installed all required dependencies ( phpdoc, doxygen,
etc.) and I still cannot get the eclipse integration to work !!!!

I really would like to start using maven with php so PLEASE can anyone
at least give me a hint on where to start!

Michel MAIER

unread,
Jan 31, 2012, 3:29:01 AM1/31/12
to Maven for PHP
Hi Ryan,

Have you tried Maven commands from the command line? I get errors when
I run mvn package to a web-app (even simple). Does it work with you?
I feel the project is on stand by.

I sent an email to the contributor but I did'nt get answer.

Ryan RAJKOMAR

unread,
Feb 2, 2012, 4:22:09 AM2/2/12
to Maven for PHP
Hi,
Sorry it took me a while to answer.
I meant to do it a few days eerlier but didn't get any time to do so.
I'll try whenever I get the chance.
My issue was really with the eclipse plugin integration because if it
doesn't work I don't think I'll be using maven for php anyway.
Thanks for the reply though.

mepeisen

unread,
Feb 5, 2012, 7:18:37 PM2/5/12
to Maven for PHP
Can you paste the complete error log from eclipse?
Or is it mac related?
The next version will be removed filters. So it should be installable
on all environments.

mepeisen

unread,
Feb 6, 2012, 4:16:03 AM2/6/12
to Maven for PHP
Please retry with php-maven for eclipse 2.0.1.

Ryan RAJKOMAR

unread,
Feb 10, 2012, 6:55:07 AM2/10/12
to Maven for PHP
Hi,
sorry it took me a while to reply ( I didn't get the posts by mail :s)
Just tried isntalling the eclispe plugin again. It went all the way
throught the installation process.
I'll give it a try ASAP. Most likely this evening.
Then I'll post all my comments.

BTW : quick question, on the website's tutorials, the zend version
used for the demo is not the latest. Will it still work with the
latest ? Is there a maven plugin for the latest version 1.11.11?

Thanks a lot.

Ryan RAJKOMAR

unread,
Feb 10, 2012, 6:59:17 AM2/10/12
to Maven for PHP
Note: Just gave a quick try to create a project : The Maven PHP Option
is not displayed in the new Project Window.

P.S. : I'm using Eclispe on windows so I wouldn't know about mac
related issues. sorry.

On 6 fév, 10:16, mepeisen <martin.eisenga...@googlemail.com> wrote:

martin.eisengardt

unread,
Feb 10, 2012, 7:45:23 AM2/10/12
to maven-...@googlegroups.com
I will review it this weekend.
There is another option. Create a php project. Right click on it and there should be a menu option to covert it to a php-maven project.

--
You received this message because you are subscribed to the Google Groups "Maven for PHP" group.
To post to this group, send email to maven-...@googlegroups.com.
To unsubscribe from this group, send email to maven-for-ph...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/maven-for-php?hl=en.


Ryan RAJKOMAR

unread,
Feb 13, 2012, 6:58:16 AM2/13/12
to Maven for PHP
Ok. Thanks.
I've just tried creating and installing a php web project using
eclipse IDE and the mvn CLI.
I can't work run the mvn install command without errors :

In Eclipse, it seems the maven-php-plugin can't find my php install
(I've defined it in the System path and the eclipse pdt preferences).
I can use it in CLI and it works...

In the CLI, mvn install throws this error :
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-
plugin:2.3:single (bundle-project-sources) on project test: Execution
bundle-pr
oject-sources of goal org.apache.maven.plugins:maven-assembly-plugin:
2.3:single failed: An API incompatibility was encountered while
executing org.apa
che.maven.plugins:maven-assembly-plugin:2.3:single:
java.lang.NoSuchMethodError:
org.codehaus.plexus.util.cli.CommandLineUtils.getSystemEnvVars(Z)Ljav
a/util/Properties;


On 10 fév, 13:45, "martin.eisengardt"
<martin.eisenga...@googlemail.com> wrote:
> I will review it this weekend.
> There is another option. Create a php project. Right click on it and there
> should be a menu option to covert it to a php-maven project.
>

martin.eisengardt

unread,
Feb 13, 2012, 7:23:48 AM2/13/12
to maven-...@googlegroups.com
Thats somehow strange.
 
Please contact me via skype chat. Skype-name: martin.eisengardt. I will have a closer look on your project.
The error should never happen in php-maven 2.0

Ryan RAJKOMAR

unread,
Feb 13, 2012, 8:26:57 AM2/13/12
to Maven for PHP
The project is fairly simple ( just a test run) : No actual code only
the pom configuration

:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://
maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.testsample</groupId>
<artifactId>test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>php</packaging>
<name>Sampl php-maven project</name>
<description>The generic parent pom for php projects</description>

<build>
<sourceDirectory>${basedir}/src</sourceDirectory>
<testSourceDirectory>${basedir}/src/test</testSourceDirectory>
<resources>
<resource>
<directory>${basedir}/src/conf/${environment}</
directory>
</resource>
<!-- <resource> -->
<!-- <directory>${basedir}/src/main/resources</
directory> -->
<!-- </resource> -->
</resources>
<plugins>
<plugin>
<groupId>org.phpmaven</groupId>
<artifactId>maven-php-plugin</artifactId>
<extensions>true</extensions>
</plugin>

<!-- The web assembly -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<dependencies>
<dependency>
<groupId>org.phpmaven</groupId>
<artifactId>maven-php-plugin</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>bundle-project-sources</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptorRefs>
<descriptorRef>php-webapp</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0</version>
<configuration>
<reportPlugins>
<plugin>
<groupId>org.phpmaven</groupId>
<artifactId>maven-php-plugin</artifactId>
<reportSets>
<reportSet>
<reports>
<report>phpdocumentor</report>
<report>phpunit-coverage</
report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</
groupId>
<artifactId>maven-surefire-report-plugin</
artifactId>
<version>2.10</version>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</reportPlugins>
</configuration>
</plugin>
</plugins>
</build>

<properties>
<project.build.sourceEncoding>UTF-8</
project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>org.phpunit</groupId>
<artifactId>phpunit5</artifactId>
<version>3.6.10</version>
<type>pear</type>
</dependency>
<dependency>
<groupId>com.zend.framework</groupId>
<artifactId>framework</artifactId>
<version>1.11.11</version>
<type>php</type>
</dependency>
</dependencies>
</project>

On 13 fév, 13:23, "martin.eisengardt"
<martin.eisenga...@googlemail.com> wrote:
> Thats somehow strange.
>
> Please contact me via skype chat. Skype-name: martin.eisengardt. I will
> have a closer look on your project.
> The error should never happen in php-maven 2.0
>

Ryan RAJKOMAR

unread,
Feb 13, 2012, 8:43:01 AM2/13/12
to Maven for PHP
P.S. : The effective pom view

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://
maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.testsample</groupId>
<artifactId>test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>php</packaging>
<name>Sampl php-maven project</name>
<description>The generic parent pom for php projects</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.phpunit</groupId>
<artifactId>phpunit5</artifactId>
<version>3.6.10</version>
<type>pear</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.zend.framework</groupId>
<artifactId>framework</artifactId>
<version>1.11.11</version>
<type>php</type>
<scope>compile</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<releases>
<enabled>true</enabled>
</releases>
<id>release-repo1.php-maven.org</id>
<name>PHP-Maven 2 Release Repository</name>
<url>http://repos.xworlds.org/releases</url>
</repository>
<repository>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>snapshot-repo1.php-maven.org</id>
<name>PHP-Maven 2 Snapshot Repository</name>
<url>http://repos.xworlds.org/snapshots</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Maven Repository Switchboard</name>
<url>http://repo1.maven.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<enabled>true</enabled>
</releases>
<id>release-repo1.php-maven.org</id>
<name>PHP-Maven 2 Release Repository</name>
<url>http://repos.xworlds.org/releases</url>
</pluginRepository>
<pluginRepository>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>snapshot-repo1.php-maven.org</id>
<name>PHP-Maven 2 Snapshot Repository</name>
<url>http://repos.xworlds.org/snapshots</url>
</pluginRepository>
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Maven Plugin Repository</name>
<url>http://repo1.maven.org/maven2</url>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory>C:\svnPHP\test\src</sourceDirectory>
<scriptSourceDirectory>C:\svnPHP\test\src\main\scripts</
scriptSourceDirectory>
<testSourceDirectory>C:\svnPHP\test\src\test</testSourceDirectory>
<outputDirectory>C:\svnPHP\test\target\classes</outputDirectory>
<testOutputDirectory>C:\svnPHP\test\target\test-classes</
testOutputDirectory>
<resources>
<resource>
<directory>C:\svnPHP\test\src\conf\${environment}</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>C:\svnPHP\test\src\test\resources</directory>
</testResource>
</testResources>
<directory>C:\svnPHP\test\target</directory>
<finalName>test-0.0.1-SNAPSHOT</finalName>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.phpmaven</groupId>
<artifactId>maven-php-plugin</artifactId>
<version>2.0-SNAPSHOT</version>
<extensions>true</extensions>
<executions>
<execution>
<id>default-resources</id>
<phase>process-resources</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
<execution>
<id>default-test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
<execution>
<id>default-testResources</id>
<phase>process-test-resources</phase>
<goals>
<goal>testResources</goal>
</goals>
</execution>
<execution>
<id>default-phar</id>
<phase>package</phase>
<goals>
<goal>phar</goal>
</goals>
</execution>
<execution>
<id>default-set-sources</id>
<phase>pre-site</phase>
<goals>
<goal>set-sources</goal>
</goals>
</execution>
<execution>
<id>default-set-sources-1</id>
<phase>validate</phase>
<goals>
<goal>set-sources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>bundle-project-sources</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptorRefs>
<descriptorRef>php-webapp</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.phpmaven</groupId>
<artifactId>maven-php-plugin</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.0</version>
<executions>
<execution>
<id>default-site</id>
<phase>site</phase>
<goals>
<goal>site</goal>
</goals>
<configuration>
<reportPlugins>
<plugin>
<groupId>org.phpmaven</groupId>
<artifactId>maven-php-plugin</artifactId>
<reportSets>
<reportSet>
<reports>
<report>phpdocumentor</report>
<report>phpunit-coverage</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</
artifactId>
<version>2.10</version>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</reportPlugins>
</configuration>
</execution>
<execution>
<id>default-deploy</id>
<phase>site-deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<reportPlugins>
<plugin>
<groupId>org.phpmaven</groupId>
<artifactId>maven-php-plugin</artifactId>
<reportSets>
<reportSet>
<reports>
<report>phpdocumentor</report>
<report>phpunit-coverage</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</
artifactId>
<version>2.10</version>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</reportPlugins>
</configuration>
</execution>
</executions>
<configuration>
<reportPlugins>
<plugin>
<groupId>org.phpmaven</groupId>
<artifactId>maven-php-plugin</artifactId>
<reportSets>
<reportSet>
<reports>
<report>phpdocumentor</report>
<report>phpunit-coverage</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.10</version>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</reportPlugins>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<executions>
<execution>
<id>default-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<id>default-install</id>
<phase>install</phase>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>default-resources</id>
<phase>process-resources</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
<execution>
<id>default-testResources</id>
<phase>process-test-resources</phase>
<goals>
<goal>testResources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>2.9</version>
<executions>
<execution>
<id>default-addPluginArtifactMetadata</id>
<phase>package</phase>
<goals>
<goal>addPluginArtifactMetadata</goal>
</goals>
</execution>
<execution>
<id>default-descriptor</id>
<phase>generate-resources</phase>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<outputDirectory>C:\svnPHP\test\target\site</outputDirectory>
</reporting>
</project>


On 13 fév, 14:26, Ryan RAJKOMAR <ryan.rajko...@gmail.com> wrote:
> The project is fairly simple ( just a test run) : No actual code only
> the pom configuration
>
> :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://
> maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4.0.0.xsd">

martin.eisengardt

unread,
Feb 13, 2012, 9:33:51 AM2/13/12
to maven-...@googlegroups.com
ok, first of all ensure that you got the correct snapshot (2.0.0-SNAPSHOT-xxxxx-64).
You may delete the folder ~/.2/repository/org/phpmaven/maven-php-plugin so that maven will download the newest snapshot version.
 
Then please remove the whole assembly parts of your pom. There will be another way in the future building assemblies. However this seems to be a fragment of former days (and yes, I am currently reviewing the whole website).
 
I see that you are overrideing the folders. However this is possible but I would expect problems because you are mixing reources and class files (nested directories). That would need some more investigation to applie the original layout. However: You should devide the directory layout during development time and during runtime. That means: Place the library class within src/main/php, Place the Test case classes within src/test/php and place the additional resources in src/main/resources.
Maven (and php maven) will merge all files in target/classes (target/test-classes).
 
Visiting http://framework.zend.com/manual/1.11/en/project-structure.project.html you can assume the following directory layout within your maven project:
src/main/php/application/controllers...
src/main/php/application/forms...
src/main/php/application/layouts...
src/main/php/application/models...
src/main/php/application/modules...
src/main/php/application/services...
src/main/php/application/views...
src/main/php/application/Bootstrap.php
src/main/php/library...
src/main/php/public/index.php
src/main/php/scripts/...
 
src/main/resources/application/configs/static.ini
src/main/resources/application/data/...
src/main/resources/docs/...
src/main/resources/application/data/...
src/main/resources/public/...
 
src/main/test/tests
 
src/conf/Development/application/configs/application.ini
src/conf/Production/resources/application/configs/application.ini
 
To enable a configuration by name you could add a property within your pom. Using command line "mvn -Dzend.environment=Development" could choose the development environment.
 
 
 
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://

  <modelVersion>4.0.0</modelVersion>
  <groupId>org.testsample</groupId>
  <artifactId>test</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>php</packaging>
  <name>Sampl php-maven project</name>
  <description>The generic parent pom for php projects</description>
  <properties>
    <zend.environment>production</zend.environment>
  </properties>
    <build>
        <resources>
              <resource>
                  <directory>${basedir}/src/conf/${zend.environment}</directory>
              </resource>
               <resource>
                   <directory>${basedir}/src/main/resources
               </resource>

         </resources>
        <plugins>
            <plugin>
                <groupId>org.phpmaven</groupId>
                <artifactId>maven-php-plugin</artifactId>
                <version>2.0-SNAPSHOT</version>
                <extensions>true</extensions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <reportPlugins>
                        <plugin>
                            <groupId>org.phpmaven</groupId>
                            <artifactId>maven-php-plugin</artifactId>
                            <reportSets>
                                <reportSet>
                                    <reports>
                                        <report>phpdocumentor</report>
                                        <report>phpunit-coverage</report>
                                    </reports>
                                </reportSet>
                            </reportSets>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-report-plugin</artifactId>
                            <version>2.10</version>
                            <reportSets>
                                <reportSet>
                                    <reports>
                                        <report>report-only</report>
                                    </reports>
                                </reportSet>
                            </reportSets>
                        </plugin>
                    </reportPlugins>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencies>
        <dependency>
                <groupId>org.phpunit</groupId>
                <artifactId>phpunit5</artifactId>
                <version>3.6.10</version>
                <type>pear</type>

Ryan RAJKOMAR

unread,
Feb 13, 2012, 12:05:54 PM2/13/12
to Maven for PHP
Yes now mvn install is working indeed.
As for the whole zend application project layout I'll try and get back
to you on this. But if memory serves well, you can specify where
everything is to the pom file and it will build the architecture how
it is suppsoed to be on the server when you deploy it.

On 13 fév, 15:33, "martin.eisengardt"
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://
> maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4.0.0.xsd">

Ryan RAJKOMAR

unread,
Feb 13, 2012, 12:26:48 PM2/13/12
to Maven for PHP
Note: When launching from eclipse I have this message :

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for
further details.

However, it might be related to the fact that my Java workspace and my
php workspace are using the same local repository...
> > Visitinghttp://framework.zend.com/manual/1.11/en/project-structure.project.ht...

martin.eisengardt

unread,
Feb 13, 2012, 12:29:09 PM2/13/12
to maven-...@googlegroups.com
You can - of course - create a sample project that we can use as archetype :)
So that everyone can create a simple zend web app project.

martin.eisengardt

unread,
Feb 13, 2012, 12:30:23 PM2/13/12
to maven-...@googlegroups.com
Simply ignore this SLF4J message on eclipse. Do not know where it comes from. Everything should work fine.

Ryan RAJKOMAR

unread,
Feb 14, 2012, 9:37:00 AM2/14/12
to Maven for PHP
Allright I've tried what I wanted to do (without any real code, only a
few files) and I've manged to make it so that my application once
built matches a zendframework project structure.

I only have one simpel question nwo, regarding the zend framework
library. When added to the pom file, nothing changes. I mean that
there's no autocompletion like you would have when the files are in
the build path. Is there any way to :

1 ) display the maven dependencies in the project architecture in the
php explorer (like you would have in a java package explorer)
2 ) get the autocomplete on the zend framework classes to work
3 ) if 1 is not possible how to make it so that the zend library is in
the include path of the project so that autocompeltion works.

Finally, are you aware of any plans on making it possible to get
something there was with helios version of eclipse : a plugin that
would help create zend framework elements (controllers, views, and so
on) within eclipse.

One last request, is there any way, once the new version of maven for
php is fully operationnal, to get some orm in the repositories I'm
thinking of some like PropelORM, Doctrine, and so on.

Thanks again for everything.
Regards,
Ryan.

On 13 fév, 18:30, "martin.eisengardt"

martin.eisengardt

unread,
Feb 14, 2012, 10:06:25 AM2/14/12
to maven-...@googlegroups.com
 
Code completion is possible. However there are some bugs on pdt. There could be (or should be) a build path container to referr the phar files getting from dependencies. However the pdt currently hides it. There was an early version of a flow3 support where I used it. However there could be something similar in php-maven soon. Please add a feature request at http://trac.php-maven.org so that I do not forget it. As a workaround you might add the phar file manually. Maybe in one or two weeks trhere will be code completion and debugging support. I will have to search for my original bug reports at eclipse.org... Maybe they are solved.
 
And maybe you could send a simple project template so that I could review it and add a proper archetype. I already added a placeholder at http://www.php-maven.org/branches/2.0-SNAPSHOT/archetypes/
 
 
Send your lists of import requests please to http://groups.google.com/group/maven-for-php/t/35df8922073cdec8 :-)
 
Zend-Framework, symfony, ezComponents are already uploaded. As well as many pear projects etc. for example: http://nexus.php-maven.org/index.html#nexus-search;quick~no.ez.components http://nexus.php-maven.org/index.html#nexus-search;quick~zend-framework
 


 

Ryan RAJKOMAR

unread,
Feb 14, 2012, 11:11:20 AM2/14/12
to Maven for PHP
I'm having a little issue.
When I run the mvn install, the zend library is not downloaded/added
to the project sources in the resulting phar output ...
How do I resolve this? Do I have to install the Zend Framework by
myself outside of the project on my server ?

On 14 fév, 16:06, "martin.eisengardt"
<martin.eisenga...@googlemail.com> wrote:
> Code completion is possible. However there are some bugs on pdt. There
> could be (or should be) a build path container to referr the phar files
> getting from dependencies. However the pdt currently hides it. There was an
> early version of a flow3 support where I used it. However there could be
> something similar in php-maven soon. Please add a feature request athttp://trac.php-maven.orgso that I do not forget it. As a workaround you
> might add the phar file manually. Maybe in one or two weeks trhere will be
> code completion and debugging support. I will have to search for my
> original bug reports at eclipse.org... Maybe they are solved.
>
> And maybe you could send a simple project template so that I could review
> it and add a proper archetype. I already added a placeholder athttp://www.php-maven.org/branches/2.0-SNAPSHOT/archetypes/
>
> Send your lists of import requests please tohttp://groups.google.com/group/maven-for-php/t/35df8922073cdec8:-)
>
> Zend-Framework, symfony, ezComponents are already uploaded. As well as many
> pear projects etc. for example:http://nexus.php-maven.org/index.html#nexus-search;quick~no.ez.compon...http://nexus.php-maven.org/index.html#nexus-search;quick~zend-framework

martin.eisengardt

unread,
Feb 14, 2012, 11:23:53 AM2/14/12
to maven-...@googlegroups.com
The main reason is that the resulting phar is meant to be used with maven and not outside of it. However it will always install both, the phar and the pom.xml in a local repository. Currently there is no other way than either build your own package or let maven install it on your productional server.
Hmmm. That was one topic of version 2.1.0. We will focus on project types in 2.1.0 and the (yet removed) assemblies.
 
But maybe I could hack something into 2.0.0-beta-2. Some goal you could start on the development server. That would result in the following resulting release cycle:
 
(1) mvn clean install
(2) mvn deploy
(3) mvn -DgroupId=org.mycompany -DartifactId=myProject -Dversion=0.4.5-SNAPSHOT -DphpTargetClasses=/var/myproject/classes -DphpTargetDeps=/var/myproject/php-deps org.phpmaven:maven-php-plugin:2.0.0-beta-2:install-project
 
Task 1 would install it in your local repository
Task 2 would install in in a remote repository (optional).
Task 3 would install the whole project. If this command is started on a productional machine it should be able to find both, the php-maven repository and your own repository where you deployed the version.
 
 
Sounds ok? :)

Ryan RAJKOMAR

unread,
Feb 14, 2012, 11:33:00 AM2/14/12
to Maven for PHP
Mmmm I think I understood everything.
So basically, if I want to test my application on a local apache
server (say Wamp for instance),

I would need to run mvn deploy and have the zend framework installed
separately on my server. Or I would need to have maven isntalled on my
server ?
I don't I really understood this part :s

Is there no way so that when running mvn install, maven would include
the zend library in the project before building the archive ?



On 14 fév, 17:23, "martin.eisengardt"

martin.eisengardt

unread,
Feb 14, 2012, 11:47:42 AM2/14/12
to maven-...@googlegroups.com
Install does not classical mean "install this software". I do not know why the maven guyes choosed this wording.
You mean "install in local apache" and the maven guys mean "install in maven repository". That's different and that won't be changed in php-maven since we do not want to reinvent the wheel. There are three possible solutions for local testing:
1) wait till we focus on project types :)
2) let apache find the target/classes/webroot, either via link or via DocumentRoot.
3) Wait two or more days till the suggested maven goal arrives to create a working version within your apache webroot.
 
I preferr variant 2. And of course the php-maven eclipse plugin assumes that you preferr version 2. It should already contain a mapping for breakpoints. Meaning that you place a breakpoint in the source folder and any breakpoint hit in target folder (which is assumed to be the "working copy" folder) will be mapped.
 
However I already have some concepts in mind that will solve this issue. We will need some basic investigation because the maven plugin that will solve your feature request, needs to know some things about the project. It will need to know which part of the project is a class library, what are static files, what to do with configuration files, where the htdocs are located etc.
To get a solution that requires you to build clean code (not everyone uses zend framework) and that is flexible enough to not use a framework is not that easy. Sorry.

Ryan RAJKOMAR

unread,
Feb 14, 2012, 12:22:37 PM2/14/12
to Maven for PHP
Ok I think I understand now. In truth, the phar archive correspond to
a jar (in java).

Could you explain to em how to specify to apache where the libs files
are ?
Is it just that I need to specify in the php include path ?

But then , when I would deploy the project on a preproduction server,
I would have to copy manually the libs, wouldn't I?

Finally if I were to use the embedded apache server in eclipse, would
it work ?
Because right I'm writing code that I can't test :s (unless using a
external zend library)

Thanks.

On 14 fév, 17:47, "martin.eisengardt"

martin.eisengardt

unread,
Feb 14, 2012, 12:35:04 PM2/14/12
to maven-...@googlegroups.com
ok, first the development machine and eclipse.
 
Use a manual apache/php installation or use xampp. For both edit the httpd.conf of your apache. Look for a directive called "DocumentRoot". Read http://lists.nycbug.org/pipermail/talk/2007-February/009805.html
 
But explain me why eclipse has embedded apache? I always thought this is a jetty webserver and not an apache. And webtools should be tomcat.
Hmmm. Seems to me if I should write down some tutorials on how to use web projects with php-maven and how to debug them/ deploy them to a productional system.
 
The code/classes should be tested by phpunit tests ;-)
But you are right. Writing non-library code should be "seen" in action. I will respond on this topic the next days.

Ryan RAJKOMAR

unread,
Feb 15, 2012, 4:19:08 AM2/15/12
to Maven for PHP
Hi,
I've taken a look at the link you provided and still don't get it :s
When you said target./classes/webroot are you talking about the public
folder ? Where my application's "point of entry" is located ?
If so, even if I did put my documentRoot to point there itstill would
not work since the zned library is on another folder ( php-deps)

As for the apache server thing, indeed it is an apache tomcat that can
be configured in eclipse. Which reminds me you mind want to take a
look at this : http://quercus.caucho.com/
It is a java implementation of php (basically it would allow to use
everything in PHP within a java environment within using a bridge)

Finally, about the whole phpunit tests, I'm aware that part of the
code can and should be tested using phpunit howver when it comes to
webinterfaces design you can't exactly rely on a phpunit tests to tell
you whether an element is at the right position in the page in
relation to the designs provided by the graphic designer.


On 14 fév, 18:35, "martin.eisengardt"
<martin.eisenga...@googlemail.com> wrote:
> ok, first the development machine and eclipse.
>
> Use a manual apache/php installation or use xampp. For both edit the
> httpd.conf of your apache. Look for a directive called "DocumentRoot". Readhttp://lists.nycbug.org/pipermail/talk/2007-February/009805.html
>
> But explain me why eclipse has embedded apache? I always thought this is a
> jetty webserver and not an apache. And webtools should be tomcat.
> Hmmm. Seems to me if I should write down some tutorials on how to use web
> projects with php-maven and how to debug them/ deploy them to a
> productional system.
>
> The code/classes should be tested by phpunit tests ;-)
> But you are right. Writing non-library code should be "seen" in action. I
> will respond on this topic the next days.
>

martin.eisengardt

unread,
Feb 15, 2012, 4:22:17 AM2/15/12
to maven-...@googlegroups.com
Let me create an artifact tonight that is demonstrating a zend framework app :-)
Give me some time.

Ryan RAJKOMAR

unread,
Feb 15, 2012, 4:30:33 AM2/15/12
to Maven for PHP
Allright.
I'm going to keep on transferring my old app to a maven-like
architecture in the meantime.

BTW I noticed you uploaded some nice phptools such ad phpdepend and
phpcodesSniffer and I was wondering how one would go about to using
those.
I know that there's an eclipse plugin that does in all within eclipse
itself. But I'm guessing that these artifacts are meant to be used to
display some stuff on the webserver ( kinda like a probe app on a
tomcat server... ?)

Thanks for everything.

On 15 fév, 10:22, "martin.eisengardt"
<martin.eisenga...@googlemail.com> wrote:
> Let me create an artifact tonight that is demonstrating a zend framework
> app :-)
> Give me some time.
>

martin.eisengardt

unread,
Feb 15, 2012, 5:48:40 AM2/15/12
to maven-...@googlegroups.com
There will be reports some day ;-)
One of the next tasks.

martin.eisengardt

unread,
Feb 17, 2012, 11:13:22 AM2/17/12
to maven-...@googlegroups.com
sry, Because of the hot fixes there was no time to setup the zend example and documentation. I will now finish the PHP-Maven 2.1 research and in about 5 or 6 hours I will be able to sent you a sample for zend.
This sample will use jetty or tomcat (I will decide within the next hours). Except the .htaccess file that maps the paths to the index.php it will work. The .htaccess file is something apache specific.
Maybe in futre releases we will add some apache http support plugin.

Are your projects open source? If they are open source please provide a link. I think I can help you with migration to PHP-Maven.

ryan.r...@gmail.com

unread,
Feb 17, 2012, 11:25:10 AM2/17/12
to maven-...@googlegroups.com
Hi. No problem at all. I've been pretty busy myself. As for the projects, unfortunately they're not open source(company policy). However I'm also working on personnal team project with some friends, which in time may be partly open source. But the objective being that it'd be developed from scratch under zend propel and maven it currently cannot be provided as example of any kind. Sorry.
Regards, Ryan.
From: "martin.eisengardt" <martin.e...@googlemail.com>
Date: Fri, 17 Feb 2012 17:13:22 +0100
Subject: Re: URGENT : Cannot complete the install because some dependencies are not satisfiable org.phpmaven.eclipse.feature.feature.group [2.0.0.201111111508] cannot be installed in this environment because its filter is not applicable

martin.eisengardt

unread,
Feb 17, 2012, 11:50:53 AM2/17/12
to maven-...@googlegroups.com
You might choose another support variant in future. But for know a good sample project could help. I will finish the work in the next hours :-)

martin.eisengardt

unread,
Feb 18, 2012, 7:12:58 PM2/18/12
to maven-...@googlegroups.com

ryan.r...@gmail.com

unread,
Feb 18, 2012, 8:19:52 PM2/18/12
to maven-...@googlegroups.com
Seems great. Can't wait to give it a shot on monday ^^
Thanks a lot.

From: "martin.eisengardt" <martin.e...@googlemail.com>
Date: Sun, 19 Feb 2012 01:12:58 +0100
Subject: Re: URGENT : Cannot complete the install because some dependencies are not satisfiable org.phpmaven.eclipse.feature.feature.group [2.0.0.201111111508] cannot be installed in this environment because its filter is not applicable

--

Ryan RAJKOMAR

unread,
Feb 20, 2012, 4:47:35 AM2/20/12
to Maven for PHP
So I've taken a quick look at the whole thing.
First of all, since the eclipse plugin is still not completely working
I can't create direclty a php maven project...

Because of that, I can either create a php project to convert it to
php maven (which will make it a simple php project, not a zend one) or
create a new maven project which will use the zend archetype but then
won't be recognized as maven php project ( Will it still work ?)

Using that second approach I get the following error message on the
(zend project) pom :

Project build error: Non-resolvable parent POM for org.phpmaven:php-
parent-pom:2.0.0-beta-2: Failure to find org.phpmaven.build:generic-
parent:pom:2.0.0-beta-2 in http://repos.php-maven.org/releases was
cached in the local repository, resolution will not be reattempted
until the update interval of releases.php-maven.org has elapsed or
updates are forced

Did the URLs for the repositories change ? I'm using the "repos.php-
maven.org" URLS right now.

Thanks.
Cheers, Ryan.

martin.eisengardt

unread,
Feb 20, 2012, 5:23:17 AM2/20/12
to maven-...@googlegroups.com
The URLS are correct. Indeed there is something missing in the repo. Hmmm. Fixed manually but I will have a look the next hours. Please retry.

Ryan RAJKOMAR

unread,
Feb 20, 2012, 5:45:16 AM2/20/12
to Maven for PHP
Hmmm.
Still getting the same message even after a mvn clean...

On 20 fév, 11:23, "martin.eisengardt"

martin.eisengardt

unread,
Feb 20, 2012, 6:37:23 AM2/20/12
to maven-...@googlegroups.com
To force updates please use the switch "-U". Or manually delete the corresponding folder in ~/.m2/repository/org/phpmaven...

Ryan RAJKOMAR

unread,
Feb 20, 2012, 6:42:53 AM2/20/12
to Maven for PHP
Allright, I've updated everything. and the error did indeed change. A
new error is now located on the <parent> tag :

null (org.phpmaven:maven-php-plugin:2.0.0-beta-2:test:default-
test:test)



On 20 fév, 12:37, "martin.eisengardt"
<martin.eisenga...@googlemail.com> wrote:
> To force updates please use the switch "-U". Or manually delete the
> corresponding folder in ~/.m2/repository/org/phpmaven...
>

martin.eisengardt

unread,
Feb 20, 2012, 6:44:12 AM2/20/12
to maven-...@googlegroups.com
Could you please paste the complete error line?

Ryan RAJKOMAR

unread,
Feb 20, 2012, 6:46:17 AM2/20/12
to Maven for PHP
It is...
I don't have anything else in the error popup :s

On 20 fév, 12:44, "martin.eisengardt"

martin.eisengardt

unread,
Feb 20, 2012, 6:49:24 AM2/20/12
to maven-...@googlegroups.com
Anything within windows->showView->errorLog?

Ryan RAJKOMAR

unread,
Feb 20, 2012, 6:53:41 AM2/20/12
to Maven for PHP
I have these :

The POM for de.phpunit:phpunit:phar:3.6.10 is missing, no dependency
information available

Failed to read Maven project: 1 problem was encountered while building
the effective model for com.leguide.php.samples:SelfcareWSTest:0.0.1-
SNAPSHOT
[FATAL] Non-resolvable parent POM for org.phpmaven:php-parent-pom:
2.0.0-beta-2: Failure to find org.phpmaven.build:generic-parent:pom:
2.0.0-beta-2 in http://repos.php-maven.org/releases was cached in the
local repository, resolution will not be reattempted until the update
interval of releases.php-maven.org has elapsed or updates are forced @
org.phpmaven:php-parent-pom:2.0.0-beta-2, C:\Users\Ryan\.m2\repository
\org\phpmaven\php-parent-pom\2.0.0-beta-2\php-parent-pom-2.0.0-
beta-2.pom, line 12, column 13
for project com.leguide.php.samples:SelfcareWSTest:0.0.1-SNAPSHOT

Other than that there's nothing (related to the project)


On 20 fév, 12:49, "martin.eisengardt"

martin.eisengardt

unread,
Feb 20, 2012, 6:57:09 AM2/20/12
to maven-...@googlegroups.com
Please delete the corresponding folder manually (~/.m2/repository/org/phpmaven) and restart eclipse to let eclipse and maven re-download everything.

Ryan RAJKOMAR

unread,
Feb 20, 2012, 8:11:55 AM2/20/12
to Maven for PHP
Just did it and I'm still getting the message for the parent.
I also noticed an error on thise dependency :

<dependency>
<groupId>de.phpunit</groupId>
<artifactId>phpunit</artifactId>
<version>${phpunit.version}</version>
<type>phar</type>
<scope>test</scope>
</dependency>

Missing artifact de.phpunit:phpunit:phar:3.6.10


On 20 fév, 12:57, "martin.eisengardt"

martin.eisengardt

unread,
Feb 20, 2012, 8:29:06 AM2/20/12
to maven-...@googlegroups.com
The dependency should be upcased. <artifactId>PHPUnit</artifactId>. I will fix it in the archetype the next hours.

The other error sounds strange as the pom is there: http://repos.php-maven.org/releases/org/phpmaven/build/generic-parent/2.0.0-beta-2/generic-parent-2.0.0-beta-2.pom
You did delete the folder manually? This should maven force to update everything. Otherwise try to invoke "mvn -U compile" at command line. This should maven force to update everything too. The eclipse m2e plugin sometimes behaves strange.

Ryan RAJKOMAR

unread,
Feb 20, 2012, 8:55:30 AM2/20/12
to Maven for PHP
I changed the case from phpunit to PHPUnit but I'm still getting the
same error (Missing artifact de.phpunit:PHPUnit:phar:3.6.10) even
after deleting the folder and restarting eclipse.

I did delete the folder manually and run a mvn clean -U (via CLI)
after restarting eclipse.

As for the mvn -U compile command, it didn't change anything I still
have both errors after running it .

On 20 fév, 14:29, "martin.eisengardt"
<martin.eisenga...@googlemail.com> wrote:
> The dependency should be upcased. <artifactId>PHPUnit</artifactId>. I will
> fix it in the archetype the next hours.
>
> The other error sounds strange as the pom is there:http://repos.php-maven.org/releases/org/phpmaven/build/generic-parent...

martin.eisengardt

unread,
Feb 20, 2012, 9:33:03 AM2/20/12
to maven-...@googlegroups.com
Is it possible to have a look, for example via TeamViewer?
I will be at home in about 4 or 5 hours. I think I need to have a look at your whole configuration. I am not yet seeing what is going wrong.

Ryan RAJKOMAR

unread,
Feb 20, 2012, 9:34:47 AM2/20/12
to Maven for PHP
Sorry but like I said before the project is office-related I cannot
show to anyone.
I will however try it out at home where there's no external element
that might interfere with the configuration.

On 20 fév, 15:33, "martin.eisengardt"

martin.eisengardt

unread,
Feb 20, 2012, 10:23:57 AM2/20/12
to maven-...@googlegroups.com
Pleas send me the debug report (in eclipse preferences->maven enable debugging or command line switch "-X") via mail.

Ryan RAJKOMAR

unread,
Feb 20, 2012, 10:40:44 AM2/20/12
to Maven for PHP
Just tried something, when removing the scope test elecment from the
PHPUnit dependy declaration there's no errors anymore (aside from the
packaging error which is normal) .

On 20 fév, 16:23, "martin.eisengardt"

Ryan RAJKOMAR

unread,
Feb 22, 2012, 4:27:49 PM2/22/12
to Maven for PHP
Hi,
I've given a try at home to the new archetype you set up on a blank
project ( before starting some customization for my project needs) and
I'm having a few issues :

First, in the tutorial (http://www.php-maven.org/branches/2.0-SNAPSHOT/
php-zend-5min.html), you say that running mvn package will make it so
that "Maven has created a zip and a tar package under the project's
target folder" >> I don't get any zip nor tar archive (only the usual
phar)

Then, and that is the most troublesome at the moment, following the
same tutorial, and having lauching the jetty webserver, I get a BLANK
page (nothing displayed, not even the zend not found exception kind,
as if the server finds zend but cannot access the index.php file)

Finally, since the eclipse plugin is not fixed yet, I've had to resort
to some tricks to get a zend app in a php project on Eclipse : create
a maven project (not php) using the archetype to get the basic layout,
then crate a php project and convert it to maven php, and finnaly
adapting it using the first project pom and folders/files to get a
zend app within a php project. Could this have anything to do with the
second issue ?
I'm also using the phpunit lib from org.phpunit5 instead of de.phpunit
but this should not have any impact on the "workingness" of the
project.

Here's the content of my pom file ( I retrieved the references to the
dependencies from the parent pom since I'm not using it directly) :

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://
maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>com.sample.php</groupId>
<artifactId>myapp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>php</packaging>
<name>SampleApp</name>
<description>SampleApp</description>

<properties>
<maven.php.plugin.version>2.0.0-beta-2</maven.php.plugin.version>
<maven.site.plugin.version>3.0</maven.site.plugin.version>
<maven.surefirereport.plugin.version>2.10</
maven.surefirereport.plugin.version>
<maven.jetty.plugin.version>6.1.10</maven.jetty.plugin.version>
<ch.qos.logback.logback-classic.version>0.9.15</
ch.qos.logback.logback-classic.version>
<maven.php.jettycgi.version>2.0.0-beta-2</
maven.php.jettycgi.version>
<project.build.sourceEncoding>UTF-8</
project.build.sourceEncoding>
<phpunit.version>3.6.10</phpunit.version>
<zend.framework.version>1.11.11</zend.framework.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.phpmaven</groupId>
<artifactId>maven-php-plugin</artifactId>
<version>${maven.php.plugin.version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${maven.site.plugin.version}</version>
<inherited>true</inherited>
<configuration>
<reportPlugins>
<plugin>
<groupId>org.phpmaven</groupId>
<artifactId>maven-php-plugin</artifactId>
<version>${maven.php.plugin.version}</
version>
<reportSets>
<reportSet>
<reports>
<report>phpdocumentor</report>
<report>phpunit-coverage</
report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</
groupId>
<artifactId>maven-surefire-report-plugin</
artifactId>
<version>$
{maven.surefirereport.plugin.version}</version>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</reportPlugins>
</configuration>
</plugin>

<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>${maven.jetty.plugin.version}</version>
<dependencies>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${ch.qos.logback.logback-classic.version}</version>
</dependency>
<dependency>
<groupId>org.phpmaven</groupId>
<artifactId>maven-php-jettycgi</artifactId>
<version>${maven.php.jettycgi.version}</version>
</dependency>
</dependencies>
<configuration>
<webXml>${project.basedir}/target/classes/webapp/WEB-INF/
web.xml</webXml>
<webAppSourceDirectory>${project.basedir}/target/classes/
public</webAppSourceDirectory>
<systemProperties>
<systemProperty>
<name>logback.configuration</name>
<value>${project.basedir}/target/classes/etc/
logback.xml</value>
</systemProperty>
<systemProperty>
<name>phpIncludePath</name>
<value>${project.basedir}/target/php-deps/library;$
{project.basedir}/target/php-deps</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
</plugins>

<sourceDirectory>src/main/php</sourceDirectory>
<testSourceDirectory>src/test/php</testSourceDirectory>
</build>

<dependencies>
<dependency>
<groupId>org.phpunit</groupId>
<artifactId>phpunit5</artifactId>
<version>${phpunit.version}</version>
<type>phar</type>
</dependency>
<dependency>
<groupId>com.zend.framework</groupId>
<artifactId>framework</artifactId>
<version>${zend.framework.version}</version>
<type>phar</type>
</dependency>
</dependencies>
</project>

Any help on this would be most welcomed :)

martin.eisengardt

unread,
Feb 23, 2012, 2:49:09 AM2/23/12
to maven-...@googlegroups.com
1) web page will be fixed during the next upload. Indeed this is wrong. We are creating phar files instead of zip/tar archives.
 
2) Is there any log message in the jetty process?
I tested it on our debian server and got the following an error (security alert, REDIRECT_STATUS cgi variable). If you got the same error in jetty console plese set the jetty version to 2.0-SNAPSHOT. There it is fixed. It is depending on your php.ini but however I simply set the CGI variable and everything will be ok.
 
3) No, there should not be any problem.

sover...@gmail.com

unread,
Feb 23, 2012, 9:17:49 AM2/23/12
to maven-...@googlegroups.com
Does somebody have a suggestion how to solve this issue:

[ERROR] Failed to execute goal org.phpmaven:maven-php-plugin:2.0.0-beta-2:resources (default-resources) on project my-app: Problems creating maven project from dependency: Error resolving project artifact: Failure to find de.phpunit:phpunit:pom:3.6.10 in http://repos.php-maven.org/releases was cached in the local repository, resolution will not be reattempted until the update interval of release-repo1.php-maven.org has elapsed or updates are forced for project de.phpunit:phpunit:phar:3.6.10 -> [Help 1]

martin.eisengardt

unread,
Feb 23, 2012, 9:50:19 AM2/23/12
to maven-...@googlegroups.com
Please change the dependency to PHPUnit (upcased). However this was fixed in latest snapshot and I guess it was fixed in beta-2-archetype. Maybe within your local repository there is an old version of the archetype around. Maven does not expect changes in release versions.

On Thu, Feb 23, 2012 at 3:17 PM, <sover...@gmail.com> wrote:
Does somebody have a suggestion how to solve this issue:

[ERROR] Failed to execute goal org.phpmaven:maven-php-plugin:2.0.0-beta-2:resources (default-resources) on project my-app: Problems creating maven project from dependency: Error resolving project artifact: Failure to find de.phpunit:phpunit:pom:3.6.10 in http://repos.php-maven.org/releases was cached in the local repository, resolution will not be reattempted until the update interval of release-repo1.php-maven.org has elapsed or updates are forced for project de.phpunit:phpunit:phar:3.6.10 -> [Help 1]

--
You received this message because you are subscribed to the Google Groups "Maven for PHP" group.
To view this discussion on the web visit https://groups.google.com/d/msg/maven-for-php/-/uNyiXK3BDL4J.

Ryan RAJKOMAR

unread,
Feb 23, 2012, 12:10:57 PM2/23/12
to Maven for PHP
I'll try tonight using the snapshot version and I'll send you the log
from the jetty process
"It is depending on your php.ini" >> YOu mean that jetty is using the
php.exe and php.ini files in my local installation right ? (Wamp in my
case)

BTW, is there anywhere I can follow up on the whole local server
deployment goal we discussed before ?

Thanks.


On 23 fév, 08:49, "martin.eisengardt"
<martin.eisenga...@googlemail.com> wrote:
> 1) web page will be fixed during the next upload. Indeed this is wrong. We
> are creating phar files instead of zip/tar archives.
>
> 2) Is there any log message in the jetty process?
> I tested it on our debian server and got the following an error (security
> alert, REDIRECT_STATUS cgi variable). If you got the same error in jetty
> console plese set the jetty version to 2.0-SNAPSHOT. There it is fixed. It
> is depending on your php.ini but however I simply set the CGI variable and
> everything will be ok.
>
> 3) No, there should not be any problem.
>
> On Wed, Feb 22, 2012 at 10:27 PM, Ryan RAJKOMAR <ryan.rajko...@gmail.com>wrote:
>
>
>
>
>
>
>
> > Hi,
> > I've given a try at home to the new archetype you set up on a blank
> > project ( before starting some customization for my project needs) and
> > I'm having a few issues :
>
> > First, in the tutorial (http://www.php-maven.org/branches/2.0-SNAPSHOT/
> > php-zend-5min.html<http://www.php-maven.org/branches/2.0-SNAPSHOT/php-zend-5min.html>),
> > you say that running mvn package will make it so
> > that "Maven has created a zip and a tar package under the project's
> > target folder" >> I don't get any zip nor tar archive (only the usual
> > phar)
>
> > Then, and that is the most troublesome at the moment, following the
> > same tutorial, and having lauching the jetty webserver, I get a BLANK
> > page (nothing displayed, not even the zend not found exception kind,
> > as if the server finds zend but cannot access the index.php file)
>
> > Finally, since the eclipse plugin is not fixed yet, I've had to resort
> > to some tricks to get a zend app in a php project on Eclipse : create
> > a maven project (not php) using the archetype to get the basic layout,
> > then crate a php project and convert it to maven php, and finnaly
> > adapting it using the first project pom and folders/files to get a
> > zend app within a php project. Could this have anything to do with the
> > second issue ?
> > I'm also using the phpunit lib from org.phpunit5 instead of de.phpunit
> > but this should not have any impact on the "workingness" of the
> > project.
>
> > Here's the content of my pom file ( I retrieved the references to the
> > dependencies from the parent pom since I'm not using it directly) :
>
> > <?xml version="1.0" encoding="UTF-8"?>
> > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://
> >www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://
> > maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4.0.0.xsd">

martin.eisengardt

unread,
Feb 23, 2012, 12:48:44 PM2/23/12
to maven-...@googlegroups.com

"It is depending on your php.ini" >> YOu mean that jetty is using the
php.exe and php.ini files in my local installation right ? (Wamp in my
case)
Currently jetty uses php-cgi it finds on the path (usually your default wamp installation as long as you do not have multiple installations). And the php.ini nearby. Additional parameters to use any other php-cgi.exe and php.ini will be available later on.
As far as I see there was a change in PHP >= 5.3. The cgi-security option was activated per default. I should update my local WAMPP soon :) This option requires us to set an additional environment variable.
Anyhow we are setting up a new hudson and test infrastructure so that the tests are using several php installations and operating systems. Maybe this weekend we are getting better test results.

 

BTW, is there anywhere I can follow up on the whole local server
deployment goal we discussed before ?

Not yet. The first step was to get a local environment to start a webserver. The next step will be a plugin to start/stop apache. So that we can have working htaccess files. See http://stackoverflow.com/questions/9372169/starting-and-ending-apache-webserver-from-maven

And the third step will be a way to have an assembly for exporting the whole application and install it anywhere. Maybe I will realize some of the features of PHP-Maven 2.1 in the next two weeks. I am thinking of http://www.php-maven.org/php-maven%202.1.pdf @ page 20/21/22. But without the configuration framework we are planning. Simple goals to deploy a web application project to web servers and to built self extracting and self configuring phar archives.

sover...@gmail.com

unread,
Feb 24, 2012, 3:40:04 AM2/24/12
to maven-...@googlegroups.com
Ok, after I changed the dependency to PHPUnit it still gave the same error message so I decided to delete the phpunit stuff from my maven repository and now it is working.

Thanx!

Ryan RAJKOMAR

unread,
Feb 27, 2012, 4:10:15 PM2/27/12
to Maven for PHP
Hi,
I've been working on my porject as much as I can and I've managed to
start the jetty plugin. I can now access the index.php page.
I now have two question, one related to a possible use of tomcat
instead of jetty and one concerning the jetty plugin :

1) While browsing a bit looking for a way to use directly my wamp
install I've stubled upon this : http://code.google.com/p/tomcat-php-maven-plugin/
it's a bit old and may not be working correctly anymore but might be a
good start should we want to use a tomcat version. With that in mind
could a war packaging be possible with maven for php ? (the war
packaging would include all librairies, zend and others, and be
automatically deployable on a tomcat server...) Note that this plugin
is using the php java bridge class in order to allow use on tomcat.

2) Using jetty cgi, you said that the .htaccess would not be
recognized, meaning that URLs like thi : http://server/controller/action
would not work, right ? If so, how would I get around this little
issue to display my different web app pages ?

Thanks a lot again.
Regards, Ryan.

On 23 fév, 18:48, "martin.eisengardt"
<martin.eisenga...@googlemail.com> wrote:
> "It is depending on your php.ini" >> YOu mean that jetty is using the> php.exe and php.ini files in my local installation right ? (Wamp in my
> > case)
>
> Currently jetty uses php-cgi it finds on the path (usually your default
> wamp installation as long as you do not have multiple installations). And
> the php.ini nearby. Additional parameters to use any other php-cgi.exe and
> php.ini will be available later on.
> As far as I see there was a change in PHP >= 5.3. The cgi-security option
> was activated per default. I should update my local WAMPP soon :) This
> option requires us to set an additional environment variable.
> Anyhow we are setting up a new hudson and test infrastructure so that the
> tests are using several php installations and operating systems. Maybe this
> weekend we are getting better test results.
>
>
>
> > BTW, is there anywhere I can follow up on the whole local server
> > deployment goal we discussed before ?
>
> Not yet. The first step was to get a local environment to start a
> webserver. The next step will be a plugin to start/stop apache. So that we
> can have working htaccess files. Seehttp://stackoverflow.com/questions/9372169/starting-and-ending-apache...
>
> And the third step will be a way to have an assembly for exporting the
> whole application and install it anywhere. Maybe I will realize some of the
> features of PHP-Maven 2.1 in the next two weeks. I am thinking ofhttp://www.php-maven.org/php-maven%202.1.pdf@ page 20/21/22. But without

martin.eisengardt

unread,
Feb 28, 2012, 5:56:54 AM2/28/12
to maven-...@googlegroups.com
1) Please add this to the trac as a features request. Not targeted in the next days.
 
2) Zend framework should support the following syntax (and the jetty configuration does too): http://server/your-app/index.php/controller/action.
However we already focus an apache integration.

Ryan RAJKOMAR

unread,
Feb 29, 2012, 5:23:07 AM2/29/12
to Maven for PHP
1) I will as soon as I can
2) Great :)

Another thing I've noticed while checking out my code is the fact that
in your archetype the phpunit.xml file is not located in right folder
(/main/resources instead of /tests/resources) : see
http://framework.zend.com/manual/en/learning.quickstart.create-project.html


On 28 fév, 11:56, "martin.eisengardt"
<martin.eisenga...@googlemail.com> wrote:
> 1) Please add this to the trac as a features request. Not targeted in the
> next days.
>
> 2) Zend framework should support the following syntax (and the jetty
> configuration does too):http://server/your-app/index.php/controller/action.
> However we already focus an apache integration.
>

Shadowwalker

unread,
Mar 2, 2012, 4:54:19 AM3/2/12
to maven-...@googlegroups.com
Would the phpunit still work with the phpunit.xml file in the etc file ?!
Doesn't phpunit need the phpunit.xml file to be in the directory from which you launch the tests ?
If it can still work with the file in the etc directory, then the paths specified in the file would  not be valid in developement/testing environment...
> > maven-for-php+unsubscribe@googlegroups.com.

Shadowwalker

unread,
Mar 7, 2012, 4:00:04 PM3/7/12
to maven-...@googlegroups.com

Hi Martin,

I sent you a response a few days ago and at first thought that I didn't get any response because you were busy adding some new stuff for php maven and since I didn't need the answer right away, I saw to point in asking again and I waited.

However, since then I've tried running a phpunit test with the file you provided and maven's phpunit run does find the test case...

Could you provide us with a working example of a simple test case ?

A simple assertEquals (TRUE, TRUE); would be more than enough since a demo is enough to get started :)
 
Thanks

Cheers,
Ryan.
To unsubscribe from this group, send email to maven-for-php+unsubscribe@googlegroups.com.

martin.eisengardt

unread,
Mar 7, 2012, 4:46:18 PM3/7/12
to maven-...@googlegroups.com
I will soon publish beta-3. Maybe even tomorrow. As soon as I did some rewqork and as soon as the junit tests are fixed :)
Please stay tuned bexcause it should fix most of the issues for packaging phars and phpunit test invocations.

To view this discussion on the web visit https://groups.google.com/d/msg/maven-for-php/-/cczimUtuXwMJ.

To post to this group, send email to maven-...@googlegroups.com.
To unsubscribe from this group, send email to maven-for-ph...@googlegroups.com.

Shadowwalker

unread,
Mar 12, 2012, 4:41:47 PM3/12/12
to maven-...@googlegroups.com
Allright.

Can't wait :) I really need those to get started on the TDD way :p (at least on PHP)

BTW, while preparing everyhting so that as soon as the nex beta comes out I'll be able to truly do some testing, I've noticed that (as is) Eclipse does not provide code completion for all the phpunit annotations.... Any hint on how to achieve this ?

Thanks again.

Cheers, Ryan.

Shadowwalker

unread,
Mar 16, 2012, 7:28:00 PM3/16/12
to maven-...@googlegroups.com
Hi,
Just switched to the beta3 and unfortunately I still have the same issue with my test cases : it seems they're not recognized...
Here's an example of the test cases functions :

/**
     * @method postTest
     * @return void
     */
    public function postTest() {
   
        $this->assertTrue(TRUE);
    }
   
    /**
     * @method getTest
     * @return void
     */
    public function getTest() {
   
        $this->assertTrue(TRUE);
    }

and here's the output I get everytime I do invoke php unit test from the php-maven eclipse menu:

[INFO:17/03/12 00:24:43] No test case found; failing because failIfNoTests set to true.

Status ERROR: org.phpmaven.eclipse.core code=0 Build returned with errors. org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.phpmaven:maven-php-plugin:2.0.0-beta-3:test (default-test) on project wseam: No test case found; failing because failIfNoTests set to true.

Any suggestions ?
Cheers,
Ryan.

martin.eisengardt

unread,
Mar 16, 2012, 7:40:53 PM3/16/12
to maven-...@googlegroups.com
The file is called xxxxTest.php?
And is is located within src/test/php?
 

ryan.r...@gmail.com

unread,
Mar 16, 2012, 7:41:52 PM3/16/12
to maven-...@googlegroups.com
Yes to both.

From: "martin.eisengardt" <martin.e...@googlemail.com>
Date: Sat, 17 Mar 2012 00:40:53 +0100
Subject: Re: URGENT : Cannot complete the install because some dependencies are not satisfiable org.phpmaven.eclipse.feature.feature.group [2.0.0.201111111508] cannot be installed in this environment because its filter is not applicable

The file is called xxxxTest.php?
And is is located within src/test/php?
 

--
You received this message because you are subscribed to the Google Groups "Maven for PHP" group.
To post to this group, send email to maven-...@googlegroups.com.
To unsubscribe from this group, send email to maven-for-ph...@googlegroups.com.

martin.eisengardt

unread,
Mar 16, 2012, 7:47:45 PM3/16/12
to maven-...@googlegroups.com

is it possible to get your pom.xml?

Shadowwalker

unread,
Mar 17, 2012, 4:24:31 AM3/17/12
to maven-...@googlegroups.com
Here it is :


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   
    <modelVersion>4.0.0</modelVersion>
   
    <groupId>com.mavenphp</groupId>
    <artifactId>testsample</artifactId>

    <version>0.0.1-SNAPSHOT</version>
    <packaging>php</packaging>

    <profiles>
        <profile>
            <id>development</id>
            <properties>
                <zend.environment>development</zend.environment>
            </properties>
        </profile>
        <profile>
            <id>testing</id>
            <properties>
                <zend.environment>testing</zend.environment>
            </properties>
        </profile>
        <profile>
            <id>integration</id>
            <properties>
                <zend.environment>integration</zend.environment>
            </properties>
        </profile>
        <profile>
            <id>acceptance</id>
            <properties>
                <zend.environment>acceptance</zend.environment>
            </properties>
        </profile>
        <profile>
            <id>preproduction</id>
            <properties>
                <zend.environment>preproduction</zend.environment>
            </properties>
        </profile>
        <profile>
            <id>production</id>
            <properties>
                <zend.environment>production</zend.environment>
            </properties>
        </profile>
    </profiles>
   
    <properties>
        <maven.php.plugin.version>2.0.0-beta-3</maven.php.plugin.version>

        <maven.site.plugin.version>3.0</maven.site.plugin.version>
        <maven.surefirereport.plugin.version>2.10</maven.surefirereport.plugin.version>
        <maven.jetty.plugin.version>6.1.10</maven.jetty.plugin.version>
        <ch.qos.logback.logback-classic.version>0.9.15</ch.qos.logback.logback-classic.version>
        <maven.php.jettycgi.version>2.0.0-beta-3</maven.php.jettycgi.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <phpunit.version>3.6.10</phpunit.version>
        <zend.framework.version>1.11.11</zend.framework.version>
    </properties>

    <build>
        <resources>
               <resource>
                <directory>${basedir}/src/conf/${zend.environment}</directory>
            </resource>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.phpmaven</groupId>
                <artifactId>maven-php-plugin</artifactId>
                <version>${maven.php.plugin.version}</version>
                <extensions>true</extensions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>${maven.site.plugin.version}</version>
                <inherited>true</inherited>
                <configuration>
                    <reportPlugins>
                        <plugin>
                            <groupId>org.phpmaven</groupId>
                            <artifactId>maven-php-plugin</artifactId>
                            <version>${maven.php.plugin.version}</version>
                            <reportSets>
                                <reportSet>
                                    <reports>
                                        <report>phpdocumentor</report>
                                        <report>phpunit-coverage</report>
                                    </reports>
                                </reportSet>
                            </reportSets>
                           <!-- I tried adding this block to force the use of 'testing' profile when launched phpunit testing but I'm not sure it works nor if it's the right way to go about it.
                           <!-- <executions>
                                  <execution>
                                      <id>testing</id>
                                      <phase>test</phase>
                                      <goals>
                                          <goal>phpunit</goal>
                                      </goals>
                                  </execution>
                              </executions> -->

                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-report-plugin</artifactId>
                    <webAppSourceDirectory>${project.basedir}/target/classes/public</webAppSourceDirectory>

                    <systemProperties>
                        <systemProperty>
                            <name>logback.configuration</name>
                            <value>${project.basedir}/target/classes/etc/logback.xml</value>
        <dependency>
              <groupId>org.apache.log4php</groupId>
              <artifactId>log4php</artifactId>
              <version>2.2.0</version>

              <type>phar</type>
        </dependency>
    </dependencies>
</project>

martin.eisengardt

unread,
Mar 17, 2012, 8:22:33 AM3/17/12
to maven-...@googlegroups.com
Do you have any command line options/ environment variables set? Of something in your settings.xml?
One of:
  • testFile
  • testFolder
  • testPostfix
  • testIfNoTest
  • phpFileEnding
for me it works perfectly. For both, empty test directories as well as existing ones. If you switch to php-maven 2.0-SNAPSHOT and use the debugging switch (-X) you will see more debugging output. Something likethe following output. Notice the red lines. I have appended the small example I've been using. I did not change anything in the pom. Simple added a source file and a test file.

[DEBUG]   (f) resultFolder = D:\Dev\ws\test\target\phpunit-reports
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@66e8c7db
[DEBUG]   (f) singleTestInvocation = false
[DEBUG]   (f) skip = false
[DEBUG]   (f) skipTests = false
[DEBUG]   (f) targetClassesDirectory = D:\Dev\ws\test\target\classes
[DEBUG]   (f) targetTestClassesDirectory = D:\Dev\ws\test\target\test-classes
[DEBUG]   (f) temporaryScriptFile = D:\Dev\ws\test\target\snippet.php
[DEBUG]   (f) testDependenciesTargetDirectory = D:\Dev\ws\test\target\php-test-d
eps
[DEBUG]   (f) testFailureIgnore = false
[DEBUG]   (f) testPostfix = Test
[DEBUG] -- end configuration --
[DEBUG] Starting test file walker.
[DEBUG] param testCompilSourceRoot: D:\Dev\ws\test\src\test\php
[DEBUG] param isFailIfNoTests: false
[DEBUG] param testPostfix: Test
[DEBUG] param phpFileEnding: php
[DEBUG] Testing file D:\Dev\ws\test\src\test\php\FooTest.php for test file.
[DEBUG] Adding file as test file D:\Dev\ws\test\src\test\php\FooTest.php
[DEBUG] Returning test files [D:\Dev\ws\test\src\test\php\FooTest.php]
[DEBUG] Configuring component 'org.phpmaven.project.ProjectPhpExecution' with ba
sic configurator -->
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@66e8c7db
[DEBUG] -- end configuration --
[DEBUG] Configuring component 'org.phpmaven.project.ProjectPhpExecution' with ba
sic configurator -->
[DEBUG] -- end configuration --
[INFO] dependency org.phpunit:phpunit5:3.6.10:compile@C:\Users\mepeisen\.m2\repo
sitory\org\phpunit\phpunit5\3.6.10\phpunit5-3.6.10.phar
[INFO] dependency com.zend.framework:framework:1.11.11:compile@C:\Users\mepeisen
\.m2\repository\com\zend\framework\framework\1.11.11\framework-1.11.11.phar
[INFO] dependency org.apache.log4php:log4php:2.2.0:compile@C:\Users\mepeisen\.m2
\repository\org\apache\log4php\log4php\2.2.0\log4php-2.2.0.phar
[DEBUG] []
[INFO]
-------------------------------------------------------
T E S T S
-------------------------------------------------------

[DEBUG] Configuring component 'org.phpmaven.phpunit.impl.PhpunitConfiguration' w
ith basic configurator -->
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@66e8c7db
[DEBUG] -- end configuration --
[DEBUG] Configuring component 'org.phpmaven.phpunit.impl.PhpunitConfiguration' w
ith basic configurator -->
[DEBUG] -- end configuration --
[DEBUG] Configuring component 'org.phpmaven.phpunit.impl.PhpunitTestRequest' wit
h basic configurator -->
[DEBUG] -- end configuration --
[DEBUG] Configuring component 'org.phpmaven.phpunit.impl.PhpunitService' with ba
sic configurator -->
[DEBUG] -- end configuration --
[DEBUG] Configuring component 'org.phpmaven.phpunit.impl.PhpunitSupport360' with
 basic configurator -->
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@66e8c7db
[DEBUG] -- end configuration --
[DEBUG] Configuring component 'org.phpmaven.phpunit.impl.PhpunitSupport360' with
 basic configurator -->
[DEBUG] -- end configuration --
[INFO] Starting tests.
[DEBUG] Configuring component 'org.phpmaven.project.ProjectPhpExecution' with ba
sic configurator -->
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@66e8c7db
[DEBUG] -- end configuration --
[DEBUG] Configuring component 'org.phpmaven.project.ProjectPhpExecution' with ba
sic configurator -->
[DEBUG] -- end configuration --
[DEBUG] Configuring component 'org.phpmaven.exec.PhpExecutableConfiguration' wit
h basic configurator -->
[DEBUG]   (s) workDirectory = D:\Dev\ws\test\target
[DEBUG]   (s) temporaryScriptFile = D:\Dev\ws\test\target\snippet.php
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@7746df77
[DEBUG] -- end configuration --
[DEBUG] Configuring component 'org.phpmaven.exec.PhpExecutableConfiguration' wit
h basic configurator -->
[DEBUG] -- end configuration --
[DEBUG] Configuring component 'org.phpmaven.exec.PhpExecutable' with basic confi
gurator -->
[DEBUG] -- end configuration --
[DEBUG] Executing cmd.exe /X /C "php -d include_path=;D:\Dev\ws\test\target\clas
ses;D:\Dev\ws\test\target\php-deps;D:\Dev\ws\test\target\php-deps\pear;D:\Dev\ws
\test\target\classes;D:\Dev\ws\test\target\php-test-deps;D:\Dev\ws\test\target\p
hp-test-deps\pear D:\Dev\ws\test\target\snippet.php --log-junit D:\Dev\ws\test\t
arget\phpunit-reports\FooTest.xml D:\Dev\ws\test\src\test\php\FooTest.php"
[DEBUG] php.out: PHPUnit 3.6.10 by Sebastian Bergmann.
[DEBUG] php.out:
[DEBUG] php.out: .
[DEBUG] php.out:
[DEBUG] php.out: Time: 0 seconds, Memory: 3.25Mb
[DEBUG] php.out:
[DEBUG] php.out: OK (1 test, 0 assertions)
[INFO]

Results :

TEST SUCCESS
  SUCCESS [FooTest] 0.001794s / 1 Tests, 0 Failures, 0 Errors

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 38.563s
[INFO] Finished at: Sat Mar 17 13:17:22 CET 2012
[INFO] Final Memory: 11M/167M
[INFO] ------------------------------------------------------------------------
D:\Dev\ws\test>

 

test.zip

Shadowwalker

unread,
Mar 18, 2012, 9:42:20 AM3/18/12
to maven-...@googlegroups.com
Allright,
first, no I  do not have anything specific in my settings file nor my command line.

Now, after this last message you sent me, I figured maybe something in the error was coming for the eclipse plugin (since I wasn't launching the test via command line directly)
So I tried with the command line ( mvn test -X) and I saw something that might be the origin of my issue :
Fatal error: Class 'Zend_Test_PHPUnit_ControllerTestCase' not found
(Note I am using the Zend PHP Unit class ( which extends the PHPUnit class usually used) in order to be able to test a few Zend related things as well as my logic. It appears maven has some issue finding the class ( although it is included in the basic Zend library))

Another thing I noticed while checking all of this is that, unlike all the other dependencies, the Zend framework is not directly included in the php-deps directory but under a subdirectory named library ! Is this normal ? Maybe that has to do with why maven can't find the file....

Thanks.
Cheers, Ryan.

martin.eisengardt

unread,
Mar 18, 2012, 10:00:03 AM3/18/12
to maven-...@googlegroups.com
Do you setup the include path and the auto loader correctly? Maven needs some help on it. Maven only creates the include path top php-deps and php-testdeps. If there is anything inside (the current zend packages are located in sub directory library) you must manually setup.
Maybe I will fix the zend packages in future. Starting from version 2.0 know zend framework has its own official pear channel. I will have a look at the 2.0.0 packages soon. Please open a bug on trac so tat I do not forget this issue.
However that is fairly simple for workaround (if I did not make any mistake):
 
<build><plugins><plugin>
<groupId>org.phpmaven</groupId>
<artifactId>php-maven-project</artifactId>
<version>2.0.0-beta-3</version>
<configuration>
    <executableConfig>
        <includePath>${project.basedir}/target/php-deps/library</includePath>
        <phpDefines>
             <auto_prepend_file>my_autoloader.php</auto_prepend_file><!-- if placed in some subdirectory of src/main/php enter the relative path or use an absolute path by help of project.basedir -->
        </phpDefines>
    </executableConfig>
</configuration>
</plugin></plugins></build>
 
The eclipse plugin is under review and is bugfixed know :-)

--
You received this message because you are subscribed to the Google Groups "Maven for PHP" group.
To view this discussion on the web visit https://groups.google.com/d/msg/maven-for-php/-/7tXKWEDs5I0J.

Shadowwalker

unread,
Mar 18, 2012, 12:17:00 PM3/18/12
to maven-...@googlegroups.com
The include path is correctly set in the jetty plugin definition howver that was the only place where I'd defined it.
On the other hand, since I'm using the zend framework 1.11.11 version, there should be no autoloading issue as long as the zend framework library is on include path.

That said, I tried using the php-maven-project plugin definition that you provided as a fix ( minus the part about autoloading stuff since I don't have any) and it is still not working I still get the error about the Zend_Test_PHPUnit[...] class no found.
To unsubscribe from this group, send email to maven-for-php+unsubscribe@googlegroups.com.

martin.eisengardt

unread,
Mar 18, 2012, 12:26:27 PM3/18/12
to maven-...@googlegroups.com
Sorry, at the moment you will need some bootstrap initializing the zend framework for testing. At least setup the autoloading. This may change in future versions. PHP-Maven does not know anything about the zend-framework yet.
So setup a small bootstrap used for testing.

Ryan R.

unread,
Mar 18, 2012, 12:42:17 PM3/18/12
to maven-...@googlegroups.com
Actually have a bootstrap.php file to initialize the zend framework even within the phpunit test ( see content below) but as I mentioned earlier, the phpunit.xml file is located in src\main\resources\etc when it should logically be in src\test\resources...
However, if the location of the file does not have any impact of the use of user-defined configuration within the xml file then I can define in the xml file where my bootstrap.php file is but then again, the path that are in the xml file by default would be false (since they're not "maven-for-php like")

Bootstrap.php content :

<?php

error_reporting( E_ALL | E_STRICT );


// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));

// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'testing'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(realpath(APPLICATION_PATH . '/../library'), get_include_path())));

/** Zend_Application */
require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(APPLICATION_ENV,  realpath(dirname(__FILE__) . '/../application/configs/application.ini'));
$application->bootstrap()->run();


Cheers.

2012/3/18 martin.eisengardt <martin.e...@googlemail.com>
Sorry, at the moment you will need some bootstrap initializing the zend framework for testing. At least setup the autoloading. This may change in future versions. PHP-Maven does not know anything about the zend-framework yet.
So setup a small bootstrap used for testing.

--
You received this message because you are subscribed to the Google Groups "Maven for PHP" group.
To post to this group, send email to maven-...@googlegroups.com.
To unsubscribe from this group, send email to maven-for-ph...@googlegroups.com.

martin.eisengardt

unread,
Mar 18, 2012, 1:08:11 PM3/18/12
to maven-...@googlegroups.com
phpunit.xml is currently not respected, yes. it will be changing before releasing 2.0.0 :)
You need a workaround at the moment.

Ryan R.

unread,
Mar 19, 2012, 10:24:14 AM3/19/12
to maven-...@googlegroups.com
Ok
Then should I use my bootstrap.php file as the autoloader ?

2012/3/18 martin.eisengardt <martin.e...@googlemail.com>

martin.eisengardt

unread,
Mar 19, 2012, 12:06:28 PM3/19/12
to maven-...@googlegroups.com
Hi.

Please read http://framework.zend.com/manual/en/zend.test.phpunit.html (second chapter) and http://nikitasreedharan.com/blog/?p=111

You need a special test bootstrap that does everything but does not create the zend application itself.
The zend_application is created inside a setup method of the testcase.

Greetings Martin

Shadowwalker

unread,
Mar 22, 2012, 8:02:24 PM3/22/12
to maven-...@googlegroups.com
Allright.
I tried doing it while following the tuorials in the links you gave me and it still doesn't work : now, instead of telling it can't find the Zend_PHPUnit(...) class it's the ControllerTestCase class that it doesn't find (when launching a controller test case) even if the ControllerTestcase class is in the same folder as the tests case I'm trying to run.....

I also tried by putting the ControllerTestCase class file in the library folder ( which is on the include path) and still no luck...:s

Any ideas ?


Le lundi 19 mars 2012 17:06:28 UTC+1, Martin Eisengardt a écrit :
Hi.

Please read http://framework.zend.com/​manual/en/zend.test.phpunit.​html (second chapter) and http://nikitasreedharan.com/​blog/?p=111

You need a special test bootstrap that does everything but does not create the zend application itself.
The zend_application is created inside a setup method of the testcase.

Greetings Martin



On Mon, Mar 19, 2012 at 3:24 PM, Ryan R. <ryan.r...@gmail.com> wrote:
Ok
Then should I use my bootstrap.php file as the autoloader ?

2012/3/18 martin.eisengardt <martin.eisengardt@googlemail.​com>

phpunit.xml is currently not respected, yes. it will be changing before releasing 2.0.0 :)
You need a workaround at the moment.

On Sun, Mar 18, 2012 at 5:42 PM, Ryan R. <ryan.r...@gmail.com> wrote:
Actually have a bootstrap.php file to initialize the zend framework even within the phpunit test ( see content below) but as I mentioned earlier, the phpunit.xml file is located in src\main\resources\etc when it should logically be in src\test\resources...
However, if the location of the file does not have any impact of the use of user-defined configuration within the xml file then I can define in the xml file where my bootstrap.php file is but then again, the path that are in the xml file by default would be false (since they're not "maven-for-php like")

Bootstrap.php content :

<?php

error_reporting( E_ALL | E_STRICT );


// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));

// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'testing'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_​SEPARATOR, array(realpath(APPLICATION_​PATH . '/../library'), get_include_path())));

/** Zend_Application */
require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(APPLICATION_​ENV,  realpath(dirname(__FILE__) . '/../application/configs/​application.ini'));
$application->bootstrap()->​run();


Cheers.

2012/3/18 martin.eisengardt <martin.eisengardt@googlemail.​com>
Sorry, at the moment you will need some bootstrap initializing the zend framework for testing. At least setup the autoloading. This may change in future versions. PHP-Maven does not know anything about the zend-framework yet.
So setup a small bootstrap used for testing.

--
You received this message because you are subscribed to the Google Groups "Maven for PHP" group.
To post to this group, send email to maven-...@googlegroups.com​.
To unsubscribe from this group, send email to maven-for-php+unsubscribe@​googlegroups.com.

For more options, visit this group at http://groups.google.com/​group/maven-for-php?hl=en.

--
You received this message because you are subscribed to the Google Groups "Maven for PHP" group.
To post to this group, send email to maven-...@googlegroups.com​.
To unsubscribe from this group, send email to maven-for-php+unsubscribe@​googlegroups.com.

For more options, visit this group at http://groups.google.com/​group/maven-for-php?hl=en.

--
You received this message because you are subscribed to the Google Groups "Maven for PHP" group.
To post to this group, send email to maven-...@googlegroups.com​.
To unsubscribe from this group, send email to maven-for-php+unsubscribe@​googlegroups.com.

For more options, visit this group at http://groups.google.com/​group/maven-for-php?hl=en.

--
You received this message because you are subscribed to the Google Groups "Maven for PHP" group.
To post to this group, send email to maven-...@googlegroups.com​.
To unsubscribe from this group, send email to maven-for-php+unsubscribe@​googlegroups.com.

Shadowwalker

unread,
Mar 26, 2012, 5:00:16 PM3/26/12
to maven-...@googlegroups.com
So after a few tricks I think I've managed to find why it's not working :

Fatal error: require_once(): Failed opening required 'Zend/Test/PHPUnit/ControllerTestCase.php' (include_path=';C:\Users\Shadow\Eclipse\WorkspacePHP\GEMSuite_WSEAM\target\classes;C:\Users\Shadow\Eclipse\WorkspacePHP\GEMSuite_WSEAM\target\php-deps;C:\Users\Shadow\Eclipse\WorkspacePHP\GEMSuite_WSEAM\target\php-deps\pear;C:\Users\Shadow\Eclipse\WorkspacePHP\GEMSuite_WSEAM\target\classes;C:\Users\Shad
ow\Eclipse\WorkspacePHP\GEMSuite_WSEAM\target\php-test-deps;C:\Users\Shadow\Eclipse\WorkspacePHP\GEMSuite_WSEAM\target\php-test-deps\pear') in C:\Users\Shadow\Eclipse\WorkspacePHP\GEMSuite_WSEAM\src\test\php\application\controllers\ControllerTestCase.php on line 2


This (see above) is the output I get when running mvn clean test.
Even though I have this in my pom.xml :
            <plugin>
                <groupId>org.phpmaven</groupId>
                <artifactId>php-maven-project</artifactId>
                <version>2.0.0-beta-3</version>
                <configuration>
                    <executableConfig>
                        <includePath>${project.basedir}/target/php-deps/library</includePath>
                        <phpDefines>
                             <auto_prepend_file>application/bootstrap.php</auto_prepend_file>
                        </phpDefines>
                    </executableConfig>
                </configuration>
            </plugin>

It seems maven does not take into account the library within php-deps ( nested dependency ?)

martin.eisengardt

unread,
Mar 27, 2012, 1:49:02 AM3/27/12
to maven-...@googlegroups.com
try
....
<configuration><executableConfig>
<includePath><param>${project.basedir}/target/php-deps/library</param></includePath>
...</executableConfig></configuration>
 
To view this discussion on the web visit https://groups.google.com/d/msg/maven-for-php/-/bGLM7YScthUJ.

To post to this group, send email to maven-...@googlegroups.com.
To unsubscribe from this group, send email to maven-for-ph...@googlegroups.com.

Shadowwalker

unread,
Mar 27, 2012, 7:30:00 PM3/27/12
to maven-...@googlegroups.com
Ok I tried what you suggested, first with 2.0.0-beta3 and then with 2.0-SNAPSHOT and neither worked the include path value is still not taken into account by maven...

Shadowwalker

unread,
Mar 28, 2012, 3:51:45 PM3/28/12
to maven-...@googlegroups.com
Just adding some information( think I did mention earlier in the posts but not sure) : I'm not using th parent pom in my pom.xml file for my project. Cauld that have to do with why it's not working ( see pom.xml below ) :


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   
    <modelVersion>4.0.0</modelVersion>
   
    <groupId>com.mavenzend.samples</groupId>
    <artifactId>zendsample</artifactId>
        <log4php.version>2.2.0</log4php.version>
    </properties>

    <build>
        <resources>
               <resource>
                <directory>${project.basedir}/src/conf/${zend.environment}</directory>
            </resource>
            <resource>
                <directory>${project.basedir}/src/main/resources</directory>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.phpmaven</groupId>

                <artifactId>maven-php-plugin</artifactId>
                <version>${maven.php.plugin.version}</version>
                <extensions>true</extensions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>${maven.site.plugin.version}</version>
                <inherited>true</inherited>
                <configuration>
                    <reportPlugins>
                        <plugin>
                            <groupId>org.phpmaven</groupId>

                            <artifactId>maven-php-plugin</artifactId>
                            <version>${maven.php.plugin.version}</version>
                            <reportSets>
                                <reportSet>
                                    <reports>
                                        <report>phpdocumentor</report>
                                        <report>phpunit-coverage</report>
                                    </reports>
                                </reportSet>
                            </reportSets>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-report-plugin</artifactId>
                            <version>${maven.surefirereport.plugin.version}</version>
                            <reportSets>
                                <reportSet>
                                    <reports>
                                        <report>report-only</report>
                                    </reports>
                                </reportSet>
                            </reportSets>
                        </plugin>
                    </reportPlugins>
                </configuration>
            </plugin>
           
                <version>${maven.php.plugin.version}</version>

                <configuration>
                    <executableConfig>
                        <includePath>
                            <param>${project.basedir}/target/php-deps/library</param>
                        </includePath>
                        <phpDefines>
                             <auto_prepend_file>application/bootstrap.php</auto_prepend_file>
                        </phpDefines>
                    </executableConfig>
                </configuration>
            </plugin>
        </plugins>
       
        <sourceDirectory>${project.basedir}/src/main/php</sourceDirectory>
        <testSourceDirectory>${project.basedir}/src/test/php</testSourceDirectory>

    </build>
   
    <dependencies>
        <dependency>
            <groupId>org.phpunit</groupId>
            <artifactId>phpunit5</artifactId>
            <version>${phpunit.version}</version>
            <type>phar</type>
        </dependency>
        <dependency>
            <groupId>com.zend.framework</groupId>
            <artifactId>framework</artifactId>
            <version>${zend.framework.version}</version>
            <type>phar</type>
        </dependency>
        <dependency>
              <groupId>org.apache.log4php</groupId>
              <artifactId>log4php</artifactId>
              <version>${log4php.version}</version>

              <type>phar</type>
        </dependency>
    </dependencies>
</project>


martin.eisengardt

unread,
Mar 28, 2012, 4:38:07 PM3/28/12
to maven-...@googlegroups.com
please send a zip containing the whole project to sup...@php-maven.org


 
To view this discussion on the web visit https://groups.google.com/d/msg/maven-for-php/-/kMlA5xWiZlEJ.

To post to this group, send email to maven-...@googlegroups.com.
To unsubscribe from this group, send email to maven-for-ph...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages