Omitting <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef>…
- User
Omitting jar-with-dependencies from build in my pom.xml file seems to crash the build process. I just want the final builded jar to not have the with-dependencies suffix on it
- Assistant
The
<descriptorRefs>element in the pom.xml file is used to specify which descriptors should be used during the build process. In this specific case,<descriptorRef>jar-with-dependencies</descriptorRef>refers to the Maven Assembly Plugin descriptor that packages all dependencies into a single jar file with the "-jar-with-dependencies" suffix.If you omit
<descriptorRefs>and<descriptorRef>jar-with-dependencies</descriptorRef>, it means that the Assembly Plugin will not be executed during the build process, resulting in the absence of the "with-dependencies" jar.However, if omitting the
<descriptorRefs>section is crashing your build process, it may indicate that there are other parts of your build configuration relying on the presence of the "with-dependencies" jar. It's important to analyze the build logs and error messages to identify the exact reason for the crash.If you still want to exclude the "with-dependencies" suffix, you can try other methods like using the Maven Shade Plugin or configuring a custom assembly descriptor to achieve your desired packaging configuration.