Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failure to find org.jenkins-ci.plugins:plugin:pom:2.11 in https://repo.maven.apache.org/maven2

I am trying to compile a maven project that is designed to work as a Jenkins plugin. When running the "mvn package" command, I get the error listed below. What can be done to resolve the problem?

TIA

Saw this: https://mvnrepository.com/artifact/org.apache.maven/maven-plugin-api/3.5.0 and took out the part that had the Maven Plugin defined as a "parent" and instead made it a "dependency"

Then I started getting errors like: "Unknown packaging: hpi @ line 12, column 13"

I then saw the following: Jenkins plug-in developing - Maven issue: Unknown packaging: hpi It said => "Also, add the details to your .m2/settings.xml as shown at the top of this tutorial to allow the use of the short name "hpi"."

After changing settings.xml (according to the link) still kept getting "Unknown packaging..." error

I then went back to the original pom.xml file that came with the package.

The pom.xml file is listed below:

POM FILE

This time, after using it, it seemed as though any/all jar files associated with Jenkins were downloaded (which took some time). The "hpi" error was gone but was replaced with a new one

-------------------------------------------------------
 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

QUESTION: Where can one go from here? How important are these "default" injection tests

TIA

like image 877
Casey Harrils Avatar asked Apr 29 '17 00:04

Casey Harrils


2 Answers

When developing a jenkins plugin, you need to configure maven to find libraries from repo.jenkins-ci.org. Here's a sample ~/.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>

This is from https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial. Note that if you're using nexus there are nexus-specific alternate instructions that you can find over there.

like image 57
burnettk Avatar answered Oct 14 '22 14:10

burnettk


burnettk's answer, except I am using Gradle, so for me it is

repositories {
    maven {
        url('https://repo.jenkins-ci.org/public/')
    }
}

In the Maven configuration, the <pluginRepositories> subtree could be safely left out, I guess.

like image 45
user7610 Avatar answered Oct 14 '22 16:10

user7610