There might be a misunderstanding here.
I have a java class that would like to access a resource (jar file) that is declared as a dependency in the according maven project.
I think it should be available through the classloader such as:
    classloader.getResourceAsStream
but apparently not. Do you know why?

I don't want my classes to be tightly coupled with any maven API or objects.

--mike
   

dan tran a écrit :
I am well verse with maven1 plugin, but if you have access to maven pom
then pom.getArtifacts() will give entry point to all dependencies

-D


On 4/20/06, Michael Niemaz <[EMAIL PROTECTED]> wrote:
  
is this an m2 plugin? I'm under m1.b2 ...

dan tran a écrit :
    
You can lookup the fullpath of your dependency.

Check out maven-dependency-plugin for sample source.

-Dan


On 4/20/06, Michael Niemaz <[EMAIL PROTECTED]> wrote:

      
Hi all,
   I have a project with a zip dependency. I thought I could access it
from java such as:

classloader.getResourceAsStream("${dep}.zip");

but apparently not.

I tried to rename the zip deps into jar ones and change the java code
accordingly but in vain ;-(
This getResourceAsStream returns null;

Works fine though if I put the zip dep as a build resource i.e: in the
src directory...

Is this possible at all or am I out of the scope?

Regards,

--mike



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



        
      

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


    

  
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to