私は最近 Jenkins をセットアップしました。コミットのたびに (Java) 単体テストを実行するようにセットアップされています。それはうまくいきます。ただし、その後、PMD のサポートを追加しようとしました。
正常に実行され、0 個のユニット テスト エラー、210 pmd 警告 (ステータス ページに 0 個の警告で完了したと表示されるため、これは奇妙です)
以下は、consold ログの最後の部分です。
テストの実行: 99、失敗: 0、エラー: 0、スキップ: 0
[JENKINS] Recording test results
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener -
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - --- maven-jar-plugin:2.4:jar (default-jar) @ krunch ---
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-jar-plugin:2.4:jar (default-jar) @ krunch ---
[pool-1-thread-1] INFO org.codehaus.plexus.archiver.jar.JarArchiver - Building jar: /var/lib/jenkins/workspace/krunch/target/krunch-0.0.1-SNAPSHOT.jar
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - >>> maven-pmd-plugin:3.0.1:check (default) @ krunch >>>
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener -
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - --- maven-pmd-plugin:3.0.1:pmd (pmd) @ krunch ---
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-pmd-plugin:3.0.1:pmd (pmd) @ krunch ---
[PMD] Finding all files that match the pattern pmd.xml
[PMD] Parsing 1 files in /var/lib/jenkins/workspace/krunch/target
[PMD] Successfully parsed file /var/lib/jenkins/workspace/krunch/target/pmd.xml of module krunch with 210 warnings.
[CHECKSTYLE] No report found for mojo check
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - <<< maven-pmd-plugin:3.0.1:check (default) @ krunch <<<
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener -
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - --- maven-pmd-plugin:3.0.1:check (default) @ krunch ---
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-pmd-plugin:3.0.1:check (default) @ krunch ---
[CHECKSTYLE] No report found for mojo check
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - ------------------------------------------------------------------------
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - BUILD FAILURE
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - ------------------------------------------------------------------------
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - Total time: 1:58.654s
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - Finished at: Fri Aug 16 14:19:47 UTC 2013
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - Final Memory: 38M/718M
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - ------------------------------------------------------------------------
[JENKINS] Archiving /var/lib/jenkins/workspace/krunch/pom.xml to /var/lib/jenkins/jobs/krunch/modules/krunch$krunch/builds/2013-08-16_14-17-43/archive/krunch/krunch/0.0.1-SNAPSHOT/krunch-0.0.1-SNAPSHOT.pom
[JENKINS] Archiving /var/lib/jenkins/workspace/krunch/target/krunch-0.0.1-SNAPSHOT.jar to /var/lib/jenkins/jobs/krunch/modules/krunch$krunch/builds/2013-08-16_14-17-43/archive/krunch/krunch/0.0.1-SNAPSHOT/krunch-0.0.1-SNAPSHOT.jar
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD FAILURE
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 2:00.924s
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: Fri Aug 16 14:19:49 UTC 2013
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - Final Memory: 38M/717M
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
channel stopped
Finished: FAILURE
これが私の現在のPOMです(混乱して申し訳ありません、私はしばらくそれをハッキングしてきました)
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<executions>
<execution>
<configuration>
<source>1.7</source>
<target>1.6</target>
<compilerId>eclipse</compilerId>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-eclipse</artifactId>
<version>2.1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<goals>
<goal>check</goal>
<goal>cpd-check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>resources</directory>
</resource>
</resources>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<linkXRef>false</linkXRef>
<targetJdk>1.6</targetJdk>
<rulesets>
<ruleset>/rulesets/basic.xml</ruleset>
</rulesets>
</configuration>
</plugin>
</plugins>
</reporting>
*私は少なくとも 200 の Web ページを見てきましたが、動作するドキュメントを見つけることができないようです. 必要な情報が多い/少ない場合はお知らせください。