I tried to install the claim plugin from the source code that I
downloaded from here:
https://svn.jenkins-ci.org/trunk/hudson/plugins/claim/
I created a claim directory with the pom.xml and the src/ directory,
then tried to run, "mvn package" and I'm seeing 6 failed self tests.
-------------
Results :
Tests in error:
testHasClaimAction(hudson.plugins.claim.ClaimTest): anonymous is
missing the Create permission
testFirstClaim(hudson.plugins.claim.ClaimTest): second instance
testClaimForYourself(hudson.plugins.claim.ClaimTest): anonymous is
missing the Create permission
testDropClaim(hudson.plugins.claim.ClaimTest): second instance
testStickyBuild(hudson.plugins.claim.ClaimTest): anonymous is
missing the Create permission
testNotStickyBuild(hudson.plugins.claim.ClaimTest): second instance
Tests run: 14, Failures: 0, Errors: 6, Skipped: 0
-------------
I commented out the code in the 6 test functions and still got the
same errors. Then I proceeded to remove the code from setUp() and
found that if I remove everything after and including the line
containing, "project = createFreeStyleProject("x");" the errors go
away and the plugin seems to work fine.
So I guess createFreeStyleProject() is generating the, "anonymous is
missing the Create permission" error.
I also changed:
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.347</version>
to:
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.434</version>
in my pom.xml file to remove this error:
[ERROR] Failed to execute goal org.jvnet.hudson.tools:maven-hpi-plugin:
1.48:apt-compile (default-apt-compile) on project claim: Execution
default-apt-compile of goal org.jvnet.hudson.tools:maven-hpi-plugin:
1.48:apt-compile failed: A required class was missing while executing
org.jvnet.hudson.tools:maven-hpi-plugin:1.48:apt-compile: com/sun/
mirror/apt/AnnotationProcessorFactory
I'm also seeing these errors in my output when running, "mvn package":
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for
further details.