Ok iv seemed to find the right call: this.class.classLoader.getResourceAsStream
Works as expected On a side note, what is the correct way of verifying the plugin after incremental changes (Im writing tests but somtimes id like to run them on a live project to track issue like classloading). Is there a mavem install like functionality im missing? right now im uploading the plugin to artifactory and clearing the local cache each time to see the latest changes, I guess that I could right a plugin that deploys the jar to the gradle cache folder, is that the correct approach? Thanks Ronen On Sun, Apr 10, 2011 at 8:18 PM, M A <[email protected]>wrote: > Are you providing us with the correct code snippet? Your plugin source > won't be available to your users. > On Apr 10, 2011 8:51 AM, "Ronen Narkis" <[email protected]> wrote: > > Hey, > > > > Im writing a custom plugin that has file resources under: > > > > src/main/resource/com/some/path/file.text > > > > During tests I can load the file by using: > > > > > > def apply() { > > URL url = > > ClassLoader.getSystemResource('com/kenshoo/liquibase/LiquibaseApi.java') > > } > > > > However when applying the plugin in an actual project im getting null > value > > > > Any idea on how to solve this? > > > > Thanks > > Ronen >
