You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Thomas Van de Velde <th...@gmail.com> on 2006/01/20 14:34:20 UTC

[M2] Classloader Not Working Correctly

Hi,

I believe the M2 classloader is not working as it should.

I have a JAR dependency with a file stored inside.  I cannot load this file
as a resource even if the project has a dependency on this JAR.  This works
in Eclipse though.


Thomas

Re: [M2] Classloader Not Working Correctly

Posted by Brett Porter <br...@apache.org>.
And the other project is a dependency of the current project, and you
use OtherProjectsClass.class.getResource() ?

I'm pretty sure this works. Perhaps you could provide us with an
integration test that demonstrates the problem?

- Brett

Thomas Van de Velde wrote:
> A unit test in a project tries to load a resource from another project.
> 
> Thomas
> 
> On 1/20/06, Brett Porter <br...@apache.org> wrote:
>> Inside a plugin or a test?
>>
>> Thomas Van de Velde wrote:
>>> Hi,
>>>
>>> I believe the M2 classloader is not working as it should.
>>>
>>> I have a JAR dependency with a file stored inside.  I cannot load this
>> file
>>> as a resource even if the project has a dependency on this JAR.  This
>> works
>>> in Eclipse though.
>>>
>>>
>>> Thomas
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [M2] Classloader Not Working Correctly

Posted by Thomas Van de Velde <th...@gmail.com>.
A unit test in a project tries to load a resource from another project.

Thomas

On 1/20/06, Brett Porter <br...@apache.org> wrote:
>
> Inside a plugin or a test?
>
> Thomas Van de Velde wrote:
> > Hi,
> >
> > I believe the M2 classloader is not working as it should.
> >
> > I have a JAR dependency with a file stored inside.  I cannot load this
> file
> > as a resource even if the project has a dependency on this JAR.  This
> works
> > in Eclipse though.
> >
> >
> > Thomas
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: [M2] Classloader Not Working Correctly

Posted by Brett Porter <br...@apache.org>.
Inside a plugin or a test?

Thomas Van de Velde wrote:
> Hi,
> 
> I believe the M2 classloader is not working as it should.
> 
> I have a JAR dependency with a file stored inside.  I cannot load this file
> as a resource even if the project has a dependency on this JAR.  This works
> in Eclipse though.
> 
> 
> Thomas
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org