未能找到org.jenkins-ci.plugins:插件:pom:2.11在https://repo.maven.apache.org/maven2

时间:2017-04-29 00:03:33

标签: maven jenkins plugins

我正在尝试编译一个专门用作Jenkins插件的maven项目。运行“mvn package”命令时,我收到下面列出的错误。如何解决问题呢?

TIA

看到这个: https://mvnrepository.com/artifact/org.apache.maven/maven-plugin-api/3.5.0 并取出了将Maven插件定义为“父”的部分,而是将其作为“依赖”

然后我开始收到如下错误:“未知包装:hpi @ line 12,第13栏”

然后我看到以下内容: Jenkins plug-in developing - Maven issue: Unknown packaging: hpi 它说=> “另外,将详细信息添加到.m2 / settings.xml中,如本教程顶部所示,以允许使用短名称”hpi“。”

更改settings.xml后(根据链接)仍然收到“Unknown packaging ...”错误

然后我回到了软件包附带的原始pom.xml文件。

下面列出了pom.xml文件:

POM FILE

这一次,在使用它之后,似乎下载了与Jenkins相关的任何/所有jar文件(花费了一些时间)。 “hpi”错误消失但被新的错误取代

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running InjectedTest
Tests run: 18, Failures: 3, Errors: 12, Skipped: 0, Time elapsed: 60.722 sec <<< FAILURE! - in InjectedTest
edu\utah\med\ped\WaveMakerDeployer\config.jelly(org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyCheck)  Time elapsed: 0.338 sec  <<< FAILURE!
java.lang.AssertionError: <?jelly escape-by-default='true'?> is missing in file:/C:/WORK/Development/JENKINS/WaveMakerJenkinsDeployer/target/classes/edu/utah/med/ped/WaveMakerDeployer/config.jelly
        at org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyCheck.runTest(JellyTestSuiteBuilder.java:108)

edu\utah\med\ped\WaveMakerDeployer\global.jelly(org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyCheck)  Time elapsed: 0.086 sec  <<< FAILURE!
java.lang.AssertionError: <?jelly escape-by-default='true'?> is missing in file:/C:/WORK/Development/JENKINS/WaveMakerJenkinsDeployer/target/classes/edu/utah/med/ped/WaveMakerDeployer/global.jelly
        at org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyCheck.runTest(JellyTestSuiteBuilder.java:108)

index.jelly(org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyCheck)  Time elapsed: 0.019 sec  <<< FAILURE!
java.lang.AssertionError: <?jelly escape-by-default='true'?> is missing in file:/C:/WORK/Development/JENKINS/WaveMakerJenkinsDeployer/target/classes/index.jelly
        at org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyCheck.runTest(JellyTestSuiteBuilder.java:108)

initializationError(org.junit.runner.manipulation.Filter)  Time elapsed: 0 sec  <<< ERROR!
java.lang.Exception: No tests found matching Method index.jelly(org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyCheck) from org.junit.internal.requests.ClassRequest@450f78c9

initializationError(org.junit.runner.manipulation.Filter)  Time elapsed: 0 sec  <<< ERROR!
java.lang.Exception: No tests found matching Method edu\utah\med\ped\WaveMakerDeployer\config.jelly(org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyCheck) from org.junit.internal.requests.ClassRequest@4877102b

initializationError(org.junit.runner.manipulation.Filter)  Time elapsed: 0.001 sec  <<< ERROR!
java.lang.Exception: No tests found matching Method edu\utah\med\ped\WaveMakerDeployer\global.jelly(org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyCheck) from org.junit.internal.requests.ClassRequest@c69c38

initializationError(org.junit.runner.manipulation.Filter)  Time elapsed: 0.001 sec  <<< ERROR!
java.lang.Exception: No runnable methods

initializationError(org.junit.runner.manipulation.Filter)  Time elapsed: 0 sec  <<< ERROR!
java.lang.Exception: No runnable methods

initializationError(org.junit.runner.manipulation.Filter)  Time elapsed: 0 sec  <<< ERROR!
java.lang.Exception: No runnable methods

