Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error reading assemblies: Descriptor with ID <xml path> not found

I've been trying to migrate my projects from Java 8 to Java 11. So far, I've also updated my Spring boot projects and was able to find solutions to the issues that came up. Although for this one, I'm having some difficulty resolving it. My Maven version is 3.6.1.

Initially, the value of my maven assembly plugin is like this:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-assembly-plugin</artifactId>
    <configuration>
        <appendAssemblyId>false</appendAssemblyId>
        <descriptor>src/main/assembly/boot.xml</descriptor>
    </configuration>
    <executions>
        <execution>
            <id>make-assembly</id>
            <phase>package</phase>
            <goals>
                <goal>single</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Although it throws an error that says this:

Execution make-assembly of goal org.apache.maven.plugins:maven-assembly-plugin:3.1.1:single failed: parameter 'descriptor' has been removed from the plugin, please verify documentation. -> [Help 1]

According to the maven assembly documentation, the use of descriptor was always incorrect. And so I've updated it to this:

<configuration>
    <appendAssemblyId>false</appendAssemblyId>
    <descriptorRefs>
      <descriptorRef>src/main/assembly/boot.xml</descriptorRef>
    </descriptorRefs>
</configuration>

Although it still does not work. It throws an error like this:

Error reading assemblies: Descriptor with ID 'src/main/assembly/boot.xml' not found -> [Help 1]

Even though the boot.xml is existing.

enter image description here

Any other suggestions on how I can resolve this? Thank you in advance!

like image 397
Micah Rockie Avatar asked Oct 31 '25 09:10

Micah Rockie


2 Answers

Well, I've just returned to my previous configuration and added descriptors tags. It now looks like this:

<descriptors>
    <descriptor>src/main/assembly/boot.xml</descriptor>
</descriptors>

And it worked!

like image 60
Micah Rockie Avatar answered Nov 02 '25 22:11

Micah Rockie


I have the same problem using 3.3. The tag descriptor dosn't work alone. The tag descriptorRefs if for IDs. If you use file you need to use descriptor tag inside descriptors tag inside configuration tag inside the plugin tag. This is my actual working configuration.

<plugin>
    <artifactId>maven-assembly-plugin</artifactId>
    <version>3.3.0</version>
    <configuration>
      <descriptors>
        <descriptor>assembly.xml</descriptor>
      </descriptors>
      <finalName>sofia-web-server-${project.version}</finalName>
    </configuration>
    <executions>
      <execution>
        <phase>package</phase>
        <goals>
          <goal>single</goal>
        </goals>
      </execution>
    </executions>
  </plugin>
</plugins>
like image 42
Esteban Cabezudo Avatar answered Nov 02 '25 22:11

Esteban Cabezudo