Hello,

I want to move the specific rule configuration from global.jelly to a 
another file (config.jelly) in the corresponding rule package.
I created the file 
/resources/hudson/plugins/cigame/rules/unittesting/UnitTestingParameters/config.jelly
 
and also the java class 
 /java/hudson/plugins/cigame/rules/unittesting/UnitTestingParameters.java

The content of java file:
@Extension
public class UnitTestingParameters implements 
Describable<UnitTestingParameters> {
    private int passedTestIncreasingPoints;
//...

    public UnitTestingParameters() {
        passedTestIncreasingPoints = 15;
//...
    }

    @DataBoundConstructor
    public UnitTestingParameters(int passedTestIncreasingPoints, ...) {
        this.passedTestIncreasingPoints = passedTestIncreasingPoints;
//...
    }

    public int getPassedTestIncreasingPoints() {
        return passedTestIncreasingPoints;
    }

    public void setPassedTestIncreasingPoints(int 
passedTestIncreasingPoints) {
        this.passedTestIncreasingPoints = passedTestIncreasingPoints;
    }

//...

    public Descriptor<UnitTestingParameters> getDescriptor() {
        return new DescriptorImpl();
    }

    public class DescriptorImpl extends Descriptor<UnitTestingParameters> {
        @Override
        public String getDisplayName() {
            return "";
        }

        public UnitTestingRuleSet getRuleSet() {
            UnitTestingRuleSet ruleSet = new UnitTestingRuleSet();
            ruleSet.add(new 
IncreasingPassedTestsRule(passedTestIncreasingPoints));
//...
            return ruleSet;
        }
    }
}


But it seems that Jenkins can't make the mapping between config.jelly and 
the class UnitTestingParameters and give the error:
java.lang.reflect.InvocationTargetException
...
at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
Caused by: java.lang.AssertionError: class hudson.util.CopyOnWriteList is 
not an array/collection type in public hudson.util.CopyOnWriteList 
hudson.plugins.warnings.WarningsDescriptor.getParsers(). See 
https://wiki.jenkins-ci.org/display/JENKINS/My+class+is+missing+descriptor
at 
hudson.model.Descriptor$PropertyType.getItemTypeDescriptorOrDie(Descriptor.java:198)
... 168 more

How to fix this?

Thanks,
Octavian

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to