Thanx ;-)
It becomes a maven question since I'm trying to access a maven
project's dependency...
dan tran a écrit :
sorry, this is purely java question.
Would this help?
http://tns-www.lcs.mit.edu/manuals/java-api-1.1beta2/guide/misc/resources.html
-D
On 4/20/06, Michael Niemaz <[EMAIL PROTECTED]> wrote:
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]> <[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]> <[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]
|
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]