Hi,
I want to propose a bit clean plugin directory structure:
xxx-plugin
`------ lib
`------ conf
`------ src
`------ web (only for web plugin)
`------ plugin.xml
`------ build.xml
Take urlfilter-regex plugin as example, the configuration file
"regex-urlfilter.txt" should be put in conf/ dir. Does this make
sense?
On 1/16/07, Andrzej Bialecki <[EMAIL PROTECTED]> wrote:
> Scott Green wrote:
> > Can someone give a answer? I dont think it is good idea we put all
> > configuration/resources under "conf" dir.
> >
> > On 1/15/07, Scott Green <[EMAIL PROTECTED]> wrote:
> >> Hi,
> >>
> >> I need to load some resources from mine plugin's sub-directory. Any
> >> avaiable method to get the specified plugin's root directory now?
> >> thanks
>
> You need to make sure that this resource is packaged into the plugin jar
> (just see how it's done in other plugins). Then you should be able to
> access it through the ClassLoader that loaded this plugin, e.g.
>
> package a.b.c;
>
> public class MyPlugin {
> ...
> InputStream is = MyPlugin.class.getResourceAsStream("myResource.txt");
> ...
> }
>
> --
> Best regards,
> Andrzej Bialecki <><
> ___. ___ ___ ___ _ _ __________________________________
> [__ || __|__/|__||\/| Information Retrieval, Semantic Web
> ___|||__|| \| || | Embedded Unix, System Integration
> http://www.sigram.com Contact: info at sigram dot com
>
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nutch-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-developers