Skip to content

Maven-php-dependency include behavior #19

@marcinant

Description

@marcinant

I would like to create project with following structure:

/lib/somelibrary-1.phar
/lib/somelibrary-2.phar
...
index.php
somepage.php

I created 3 projects.

  1. somelibrary-1 using php-library archetype
  2. somelibrary-2 -"-
  3. website using php-webapp archetype.

In website/pom.xml I added somelibrary-1 and somelibrary-2 as dependencies.

As result they are unpacked to target/php-deps

This is not what I want. So, following this tutorial:

http://www.php-maven.org/tags/2.0.2/tut-dependencymanagement.html
Which states:
"The include action tells maven to not extract the phar file but instead put it on php include path."
I added to website/pom.xml

    <groupId>org.phpmaven</groupId>
    <artifactId>maven-php-dependency</artifactId>
    <configuration>
        <dependencies>
            <dependency>
                <groupId>org.test</groupId>
                <artifactId>somelibrary-1</artifactId>
                <actions>
                    <include/>
                </actions>
            </dependency>
        </dependencies>
    </configuration>
</plugin>

Unfortunately it doesn't work as I expected.
As result dependency is not visible in target/php-deps and is not available anwyhere in target dir!
Info says that "will be added on include path".
But what does it mean?
Is there any way to bundle unextracted phar with webapplication?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions