部署Jenkins Sectioned View Plugin扩展

时间:2013-10-23 14:58:54

标签: jenkins jenkins-plugins

我想为Jenkins的Sectioned View插件创建新视图。我该如何部署我的扩展程序?我试图将它作为.jpi文件中的新插件进行部署,但它无法正常工作。我应该把我的class / jar / jpi(我不知道哪个是对的)文件放在哪里?

UPD:我试图把jar放到\ jenkins \ plugin \ sectioned-view \ WEB-INF \ lib目录下它可以工作,但我怀疑这是部署该扩展的正确方法

UPD2:当我尝试将扩展部署为新插件时,我在启动时遇到这些异常:

WARNING: Failed to load <packageName>.<mainExtensionClassName>$DescriptorImpl
java.lang.InstantiationException:<jenkinsDirectory>\plugins\installedapplicationssection\WEB-INF\lib\classes.jar might need to be rebuilt: java.lang.ClassNotFoundException: <packageName>.<mainExtensionClassName>$DescriptorImpl
at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:628)
at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:617)
at hudson.ExtensionFinder._find(ExtensionFinder.java:151)
at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:316)
at hudson.ExtensionList.load(ExtensionList.java:295)
at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248)
at hudson.ExtensionList.iterator(ExtensionList.java:138)
at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:309)
at hudson.ExtensionList.load(ExtensionList.java:295)
at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248)
at hudson.ExtensionList.get(ExtensionList.java:153)
at hudson.PluginManager$PluginUpdateMonitor.getInstance(PluginManager.java:1109)
at hudson.maven.PluginImpl.init(PluginImpl.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at hudson.init.InitializerFinder.invoke(InitializerFinder.java:120)
at hudson.init.InitializerFinder$TaskImpl.run(InitializerFinder.java:184)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:906)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: <packageName>.<mainExtensionClassName>$DescriptorImpl
at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:985)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at net.java.sezpoz.IndexItem.element(IndexItem.java:134)

但是我的课上已经有了这个:     @延期     public static final class DescriptorImpl扩展了SectionedViewSectionDescriptor {

    @Override
    public String getDisplayName() {
        return "My Section";
    }
}

0 个答案:

没有答案