1

尝试将 Maven 插件与 JBehave 一起使用时,我收到一个构建错误,提示 Plugin org.kohsuke:access-modifier-checker:1.4 或其依赖项之一无法解决:Failure to find org.jenkins-ci:annotation http://repo1.maven.org/maven2中的-indexer:jar:1.4被缓存在本地存储库中

这是终端中发生的一切减去生成的一些报告:

dhcp-10-126-9-165:jbehave-3.8 DeeWu$ mvn clean install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] JBehave
[INFO] JBehave Core
[INFO] JBehave Ant
[INFO] JBehave Maven Plugin
[INFO] JBehave Hudson Plugin
[INFO] JBehave Jenkins Plugin
[INFO] JBehave Navigator
[INFO] JBehave Gherkin
[INFO] JBehave ODF
[INFO] JBehave Google
[INFO] JBehave Groovy
[INFO] JBehave Scala
[INFO] JBehave Guice
[INFO] JBehave PicoContainer
[INFO] JBehave Spring
[INFO] JBehave Weld
[INFO] JBehave Archetypes
[INFO] JBehave Simple Archetype
[INFO] JBehave Groovy Archetype
[INFO] JBehave Guice Archetype
[INFO] JBehave Pico Archetype
[INFO] JBehave Spring Archetype
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JBehave 3.8
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ jbehave ---
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ jbehave ---
[INFO] Installing /Users/DeeWu/src/jbehave-3.8/pom.xml to             /Users/DeeWu/.m2/repository/org/jbehave/jbehave/3.8/jbehave-3.8.pom
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JBehave Core 3.8
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ jbehave-core ---
[INFO] Deleting /Users/DeeWu/src/jbehave-3.8/jbehave-core/target
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ jbehave-core ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 20 resources
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ jbehave-core ---
[INFO] Compiling 185 source files to /Users/DeeWu/src/jbehave-3.8/jbehave-    core/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ jbehave-core     ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 7 resources
[INFO] Copying 15 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ jbehave-core --    -
[INFO] Compiling 78 source files to /Users/DeeWu/src/jbehave-3.8/jbehave-core/target/test-    classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.8.1:test (default-test) @ jbehave-core ---
[INFO] Surefire report directory: /Users/DeeWu/src/jbehave-3.8/jbehave-    core/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.jbehave.core.ConfigurableEmbedderBehaviour
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.875 sec
Running org.jbehave.core.configuration.AnnotationBuilderBehaviour
Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.423 sec
Running org.jbehave.core.configuration.AnnotationFinderBehaviour
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.062 sec
Running org.jbehave.core.configuration.KeywordsBehaviour
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec
Running org.jbehave.core.configuration.ParanamerConfigurationBehaviour
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.027 sec
Running org.jbehave.core.configuration.PropertyBasedConfigurationBehaviour
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
Running org.jbehave.core.configuration.UnmodifiableConfigurationBehaviour
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.088 sec
Running org.jbehave.core.embedder.ConcurrencyBehaviour
Using controls         EmbedderControls[batch=false,skip=false,generateViewAfterStories=true,ignoreFailureInStories=f    alse,ignoreFailureInView=false,verboseFailures=false,verboseFiltering=false,storyTimeoutInSecs    =1,threads=1]
Running embeddable org.jbehave.core.embedder.ConcurrencyBehaviour$ThreadsStories
Processing system properties {}
Using controls     EmbedderControls[batch=false,skip=false,generateViewAfterStories=true,ignoreFailureInStories=f    alse,ignoreFailureInView=false,verboseFailures=false,verboseFiltering=false,storyTimeoutInSecs    =1,threads=1]

(BeforeStories)

Running story org/jbehave/core/embedder/a_long.story

(org/jbehave/core/embedder/a_long.story)
Scenario: 
Mauro starts counting to 3
Mauro says 0 Mississippi (0 millis)
Mauro says 1 Mississippi (1001 millis)
Story org/jbehave/core/embedder/a_long.story duration of 2 seconds has exceeded timeout of         1 seconds
When Mauro counts to 3 Mississippi (FAILED)
(java.lang.InterruptedException: sleep interrupted)
STORY CANCELLED (DURATION 2 s)

Running story test+dir/dummy.story

(test+dir/dummy.story)
Scenario: 



(AfterStories)




[INFO] 
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ jbehave-core ---
[INFO] Building jar: /Users/DeeWu/src/jbehave-3.8/jbehave-core/target/jbehave-core-3.8.jar
[INFO] 
[INFO] --- maven-antrun-plugin:1.7:run (package-resources) @ jbehave-core ---
[WARNING] Parameter tasks is deprecated, use target instead

