[JIRA] (JENKINS-45041) Shared library pluging - can't use getResource to load a resource?
Title: Message Title Gayan Viranka edited a comment on JENKINS-45041 Re: Shared library pluging - can't use getResource to load a resource? I also get into this problem. In my scenario I don't know if the resource file exists and want to get a null value if not exist. this is exact behavior of this.class.getResource("org/foo/bar.json") which is always returning null when executed with Jenkins pipeline even the file existsWith libraryResource there will be an exception which not what I need . It is possible to catch the exception but it will show as an error in grafana. so I need to avoid exception.is there a way with libraryResource to return null if resource does not exists Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-45041) Shared library pluging - can't use getResource to load a resource?
Title: Message Title Gayan Viranka edited a comment on JENKINS-45041 Re: Shared library pluging - can't use getResource to load a resource? I also get into this problem. In my scenario I don't know if the resource file exists and want to get a null value if not exist. this is exact behavior of this.class.getResource("org/foo/bar.json") which is always return returning null when executed with Jenkins pipeline even the file exists With libraryResource there will be an exception which not what I need . It is possible catch exception but it will show as an error in grafana. so I need to avoid exception.is there a way with libraryResource to return null if resource does not exists Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-45041) Shared library pluging - can't use getResource to load a resource?
Title: Message Title Gayan Viranka edited a comment on JENKINS-45041 Re: Shared library pluging - can't use getResource to load a resource? I also get into this problem. In my scenario I don't know if the resource file exists and want to get a null value if not exist. this is exact behavior of this.class.getResource("org/foo/bar.json")which is always return null when executed with Jenkins pipelineWith libraryResource there will be an exception which not what I need . It is possible catch exception but it will show as an error in grafana. so I need to avoid exception.is there a way with libraryResource to return null if resource does not exists Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-45041) Shared library pluging - can't use getResource to load a resource?
Title: Message Title Gayan Viranka commented on JENKINS-45041 Re: Shared library pluging - can't use getResource to load a resource? I also get into this problem. In my scenario I don't know if the resource file exists and want get a null value if not exist. this is exact behavior of this.class.getResource("org/foo/bar.json") which is always return null when executed with Jenkins pipeline With libraryResource there will be an exception which not what I need . It is possible catch exception but it will show as an error in grafana. so I need to avoid exception. is there a way with libraryResource to return null if resource does not exists Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-45041) Shared library pluging - can't use getResource to load a resource?
Title: Message Title Jesse Glick commented on JENKINS-45041 Re: Shared library pluging - can't use getResource to load a resource? Ilguiz Latypov’s comment is unrelated to the reported issue, but at any rate: perhaps you are selecting distinct names for the “same” library, which is not wise since it would result in both versions of the library being loaded in one build. Please use the users’ list for advice. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-45041) Shared library pluging - can't use getResource to load a resource?
Title: Message Title Ilguiz Latypov commented on JENKINS-45041 Re: Shared library pluging - can't use getResource to load a resource? It's a pity libraryResource() is shy about selecting the currently active implicit library's resource. Instead I get an error, hudson.AbortException: Library resource com/COMPANY/FILE.EXT ambiguous among libraries [VER1, VER2] If the pipeline plugin has a way to select the innermost folder's implicit library, it could apply the same algorithm (or stick to the active version) when resolving the library resource. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.