Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 788159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:19:01+00:00 2026-05-14T21:19:01+00:00

I have to build an application using Maven for PHP that has multiple modules.

  • 0

I have to build an application using Maven for PHP that has multiple modules. The scenario in which the maven seems to not work is this: I have a common module and a client module depending on the first one.
When doing “mvn test” on the client module which depends on the common module, the test fails to see the paths to the common module. Is there a flow in my build or this is just not possible?

I attached my pom.xml files.

pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.sample</groupId>
    <artifactId>my-app_package</artifactId>
    <packaging>pom</packaging>
    <name>Sample PHP Maven multi module project</name>
    <version>1.0-SNAPSHOT</version>
    <modules>
        <module>common-module</module>
        <module>client1-module</module>
    </modules>
    <build>
        <plugins>
            <plugin>
                <groupId>org.phpmaven</groupId>
                <artifactId>maven-php-plugin</artifactId>
                <extensions>true</extensions>
                <version>1.0</version>              
                <configuration>
                    <ignoreValidate>true</ignoreValidate>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.phpunit</groupId>
            <artifactId>phpunit5</artifactId>
            <version>3.3.9</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
<reporting>
    <plugins>
        <plugin>
            <groupId>org.phpmaven</groupId>
            <artifactId>maven-php-plugin</artifactId>
            <version>1.0</version>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-report-plugin</artifactId>
            <version>2.4</version>
            <reportSets>
                <reportSet>
                    <reports>
                        <report>report-only</report>
                    </reports>
                </reportSet>
            </reportSets>
        </plugin>
    </plugins>
</reporting>
</project>

common-module/pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.sample</groupId>
    <artifactId>my-app</artifactId>
    <packaging>php</packaging>
    <name>Client1 module</name>
    <version>1.0-SNAPSHOT</version>
    <build>
        <plugins>
            <plugin>
                <groupId>org.phpmaven</groupId>
                <artifactId>maven-php-plugin</artifactId>
                <extensions>true</extensions>
                <version>1.0</version>              
                <configuration>
                    <ignoreValidate>true</ignoreValidate>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.sample</groupId>
            <artifactId>common-module</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.phpunit</groupId>
            <artifactId>phpunit5</artifactId>
            <version>3.3.9</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>

common-module/pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.sample</groupId>
    <artifactId>common-module</artifactId>
    <packaging>php</packaging>
    <name>Common module</name>
    <version>1.0-SNAPSHOT</version>

    <build>
        <plugins>
            <plugin>
                <groupId>org.phpmaven</groupId>
                <artifactId>maven-php-plugin</artifactId>
                <extensions>true</extensions>
                <version>1.0</version>              
                <configuration>
                    <ignoreValidate>true</ignoreValidate>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.phpunit</groupId>
            <artifactId>phpunit5</artifactId>
            <version>3.3.9</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T21:19:02+00:00Added an answer on May 14, 2026 at 9:19 pm

    It works, you just need to install your dependency module BEFORE trying to build a module that depends on that module. Or else it won’t find it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 516k
  • Answers 516k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can also use a definition like that directly in… May 16, 2026 at 6:54 pm
  • Editorial Team
    Editorial Team added an answer To ignore facebook subdomains you can ensure that $parse_author_url['host'] is… May 16, 2026 at 6:54 pm
  • Editorial Team
    Editorial Team added an answer This blog post should get you going. Quoted from post:… May 16, 2026 at 6:54 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm trying to build my application for GoogleAppEngine using maven. I've added the following
I have a simple application using netbeans for developing and maven for building et
We build software using Hudson and Maven. We have C#, java and last, but
I have a multi-threaded application build in C# using VS2010 Professional. It's quite a
I have built my application using Build and Archive and the version shows up
I'm using maven war plugin to build war package. Before package is build test
I'm developing my application as a set of OSGi bundles using Maven 2. Some
I have an application that is developed in a Windows environment. The application itself
I have a java application that up until now was run as a stand
I'm trying build my application using REST and Spring MVC. For some entities I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.