[INFO] Executing tasks

main:
  [zip] Building zip: /Users/DeeWu/src/jbehave-3.8/jbehave-core/target/jbehave-core-            resources.zip
[INFO] Executed tasks
[INFO] 
[INFO] --- build-helper-maven-plugin:1.5:attach-artifact (attach-artifacts) @ jbehave-core     ---
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ jbehave-core ---
[INFO] Installing /Users/DeeWu/src/jbehave-3.8/jbehave-core/target/jbehave-core-3.8.jar to     /Users/DeeWu/.m2/repository/org/jbehave/jbehave-core/3.8/jbehave-core-3.8.jar
[INFO] Installing /Users/DeeWu/src/jbehave-3.8/jbehave-core/pom.xml to     /Users/DeeWu/.m2/repository/org/jbehave/jbehave-core/3.8/jbehave-core-3.8.pom
[INFO] Installing /Users/DeeWu/src/jbehave-3.8/jbehave-core/target/jbehave-core-    resources.zip to /Users/DeeWu/.m2/repository/org/jbehave/jbehave-core/3.8/jbehave-core-3.8-    resources.zip
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JBehave Ant 3.8
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ jbehave-ant ---
[INFO] Deleting /Users/DeeWu/src/jbehave-3.8/jbehave-ant/target
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ jbehave-ant ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/DeeWu/src/jbehave-3.8/jbehave-    ant/src/main/resources
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ jbehave-ant ---
[INFO] Compiling 9 source files to /Users/DeeWu/src/jbehave-3.8/jbehave-ant/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ jbehave-ant     ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/DeeWu/src/jbehave-3.8/jbehave-    ant/src/test/resources
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ jbehave-ant ---
[INFO] Compiling 3 source files to /Users/DeeWu/src/jbehave-3.8/jbehave-ant/target/test-    classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.8.1:test (default-test) @ jbehave-ant ---
[INFO] Surefire report directory: /Users/DeeWu/src/jbehave-3.8/jbehave-    ant/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.jbehave.ant.EmbedderTaskBehaviour
Using executor service Mock for ExecutorService, hashCode: 1234403385
Mapping stories as embeddables using embedder Mock for Embedder, hashCode: 1464447632
Found class names : []
Mapping stories as paths using embedder Mock for Embedder, hashCode: 1750442808
Found story paths: [org/jbehave/ant/stories/first.story,     org/jbehave/ant/stories/second.story]
Generating stories view using embedder Mock for Embedder, hashCode: 142077827
Reporting stepdocs using embedder Mock for Embedder, hashCode: 848649429
Running stories as Embeddables using embedder Mock for Embedder, hashCode: 1717173025
Found class names : [org.jbehave.ant.stories.Embeddable1,     org.jbehave.ant.stories.Embeddable2]
Running stories as paths using embedder Mock for Embedder, hashCode: 1477356634
Found story paths: [org/jbehave/ant/stories/first.story,     org/jbehave/ant/stories/second.story]
Running stories with annotated embedder runner
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.255 sec
Found class names : [org.jbehave.ant.stories.Embeddable1,     org.jbehave.ant.stories.Embeddable2]

Results :

