How can maven packaged projects and dependencies be packaged successfully without being in the same directory?

the code that introduced submodule,submodule into the project is placed in another folder. Now the main project directory failed to package with the mvn install command. I can"t find the submodule project. I don"t know how to configure the project directory. Do I need to modify the pom file?

May.12,2021

you can use relative paths in pom.xml to specify the location of submodule, such as

parent project

<modules>
  <module>../module1</module>
  <module>../module2</module>
  <module>../module3</module>
</modules>

in sub-module

<parent>
  <groupId>my.awsome.module1</groupId>
  <artifactId>parent-pom</artifactId>
  <version>1.0.1<version>
  <relativePath>../parent-pom/pom.xml</relativePath>
</parent>

but obviously this is not a good practice, and it is best to replan the project path to avoid all kinds of subtle minor problems caused by this.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b340da-2beea.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b340da-2beea.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?