On Sunday, April 10, 2011, Adam Murdoch <[email protected]> wrote:
>
> On 11/04/2011, at 4:37 AM, Ronen Narkis wrote:
> Ok iv seemed to find the right call:
>
> this.class.classLoader.getResourceAsStream
>
> This is always a better option for locating resources, rather than using 
> getSystemResource(), as it makes fewer assumptions about which ClassLoader 
> your classes and resources will be loaded by.
>
> 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?
>
> If you apply the maven plugin, you get an install task, which you can use to 
> publish to the local maven repository. You can then use mavenLocal() in the 
> repositories section of your other project to resolve the artifacts from 
> there.
> This is something we want to make easier before the Gradle 1.0 release. We 
> want to provide some way to define an aggregate build, made up of the two 
> separate builds, so that you can build them together in one go. Essentially, 
> this would work as a multi-project build, where Gradle would replace an 
> external dependency, say, 'mygroup:myplugin:1.0-snapshot', with the 
> appropriate project dependency.

I'd like to +1 the idea of a build aggregator. Do we have a JIRA for
it I can vote on? I wouldn't mind hacking it up myself, but I have a
feeling this would take much more time for me to understand the deep
gradle code than one of core devs working on gradle :( Of course any
sort of mentoring would also go a long way if someone could point me
in the right direction.

>
>
> 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
>
>
>
>
>
>
> --Adam Murdoch
> Gradle Co-founder
> http://www.gradle.org
> VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
> http://www.gradleware.com
>
>
>
>

-- 
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to