Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change root directory for gitlab CI

I want to implement Gitlab CI on my repository. I have already set up the runner on Windows and configure the .yml to work with a Maven project. The problem is that I have the folders Domain and Front-end in the root of the repository. Is there a way to change the root so the .yml could be able to find the pom.XML file which is in the domain folder?

When I run it, it says that it couldn't find the pom files.

[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/builds/motomine/web). Please verify you invoked Maven from the correct directory.

So I think changing the root folder might solve the problem.

like image 523
Motomine Avatar asked Mar 11 '26 20:03

Motomine


1 Answers

You don't necessarily need to change the directory. You can point maven to the directory which contains the pom. In your .yml file:

...
- mvn -f Domain

From the maven documentation:

-f,--file : Force the use of an alternate POM file (or directory with pom.xml)

like image 112
Kai Avatar answered Mar 14 '26 12:03

Kai



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!