2012-02-25 8 views
0

私のPHPプロジェクトでパッケージコマンドを実行しようとしていますが、確実なレポートに関するエラーが発生しています。 ログに表示されているように、phpunitテストの出力に関連しています... 原因:org.apache.maven.plugin.MojoExecutionException: -no output- inファイル:C:\ Users \ Develop \ adc \のsrc \テスト\ phpの\ orgの\ ADC \ここPHPプロジェクトで確信を持ってMavenパッケージの問題

誰が??間違っている可能性がどのような任意のアイデアを持っています。..

私はコマンドログ "-e MVNパッケージ" 穴を添付apptest.php:

C:\Users\Develop\adc>mvn package -e 
[INFO] Error stacktraces are turned on. 
[INFO] Scanning for projects... 
[INFO] 
[INFO] ------------------------------------------------------------------------ 
[INFO] Building Sample PHP 5 web project 1.0-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] --- maven-php-plugin:2.0-SNAPSHOT:set-sources (default-set-sources-1) @ adc --- 
[INFO] 
[INFO] --- maven-plugin-plugin:2.9:descriptor (default-descriptor) @ adc --- 
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ adc --- 
[debug] execute contextualize 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] skip non existing resourceDirectory C:\Users\Develop\adc\src\main\resources 
[INFO] 
[INFO] --- maven-php-plugin:2.0-SNAPSHOT:resources (default-resources) @ adc --- 
[INFO] Unpacking dependencies 
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ adc --- 
[debug] execute contextualize 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] skip non existing resourceDirectory C:\Users\Develop\adc\src\test\resources 
[INFO] 
[INFO] --- maven-php-plugin:2.0-SNAPSHOT:testResources (default-testResources) @ adc --- 
[INFO] Unpacking dependencies 
[INFO] 
[INFO] --- maven-php-plugin:2.0-SNAPSHOT:test (default-test) @ adc --- 
[INFO] 
------------------------------------------------------- 
T E S T S 
------------------------------------------------------- 

[INFO] Surefire report directory: C:\Users\Develop\adc\target\surefire-reports 
[ERROR] Testcase: apptest.php fails. 
[ERROR] See log: C:\Users\Develop\adc\target\surefire-reports\apptest.txt 
[ERROR] Testcase: apptest.php fails. 
[ERROR] See log: C:\Users\Develop\adc\target\surefire-reports\apptest.txt 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 24.101s 
[INFO] Finished at: Sat Feb 25 20:16:05 ART 2012 
[INFO] Final Memory: 7M/245M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.phpmaven:maven-php-plugin:2.0-SNAPSHOT:test (default-test) on project a-don 
de-comemos: 
[ERROR] -no output- 
[ERROR] in file: C:\Users\Develop\adc\src\test\php\org\adc\apptest.php 
[ERROR] -> [Help 1] 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.phpmaven:maven-php-plugin:2 
.0-SNAPSHOT:test (default-test) on project adc: 
-no output- 
in file: C:\Users\Develop\adc\src\test\php\org\adc\apptest.php 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) 
     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java 
:84) 
     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java 
:59) 
     at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) 

     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) 
     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) 
     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) 
     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) 
     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) 
     at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
     at java.lang.reflect.Method.invoke(Method.java:597) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) 
Caused by: org.apache.maven.plugin.MojoExecutionException: 
-no output- 
in file: C:\Users\Develop\adc\src\test\php\org\adc\apptest.php 
     at org.phpmaven.plugin.build.PhpTest.executeTest(PhpTest.java:443) 
     at org.phpmaven.plugin.build.PhpTest.doTesting(PhpTest.java:313) 
     at org.phpmaven.plugin.build.PhpTest.execute(PhpTest.java:271) 
     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) 
     ... 19 more 
Caused by: org.phpmaven.plugin.php.PhpErrorException: 
-no output- 
in file: C:\Users\Develop\adc\src\test\php\org\adc\apptest.php 
     at org.phpmaven.plugin.build.PhpTest.executeTest(PhpTest.java:438) 
     ... 23 more 
[ERROR] 
[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です:

<?xml version="1.0" encoding="UTF-8"?> 
<project> 
    <modelVersion>4.0.0</modelVersion> 
    <groupId>org.adc</groupId> 
    <artifactId>adc</artifactId> 
    <packaging>php</packaging> 
    <name>Sample PHP 5 web project</name> 
    <version>1.0-SNAPSHOT</version> 

    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.phpmaven</groupId> 
       <artifactId>maven-php-plugin</artifactId> 
       <version>2.0-SNAPSHOT</version> 
       <extensions>true</extensions> 
      </plugin> 

      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-site-plugin</artifactId> 
       <version>3.0</version> 
       <inherited>true</inherited> 
       <configuration> 
        <reportPlugins> 
         <plugin> 
          <groupId>org.phpmaven</groupId> 
          <artifactId>maven-php-plugin</artifactId> 
          <reportSets> 
           <reportSet> 
            <reports> 
             <report>phpdocumentor</report> 
            </reports> 
           </reportSet> 
          </reportSets> 
         </plugin> 
         <plugin> 
          <groupId>org.apache.maven.plugins</groupId> 
          <artifactId>maven-surefire-report-plugin</artifactId> 
          <version>2.10</version> 
          <reportSets> 
           <reportSet> 
            <reports> 
             <report>report-only</report> 
            </reports> 
           </reportSet> 
          </reportSets> 
         </plugin> 
        </reportPlugins> 
       </configuration> 
      </plugin> 

     </plugins> 
    </build> 
    <dependencies> 
     <dependency> 
      <groupId>org.phpunit</groupId> 
      <artifactId>phpunit5</artifactId> 
      <version>3.3.9</version> 
      <scope>test</scope> 
     </dependency> 
    </dependencies> 

    <properties> 
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
    </properties> 
</project> 

答えて

0

現在、一部のバージョンではまだバグや虚偽の報告があります。基になるエラーを表示するには、次のコマンド "mvn -DflushPHPOutput = true test"を使用します。たぶんテストケースPHP自体に何か間違っていることがあります。

phpunitのバージョンによっては、アーキタイプが正常ではありません。しかし、PHPの出力を見て助ける必要があります。

+0

これで修正されました。あなたはスナップショットを使用しているので、これは動作します(phpunitのバグ修正は過去2週間で完了しました)。 –

関連する問題