I have the following maven project structure:
orders-service/testing/integration-tests/
orders-service/testing/integration-tests/pom.xml #[parent pom]
orders-service/testing/integration-tests/orders-test-core/
orders-service/testing/integration-tests/orders-test-core/pom.xml
orders-service/testing/integration-tests/orders-test-impl/
orders-service/testing/integration-tests/orders-test-impl/pom.xml
I am in the parent directory of orders-service.
I want to build the integration-tests parent pom along with orders-test-core from the parent directory of orders-service.
in the orders-service/testing/integration-tests/pom.xml, I have the following defined in
<project ...>
<modules>
<module>orders-test-core</module>
<module>orders-test-impl</module>
</modules>
</project>
Here is what I tried:
mvn clean install -f orders-service/testing/integration-tests/pom.xml -pl orders-service/testing/integration-tests/orders-test-core
and
mvn clean install orders-service/testing/integration-tests -pl orders-service/testing/integration-tests/orders-test-core
I get the error in both cases:
[ERROR] [ERROR] Could not find the selected project in the reactor: orders-service/testing/integration-tests/orders-test-core @
[ERROR] Could not find the selected project in the reactor: orders-service/testing/integration-tests/orders-test-core -> [Help 1]
How can I solve this? I have to be in the parent directory and execute a command to build the parent pom along with the core module.