Hi, I do belong to same organisation as Kirill and responsible for one of the two mentioned plugins. We did locate one fault where we used the Jenkins XmlFile class to save on file. When adding a XStream with a proper ClassLoader defined we solved this part:
*final XStream xs = new XStream();xs.setClassLoader(this.getClass().getClassloader());final XmlFile xFile = new XmlFile(xs, file);* But we also have problems with the Jenkins saved job configurations files (config.xml). For instance we have a trigger implemented in plugin A which have a variable that is defined in the library that we share with the plugin B (different versions of the lib). From config.xml file: *<triggers> <com.xxx.yyy.triggering.MessageTrigger plugin="[email protected]"> <consumers> <com.xxx.yyy.triggering.consumer.JobFinishedEventConsumer> <jobInstanceName>Trigger</jobInstanceName> <results> <com.xxx.yyy.datawrappers.ResultCode plugin="[email protected]"> <name>SUCCESS</name> </com.xxx.yyy.datawrappers.ResultCode> </results> </com.xxx.yyy.triggering.consumer.JobFinishedEventConsumer> </consumers> </com.xxx.yyy.triggering.MessageTrigger></triggers>* When we do startup and act upon the* onLoaded()* we do something like this (simplified): f *or (AbstractProject<?, ?> project : jenkins.getAllItems(AbstractProject.class)) { for (Trigger<?> t : project.getTriggers().values()) { ..... JobFinishedEventConsumer consumer = ((MessageTrigger)t).getConsumers().get(0);* If we then try to retreive the consumer value for ResultCode we get a class cast exception if we have both plugins installed. I have not been able to figure out how/where I should set the correct class loader for this. This is similar to the XmlFile problem we located but here we can not set the XStream class loader... or can we? -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/e5d2fbd5-4119-4623-aa2a-2883b098c061%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
