zoukankan      html  css  js  c++  java
  • maven编译错误maven-assembly-plugin:2.2-beta-5:assembly (default-cli) on project

    maven对项目编译时报错

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:assembly (default-cli) on project video: Error reading assemblies: No assembly descriptors found. -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

    因为pom.xml中缺少

    <plugin>
      <artifactId>maven-assembly-plugin</artifactId>
      <configuration>
        <archive>
          <manifest>
            <mainClass>com.test.MainClassName</mainClass>
          </manifest>
        </archive>
        <descriptorRefs>
          <descriptorRef>jar-with-dependencies</descriptorRef>
        </descriptorRefs>
      </configuration>
      <executions>
        <execution>
          <id>make-assembly</id> 
          <phase>package</phase>
          <goals>
            <goal>single</goal>
          </goals>
        </execution>
      </executions>
    </plugin>

    添加上之后成功编译

  • 相关阅读:
    WPF资源字典使用
    忍住你的痛苦
    WPF附加属性
    一致性Hash算法详解
    登录注册
    REST
    资源访问
    参与Bean的生命周期
    sqlserver中查询横表变竖表的sql语句简析
    C#跨线程修改控件——从MSIL和汇编看Invoke, 多线程, 事件与事件委托
  • 原文地址:https://www.cnblogs.com/timeTraveler/p/10002398.html
Copyright © 2011-2022 走看看