I have created a multi-module maven application where there are 2 modules. The first module plays the role of a library, the second module has the main method. I want to get the assembly of the exe file from the launching (second) module and the lib folder where only the jar file from the first module is located with the dependencies inside. I tried using the following pom. xml (in the launcher), but it puts the library in the jar, which is not what I would like. What needs to be fixed?
<dependencies>
<dependency>
<groupId>com.XXX</groupId>
<artifactId>first_module</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>XXX.Main</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>2.1.3</version>
<executions>
<execution>
<id>l4j-clui</id>
<phase>package</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<headerType>gui</headerType>
<stayAlive>true</stayAlive>
<outfile>XXX.exe</outfile>
<jar>${project.build.directory}/${project.artifactId}-${project.version}-jar-with-dependencies.jar</jar>
<errTitle>encc</errTitle>
<classPath>
<mainClass>XXX.Main</mainClass>
<addDependencies>true</addDependencies>
<preCp>anything</preCp>
</classPath>
<jre>
<path>runtime</path>
</jre>
<versionInfo>
<fileVersion>1.0.0.0</fileVersion>
<txtFileVersion>${project.version}</txtFileVersion>
<fileDescription>XXX</fileDescription>
<copyright>XXX</copyright>
<productVersion>1.0.0.0</productVersion>
<txtProductVersion>${project.version}</txtProductVersion>
<productName>XXX</productName>
<originalFilename>XXX.exe</originalFilename>
<internalName>XXX</internalName>
</versionInfo>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>