php-maven / maven-php-plugin

A maven plugin for dependency management and quality assurance for PHP projects.
http://www.php-maven.org/
Apache License 2.0
37 stars 29 forks source link

Bad dependency phar extraction in a multi-module project #14

Open lcotonea opened 12 years ago

lcotonea commented 12 years ago

Here the structure of my maven project

Project (0.1.1-SNAPSHOT) L---- pom.xml
L---- MODULE-A L---- pom.xml that include a depency to MODULE-COMMON-0.1.1-SNAPSHOT

L____ MODULE-COMMON | L---- pom.xml

When I launch a mvn clean install in the Project directory, everything seems fine. However, when I look the Project/MODULE-A/target/php-deps directory, I've got no MODULE-COMMON's files. However the MODULE-COMMON's phar file is correctly generated in its target directory.

When I analyse the mvn trace, the MODULE-COMMON build is correctly launched before the MODULE-A's build. When maven resolve the MODULE-A's dependencies, the MODULE-COMMON phar is found and a log message is print : [INFO] Unpacking dependencies... [INFO] Extracting D:\utilisateurs\lcotonea.m2\repository\com\xxx\MODULE-COMMON\0.1.1-SNAPSHOT\MODULE-COMMON-0.1.1-SNAPSHOT.phar to target directory

However if I launch build with the debug flag (-X), I've no further messages during the MODULE-COMMON's phar extraction. But for another external dependency, I've some verbose messages during phar extraction.

Then I've done this last test:

So I think there is a bug in the phar location/extraction in a multi module project with internal dependencies.

I'm available to deliver you a test project if you want.