无法执行目标org.apache.maven.plugins:2.6:单一

时间:2017-10-03 12:05:53

标签: java maven tomcat spring-boot static-resource

尝试在java项目上执行mvn.cmd package命令并接收errorsecond part of error

我的pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
      <groupId>org.kurento.tutorial</groupId>
      <artifactId>kurento-tutorial</artifactId>
      <version>6.6.2</version>
   </parent>
   <artifactId>kurento-one2many-call</artifactId>
   <packaging>war</packaging>
   <name>Kurento Java Tutorial - One2Many Call</name>
   <description>WebRTC one to many video call</description>
   <licenses>
      <license>
         <name>Apache 2.0</name>
         <url>http://www.apache.org/licenses/LICENSE-2.0</url>
         <distribution>repo</distribution>
      </license>
   </licenses>
   <organization>
      <name>Kurento</name>
      <url>http://www.kurento.org</url>
   </organization>
   <scm>
      <url>https://github.com/Kurento/kurento-tutorial-java</url>
      <connection>scm:git:https://github.com/Kurento/kurento-tutorial-java</connection>
      <developerConnection>scm:git://git@github.com:Kurento/kurento-tutorial-java</developerConnection>
      <tag>develop</tag>
   </scm>
   <developers>
      <developer>
         <id>kurento.org</id>
         <name>-kurento.org Community</name>
         <organization>Kurento.org</organization>
         <organizationUrl>http://www.kurento.org</organizationUrl>
      </developer>
   </developers>
   <properties>
      <demo.port>8083</demo.port>
      <!-- Main class -->
      <start-class>org.kurento.tutorial.one2manycall.One2ManyCallApp</start-class>
   </properties>
   <dependencies>
      <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-web</artifactId>
      </dependency>
      <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-websocket</artifactId>
      </dependency>
      <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-tomcat</artifactId>
         <scope>provided</scope>
      </dependency>
      <!-- Kurento -->
      <dependency>
         <groupId>org.kurento</groupId>
         <artifactId>kurento-client</artifactId>
      </dependency>
      <dependency>
         <groupId>org.kurento</groupId>
         <artifactId>kurento-utils-js</artifactId>
      </dependency>
      <dependency>
         <groupId>org.webjars</groupId>
         <artifactId>webjars-locator</artifactId>
      </dependency>
      <dependency>
         <groupId>org.webjars.bower</groupId>
         <artifactId>bootstrap</artifactId>
      </dependency>
      <dependency>
         <groupId>org.webjars</groupId>
         <artifactId>draggabilly</artifactId>
      </dependency>
      <dependency>
         <groupId>org.webjars.bower</groupId>
         <artifactId>demo-console</artifactId>
      </dependency>
      <dependency>
         <groupId>org.webjars.bower</groupId>
         <artifactId>adapter.js</artifactId>
      </dependency>
      <dependency>
         <groupId>org.webjars.bower</groupId>
         <artifactId>jquery</artifactId>
      </dependency>
      <dependency>
         <groupId>org.webjars.bower</groupId>
         <artifactId>ekko-lightbox</artifactId>
      </dependency>
   </dependencies>
   <build>
      <plugins>
         <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.6</version>
            <configuration>
               <failOnMissingWebXml>false</failOnMissingWebXml>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
                <tarLongFileMode>posix</tarLongFileMode>
               <archive>
                  <manifest>
                     <mainClass>org.kurento.tutorial.one2manycall.One2ManyCallApp</mainClass>
                  </manifest>
               </archive>
               <descriptor>src/assembly/bin.xml</descriptor>
               <finalName>${project.artifactId}-${project.version}</finalName>
               <appendAssemblyId>false</appendAssemblyId>
            </configuration>
            <executions>
               <execution>
                  <phase>package</phase>
                  <goals>
                     <goal>single</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <version>2.2</version>
            <configuration>
               <path>/callsession</path>
               <update>true</update>
               <ignorePackaging>true</ignorePackaging>
               <url>http://localhost:8080/manager/text</url>
               <username>admin</username>
               <password>r06d0288</password>
            </configuration>
         </plugin>
         <!--
         <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
               <mainClass>${start-class}</mainClass>
               <layout>ZIP</layout>
               <classifier>exec</classifier>
            </configuration>
            <executions>
               <execution>
                  <goals>
                     <goal>repackage</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>-->
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <configuration>
               <mainClass>${start-class}</mainClass>
            </configuration>
         </plugin>
      </plugins>
      <resources>
         <resource>
            <directory>src/main/resources</directory>
            <filtering>false</filtering>
         </resource>
         <resource>
            <directory>src/main/resources</directory>
            <filtering>true</filtering>
            <includes>
               <include>banner.txt</include>
            </includes>
         </resource>
      </resources>
   </build>
   <profiles>
      <profile>
         <id>default</id>
         <activation>
            <activeByDefault>true</activeByDefault>
         </activation>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-assembly-plugin</artifactId>
                  <configuration>
                     <descriptor>src/assembly/bin.xml</descriptor>
                     <finalName>${project.artifactId}-${project.version}</finalName>
                     <appendAssemblyId>false</appendAssemblyId>
                  </configuration>
                  <executions>
                     <execution>
                        <phase>package</phase>
                        <goals>
                           <goal>single</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-antrun-plugin</artifactId>
                  <executions>
                     <execution>
                        <phase>package</phase>
                        <configuration>
                           <tasks>
                              <copy file="${project.build.directory}/target/${project.artifactId}-${project.version}-bin.zip" tofile="${project.build.directory}/target/${project.artifactId}-${project.version}.zip" />
                           </tasks>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
      <profile>
         <id>no-assembly</id>
      </profile>
   </profiles>
</project>

我的开始课

package org.kurento.tutorial.one2manycall;
import org.kurento.client.KurentoClient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.web.socket.config.annotation.EnableWebSocket;
import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;
import org.springframework.boot.web.support.SpringBootServletInitializer;
@SpringBootApplication
@EnableWebSocket
public class One2ManyCallApp extends SpringBootServletInitializer implements WebSocketConfigurer   {
  @Bean
  public CallHandler callHandler() {
    return new CallHandler();
  }
  @Bean
  public KurentoClient kurentoClient() {
    return KurentoClient.create();
  }
  @Override
  public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
    registry.addHandler(callHandler(), "/call");
  }
  @Override 
  protected SpringApplicationBuilder configure(SpringApplicationBuilder application){
      return application.sources(One2ManyCallApp.class);
  }
  public static void main(String[] args) throws Exception {
    new SpringApplication(One2ManyCallApp.class).run(args);
  }
}

有没有人知道如何解决这个问题?

0 个答案:

没有答案