initializationError(org.junit.runner.manipulation.Filter)  Time elapsed: 0 sec  <<< ERROR!
java.lang.Exception: No runnable methods

initializationError(org.junit.runner.manipulation.Filter)  Time elapsed: 0.001 sec  <<< ERROR!
java.lang.Exception: No runnable methods

initializationError(org.junit.runner.manipulation.Filter)  Time elapsed: 0 sec  <<< ERROR!
java.lang.Exception: No runnable methods

initializationError(org.junit.runner.manipulation.Filter)  Time elapsed: 0 sec  <<< ERROR!
java.lang.Exception: No runnable methods

initializationError(org.junit.runner.manipulation.Filter)  Time elapsed: 0.001 sec  <<< ERROR!
java.lang.Exception: No runnable methods

initializationError(org.junit.runner.manipulation.Filter)  Time elapsed: 0.001 sec  <<< ERROR!
java.lang.Exception: No runnable methods


Results :

Failed tests:
  JellyTestSuiteBuilder$JellyCheck.runTest:108 <?jelly escape-by-default='true'?> is missing in file:/C:/WORK/Development/JENKINS/WaveMakerJenkinsDeployer/target/classes/edu/utah/med/ped/WaveMakerDeployer/config.jelly
  JellyTestSuiteBuilder$JellyCheck.runTest:108 <?jelly escape-by-default='true'?> is missing in file:/C:/WORK/Development/JENKINS/WaveMakerJenkinsDeployer/target/classes/edu/utah/med/ped/WaveMakerDeployer/global.jelly
  JellyTestSuiteBuilder$JellyCheck.runTest:108 <?jelly escape-by-default='true'?> is missing in file:/C:/WORK/Development/JENKINS/WaveMakerJenkinsDeployer/target/classes/index.jelly
Tests in error:
org.junit.runner.manipulation.Filter.initializationError(org.junit.runner.manipulation.Filter)
  Run 1: Filter.initializationError ▒  No tests found matching Method index.jelly(org.j...
  Run 2: Filter.initializationError ▒  No tests found matching Method edu\utah\med\ped\...
  Run 3: Filter.initializationError ▒  No tests found matching Method edu\utah\med\ped\...
  Run 4: Filter.initializationError ▒  No runnable methods
  Run 5: Filter.initializationError ▒  No runnable methods
  Run 6: Filter.initializationError ▒  No runnable methods
  Run 7: Filter.initializationError ▒  No runnable methods
  Run 8: Filter.initializationError ▒  No runnable methods
  Run 9: Filter.initializationError ▒  No runnable methods
  Run 10: Filter.initializationError ▒  No runnable methods
  Run 11: Filter.initializationError ▒  No runnable methods
  Run 12: Filter.initializationError ▒  No runnable methods

问题:哪里可以从这里出发?这些“默认”注射测试有多重要

TIA

1 个答案:

答案 0 :(得分:6)

在开发jenkins插件时,您需要配置maven以从repo.jenkins-ci.org查找库。这是一个示例~/.m2/settings.xml

<settings>
  <pluginGroups>
    <pluginGroup>org.jenkins-ci.tools</pluginGroup>
  </pluginGroups>

  <profiles>
    <!-- Give access to Jenkins plugins -->
    <profile>
      <id>jenkins</id>
      <activation>
        <activeByDefault>true</activeByDefault> <!-- change this to false, if you don't like to have it on per default -->
      </activation>
      <repositories>
        <repository>
          <id>repo.jenkins-ci.org</id>
          <url>https://repo.jenkins-ci.org/public/</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>repo.jenkins-ci.org</id>
          <url>https://repo.jenkins-ci.org/public/</url>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
  <mirrors>
    <mirror>
      <id>repo.jenkins-ci.org</id>
      <url>https://repo.jenkins-ci.org/public/</url>
      <mirrorOf>m.g.o-public</mirrorOf>
    </mirror>
  </mirrors>
</settings>

这是https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial。请注意,如果您使用nexus,则可以在那里找到特定于nexus的备用说明。