Error reading assemblies: No assembly descriptors found

前端 未结 3 1337
忘了有多久
忘了有多久 2020-12-29 01:58

I get Error reading assemblies: No assembly descriptors found when building my project. I\'m trying to set permissions for my .sh files and exclud

相关标签:
3条回答
  • 2020-12-29 02:44

    I was also facing the same issue with below command

    $mvn clean assembly:single

    But below command worked for me

    $mvn clean assembly:assembly

    0 讨论(0)
  • 2020-12-29 02:48

    I have been using version 2.3 of maven-assembly-plugin, but I believe the problem is the same: if the assembly configuration is declared inside an execution, it works from mvn package, but does not work from mvn assembly:assembly.

    The solution I have found is to declare the configuration in the top-level configuration of the plugin, and keep the execution as small as possible:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.3</version>
        <configuration>
            <descriptors>
                <descriptor>src/main/assembly/standalone.xml</descriptor>
            </descriptors>
            <finalName>standalone</finalName>
        </configuration>
        <executions>
            <execution>
                <id>standalone</id>
                <phase>package</phase>
                <goals>
                    <goal>single</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
    
    0 讨论(0)
  • 2020-12-29 02:49

    It seems that you have configured the assembly plugin in <build>...<pluginManagement>...<plugins>. It should work if you configure the plugin in <build>...<plugins>.

    <build>
      <plugins>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.2.1</version>
          <executions>
            <execution>
              <id>make-assembly</id>
              <phase>package</phase>
              <goals>
                <goal>single</goal>
              </goals>
              <configuration>
                <descriptors>
                  <descriptor>src/main/assembly/src.xml</descriptor>
                </descriptors>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </build>
    
    0 讨论(0)
提交回复
热议问题