2016-05-14 8 views
0

仮想マシンにkurnto-media-serverバージョン6.4.0をインストールしました.JavaScriptチュートリアルを実行しました。しかし、私はホストシステム上でjavaチュートリアルを実行することはできません。kurento 6.4.0のJavaチュートリアルを実行できません

私はマシンoracle jdkバージョン1.8.0_91とバージョン3.3.9のmavenを持っています。私はjavascriptのチュートリアル用のバウアーをインストールしました。

私はコマンドでハロー世界のチュートリアルコンパイルするとき:

git checkout 6.4.0 
mvn compile exec:java 

プロンプトが表示され、エラー:私はハロー世界のフォルダ内のファイルbower.jsonを持って

[INFO] Scanning for projects... 
[INFO]          
[INFO] ------------------------------------------------------------------------ 
[INFO] Building Kurento Java Tutorial - Hello World 6.4.0 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-java-version) @ kurento-hello-world --- 
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version) @ kurento-hello-world --- 
[INFO] 
[INFO] --- buildnumber-maven-plugin:1.4:create-timestamp (get-build-timestamp) @ kurento-hello-world --- 
[INFO] 
[INFO] --- buildnumber-maven-plugin:1.4:create (get-scm-revision) @ kurento-hello-world --- 
[INFO] Executing: /bin/sh -c cd '/home/kurento-tutorial-java/kurento-hello-world' && 'git' 'rev-parse' '--verify' 'HEAD' 
[INFO] Working directory: /home/kurento-tutorial-java/kurento-hello-world 
[INFO] Storing buildNumber: 9fba36e32343bb490384a4e1869e2b40de78fa2e at timestamp: 1463241859150 
[WARNING] Cannot get the branch information from the git repository: 
Detecting the current branch failed: fatal: ref HEAD is not a symbolic ref 

[INFO] Executing: /bin/sh -c cd '/home/kurento-tutorial-java/kurento-hello-world' && 'git' 'rev-parse' '--verify' 'HEAD' 
[INFO] Working directory: /home/kurento-tutorial-java/kurento-hello-world 
[INFO] Storing buildScmBranch: UNKNOWN 
[INFO] 
[INFO] --- exec-maven-plugin:1.4.0:exec (default) @ kurento-hello-world --- 
bower       EINVALID Failed to read /home/kurento-tutorial-java/kurento-hello-world/bower.json 

Additional error details: 
Name must be lowercase, can contain digits, dots, dashes, "@" or spaces 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 2.634 s 
[INFO] Finished at: 2016-05-14T18:04:20+02:00 
[INFO] Final Memory: 21M/219M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (default) on project kurento-hello-world: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [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 

を、これは内容:

{ 
    "name": "${project.artifactId}", 
    "version": "${project.version}", 
    "description": "${project.description}", 
    "authors": [ 
    "Kurento <[email protected]>" 
    ], 
    "main": "index.html", 
    "moduleType": [ 
    "globals" 
    ], 
    "license": "LGPL", 
    "homepage": "http://www.kurento.org/", 
    "private": true, 
    "ignore": [ 
    "**/.*", 
    "node_modules", 
    "bower_components", 
    "test", 
    "tests" 
    ], 
    "dependencies": { 
    "bootstrap": "~3.3.0", 
    "ekko-lightbox": "~3.1.4", 
    "adapter.js": "*", 
    "demo-console": "1.5.1" 
    } 
} 

pom.xmlファイル:

<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.4.0</version> 
    </parent> 

    <artifactId>kurento-hello-world</artifactId> 
    <packaging>jar</packaging> 

    <name>Kurento Java Tutorial - Hello World</name> 
    <description>Hello World (WebRTC in loopback)</description> 

    <licenses> 
     <license> 
      <name>GNU Lesser General Public License</name> 
      <url>http://www.gnu.org/licenses/lgpl-2.1.txt</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://[email protected]: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>8081</demo.port> 

     <!-- Main class --> 
     <start-class>org.kurento.tutorial.helloworld.HelloWorldApp</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> 

     <!-- Kurento --> 
     <dependency> 
      <groupId>org.kurento</groupId> 
      <artifactId>kurento-client</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.kurento</groupId> 
      <artifactId>kurento-utils-js</artifactId> 
     </dependency> 
    </dependencies> 

    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.springframework.boot</groupId> 
       <artifactId>spring-boot-maven-plugin</artifactId> 
       <configuration> 
        <mainClass>${start-class}</mainClass> 
        <layout>ZIP</layout> 
       </configuration> 
       <executions> 
        <execution> 
         <goals> 
          <goal>repackage</goal> 
         </goals> 
        </execution> 
       </executions> 
      </plugin> 
      <plugin> 
       <groupId>org.codehaus.mojo</groupId> 
       <artifactId>exec-maven-plugin</artifactId> 
       <executions> 
        <execution> 
         <phase>generate-sources</phase> 
         <goals> 
          <goal>exec</goal> 
         </goals> 
        </execution> 
       </executions> 
       <configuration> 
        <executable>bower</executable> 
        <arguments> 
         <argument>install</argument> 
         <argument>--allow-root</argument> 
        </arguments> 
        <mainClass>${start-class}</mainClass> 
       </configuration> 
      </plugin> 
      <plugin> 
       <artifactId>maven-clean-plugin</artifactId> 
       <configuration> 
        <filesets> 
         <fileset> 
          <directory>src/main/resources/static/bower_components</directory> 
         </fileset> 
        </filesets> 
       </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> 
      <resource> 
       <directory>.</directory> 
       <filtering>true</filtering> 
       <includes> 
        <include>bower.json</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> 

答えて

0

ok解決済み、変数をbower.jsonファイルの値に置き換えてビルドしました。

正しく実行するため、「v0.2.9」との依存関係でadapter.jsの値も変更しました

関連する問題