Tests run: 16, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ jbehave-ant ---
[INFO] Building jar: /Users/DeeWu/src/jbehave-3.8/jbehave-ant/target/jbehave-ant-3.8.jar
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ jbehave-ant ---
[INFO] Installing /Users/DeeWu/src/jbehave-3.8/jbehave-ant/target/jbehave-ant-3.8.jar to     /Users/DeeWu/.m2/repository/org/jbehave/jbehave-ant/3.8/jbehave-ant-3.8.jar
[INFO] Installing /Users/DeeWu/src/jbehave-3.8/jbehave-ant/pom.xml to     /Users/DeeWu/.m2/repository/org/jbehave/jbehave-ant/3.8/jbehave-ant-3.8.pom
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JBehave Maven Plugin 3.8
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ jbehave-maven-plugin ---
[INFO] Deleting /Users/DeeWu/src/jbehave-3.8/jbehave-maven-plugin/target
[INFO] 
[INFO] --- maven-plugin-plugin:2.7:descriptor (default-descriptor) @ jbehave-maven-    plugin ---
[INFO] Using 'UTF-8' encoding to read mojo metadata.
[INFO] Applying mojo extractor for language: java
[INFO] Mojo extractor for language: java found 10 mojo descriptors.
[INFO] Applying mojo extractor for language: bsh
[INFO] Mojo extractor for language: bsh found 0 mojo descriptors.
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ jbehave-maven-    plugin ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/DeeWu/src/jbehave-3.8/jbehave-maven-    plugin/src/main/resources
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ jbehave-maven-plugin     ---
[INFO] Compiling 11 source files to /Users/DeeWu/src/jbehave-3.8/jbehave-maven-    plugin/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ jbehave-    maven-plugin ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/DeeWu/src/jbehave-3.8/jbehave-maven-    plugin/src/test/resources
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ jbehave-    maven-plugin ---
[INFO] Compiling 3 source files to /Users/DeeWu/src/jbehave-3.8/jbehave-maven-    plugin/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.8.1:test (default-test) @ jbehave-maven-plugin ---
[INFO] Surefire report directory: /Users/DeeWu/src/jbehave-3.8/jbehave-maven-    plugin/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.jbehave.mojo.EmbedderMojoBehaviour
Using executor service Mock for ExecutorService, hashCode: 257798932
[info] Mapping stories as embeddables using embedder Mock for Embedder, hashCode:     971277631
[debug] Searching for class names including [**/*StoryMaps.java] and excluding []
[info] Found class names: []
[info] Mapping stories as embeddables using embedder Mock for Embedder, hashCode:     142077827
[debug] Searching for class names including [**/*StoryMaps.java] and excluding []
[info] Found class names: []
[info] Mapping stories as paths using embedder Mock for Embedder, hashCode: 1717173025
[debug] Searching for story paths including [**/stories/*.story] and excluding []
[info] Found story paths: [org/jbehave/mojo/stories/first.story,     org/jbehave/mojo/stories/second.story]
[info] Mapping stories as paths using embedder Mock for Embedder, hashCode: 1477356634
[debug] Searching for story paths including [**/stories/*.story] and excluding []
[info] Found story paths: [org/jbehave/mojo/stories/first.story,     org/jbehave/mojo/stories/second.story]
[info] Generating stories view using embedder Mock for Embedder, hashCode: 176271867
[info] Reporting stepdocs using embedder Mock for Embedder, hashCode: 1067398966
[info] Reporting stepdocs using embedder Mock for Embedder, hashCode: 115841081
[info] Running stories as embeddables using embedder Mock for Embedder, hashCode:     713879274
[debug] Searching for class names including [**/stories/*.java] and excluding []
[info] Found class names: [org.jbehave.mojo.stories.Embeddable1,     org.jbehave.mojo.stories.Embeddable2]
[info] Running stories as embeddables using embedder Mock for Embedder, hashCode:     424162811
[debug] Searching for class names including [**/stories/*.java] and excluding []
[info] Found class names: [org.jbehave.mojo.stories.Embeddable1,     org.jbehave.mojo.stories.Embeddable2]
[info] Running stories as paths using embedder Mock for Embedder, hashCode: 1006753184
[debug] Searching for story paths including [**/stories/*.story] and excluding []
[info] Found story paths: [org/jbehave/mojo/stories/first.story,     org/jbehave/mojo/stories/second.story]
[info] Running stories as paths using embedder Mock for Embedder, hashCode: 2077036671
[debug] Searching for story paths including [**/stories/*.story] and excluding []
[info] Found story paths: [org/jbehave/mojo/stories/first.story,     org/jbehave/mojo/stories/second.story]
[info] Running stories with annotated embedder runner
[debug] Searching for class names including [**/stories/*.java] and excluding []
[info] Found class names: [org.jbehave.mojo.stories.Embeddable1,     org.jbehave.mojo.stories.Embeddable2]
[info] Running stories with annotated embedder runner
[debug] Searching for class names including [**/stories/*.java] and excluding []
[info] Found class names: [org.jbehave.mojo.stories.Embeddable1,     org.jbehave.mojo.stories.Embeddable2]
[info] Unpacked site to target/jbehave/view
[info] Unpacked core to target/jbehave/view
[info] Unpacked site to /var/folders/qp/l1knq1p930x0mb2f8wq1_4b00000gn/T/jbehave/view
[info] Unpacked core to /var/folders/qp/l1knq1p930x0mb2f8wq1_4b00000gn/T/jbehave/view
[debug] Artifact property artifactId not allowed by values [jbehave-site-resources,     jbehave-core]
Tests run: 28, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.015 sec

Results :

Tests run: 28, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ jbehave-maven-plugin ---
[INFO] Building jar: /Users/DeeWu/src/jbehave-3.8/jbehave-maven-plugin/target/jbehave-    maven-plugin-3.8.jar
[INFO] 
[INFO] --- maven-plugin-plugin:2.7:addPluginArtifactMetadata (default-    addPluginArtifactMetadata) @ jbehave-maven-plugin ---
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ jbehave-maven-plugin -    --
[INFO] Installing /Users/DeeWu/src/jbehave-3.8/jbehave-maven-plugin/target/jbehave-    maven-plugin-3.8.jar to /Users/DeeWu/.m2/repository/org/jbehave/jbehave-maven-    plugin/3.8/jbehave-maven-plugin-3.8.jar
[INFO] Installing /Users/DeeWu/src/jbehave-3.8/jbehave-maven-plugin/pom.xml to     /Users/DeeWu/.m2/repository/org/jbehave/jbehave-maven-plugin/3.8/jbehave-maven-plugin-    3.8.pom
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JBehave Hudson Plugin 3.8
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ jbehave-hudson-plugin ---
[INFO] Deleting /Users/DeeWu/src/jbehave-3.8/jbehave-hudson-plugin/target
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ jbehave-hudson-    plugin ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ jbehave-hudson-plugin     ---
[INFO] Compiling 4 source files to /Users/DeeWu/src/jbehave-3.8/jbehave-hudson-    plugin/target/classes
[INFO] 
[INFO] --- access-modifier-checker:1.4:enforce (default-enforce) @ jbehave-hudson-plugin     ---
[WARNING] The POM for org.jenkins-ci:annotation-indexer:jar:1.4 is missing, no     dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] JBehave ........................................... SUCCESS [1.930s]
[INFO] JBehave Core ...................................... SUCCESS [2:05.653s]
[INFO] JBehave Ant ....................................... SUCCESS [6.222s]
[INFO] JBehave Maven Plugin .............................. SUCCESS [20.093s]
[INFO] JBehave Hudson Plugin ............................. FAILURE [23.540s]
[INFO] JBehave Jenkins Plugin ............................ SKIPPED
[INFO] JBehave Navigator ................................. SKIPPED
[INFO] JBehave Gherkin ................................... SKIPPED
[INFO] JBehave ODF ....................................... SKIPPED
[INFO] JBehave Google .................................... SKIPPED
[INFO] JBehave Groovy .................................... SKIPPED
[INFO] JBehave Scala ..................................... SKIPPED
[INFO] JBehave Guice ..................................... SKIPPED
[INFO] JBehave PicoContainer ............................. SKIPPED
[INFO] JBehave Spring .................................... SKIPPED
[INFO] JBehave Weld ...................................... SKIPPED
[INFO] JBehave Archetypes ................................ SKIPPED
[INFO] JBehave Simple Archetype .......................... SKIPPED
[INFO] JBehave Groovy Archetype .......................... SKIPPED
[INFO] JBehave Guice Archetype ........................... SKIPPED
[INFO] JBehave Pico Archetype ............................ SKIPPED
[INFO] JBehave Spring Archetype .......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3:20.245s
[INFO] Finished at: Tue Jun 11 08:55:35 CDT 2013
[INFO] Final Memory: 27M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.kohsuke:access-modifier-checker:1.4:enforce (default-    enforce) on project jbehave-hudson-plugin: Execution default-enforce of goal     org.kohsuke:access-modifier-checker:1.4:enforce failed: Plugin org.kohsuke:access-modifier-    checker:1.4 or one of its dependencies could not be resolved: Failure to find org.jenkins-    ci:annotation-indexer:jar:1.4 in http://repo1.maven.org/maven2 was cached in the local     repository, resolution will not be reattempted until the update interval of central has     elapsed or updates are forced -> [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/PluginResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :jbehave-hudson-plugin 

解决此错误的任何帮助都会很棒!

4

2 回答 2

1

事实证明,而不是打字

    mvn clean install

进入终端,我需要做的就是输入

    mvn install -s settings.xml
于 2013-06-12T15:26:04.253 回答
0

我遇到了完全相同的问题,调试花了几个小时。想知道为什么这根本没有记录。

看起来 Hudson 项目已移至 eclipse.org,因此在插件 pom.xml 中,我们需要更改父声明,如下所示

<parent>
<groupId>org.eclipse.hudson.plugins</groupId>
<artifactId>hudson-plugin-parent</artifactId>
<version>3.0.0</version>
</parent>

顺便说一句,如果您首先为 Jenkins 构建项目,然后为 Hudson 构建项目,那么您将不会遇到此问题。仅当您在不存在 Jenkins 依赖 jar 的情况下重新构建 Hudson 插件时才会发生这种情况。

于 2014-04-23T01:07:03.960 回答