You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Anshuman Srivastava <an...@gmail.com> on 2006/04/20 14:00:25 UTC
Dependency on other folders in project
---------- Forwarded message ----------
From: Anshuman Srivastava <an...@gmail.com>
Date: Apr 20, 2006 5:18 PM
Subject: Dependency on other folders in project
To: users-digest@maven.apache.org
Hi
I have a project with following structure--
Active---
--0.props
--0.userlibs
--1.lib.framework
--1.lib.junitframework
--1.lib.services
--2.webapp. MembershipModule
--3.ejb. AddressEnterpriseBean
--3.ejb. MembershipModuleBean
--3.ejb. MenuEnterpriseBean
--8.jar.customtags
I have to create MembershipModule.war for webapp folder but it has
dependency on 3.ejb.MembershipModuleBean & 8.jar.customtags.
3.ejb.MembershipModuleBean has dependency on 1.lib.framework &
1.lib.services.
8.jar.customtags has dependency on 1.lib.framework, 1.lib.services & 3.ejb.
MenuEnterpriseBean.
What should I do for creating *MembershipModule.war??*
* *
Please help…
Thanks in Advance
Anshuman
Re: Accessing dependency from java
Posted by Michael Niemaz <mi...@xrce.xerox.com>.
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 <mi...@xrce.xerox.com> 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 <mi...@xrce.xerox.com> <mi...@xrce.xerox.com> 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 <mi...@xrce.xerox.com> <mi...@xrce.xerox.com> 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: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
>
Re: Accessing dependency from java
Posted by dan tran <da...@gmail.com>.
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 <mi...@xrce.xerox.com> 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 <mi...@xrce.xerox.com> <mi...@xrce.xerox.com> 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 <mi...@xrce.xerox.com> <mi...@xrce.xerox.com> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: Accessing dependency from java
Posted by Michael Niemaz <mi...@xrce.xerox.com>.
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 <mi...@xrce.xerox.com> 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 <mi...@xrce.xerox.com> 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: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
>
Re: Accessing dependency from java
Posted by dan tran <da...@gmail.com>.
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 <mi...@xrce.xerox.com> 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 <mi...@xrce.xerox.com> 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: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >>
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: Accessing dependency from java
Posted by Michael Niemaz <mi...@xrce.xerox.com>.
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 <mi...@xrce.xerox.com> 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: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
>
Re: Accessing dependency from java
Posted by dan tran <da...@gmail.com>.
You can lookup the fullpath of your dependency.
Check out maven-dependency-plugin for sample source.
-Dan
On 4/20/06, Michael Niemaz <mi...@xrce.xerox.com> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Accessing dependency from java
Posted by Michael Niemaz <mi...@xrce.xerox.com>.
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
Re: Dependency on other folders in project
Posted by Alexandre Poitras <al...@gmail.com>.
And if you still have questions after that, well don't be afraid to
ask but it should get you started
On 4/20/06, Alexandre Poitras <al...@gmail.com> wrote:
> Do some search about multi-modules project. Unfortunately, the
> documentation is lacking some explanations about it.
>
> On 4/20/06, Anshuman Srivastava <an...@gmail.com> wrote:
> > ---------- Forwarded message ----------
> > From: Anshuman Srivastava <an...@gmail.com>
> > Date: Apr 20, 2006 5:18 PM
> > Subject: Dependency on other folders in project
> > To: users-digest@maven.apache.org
> >
> > Hi
> >
> >
> >
> > I have a project with following structure--
> >
> >
> >
> > Active---
> >
> > --0.props
> >
> > --0.userlibs
> >
> > --1.lib.framework
> >
> > --1.lib.junitframework
> >
> > --1.lib.services
> >
> > --2.webapp. MembershipModule
> >
> > --3.ejb. AddressEnterpriseBean
> >
> > --3.ejb. MembershipModuleBean
> >
> > --3.ejb. MenuEnterpriseBean
> >
> > --8.jar.customtags
> >
> >
> >
> > I have to create MembershipModule.war for webapp folder but it has
> > dependency on 3.ejb.MembershipModuleBean & 8.jar.customtags.
> >
> >
> >
> > 3.ejb.MembershipModuleBean has dependency on 1.lib.framework &
> > 1.lib.services.
> >
> >
> >
> > 8.jar.customtags has dependency on 1.lib.framework, 1.lib.services & 3.ejb.
> > MenuEnterpriseBean.
> >
> >
> >
> > What should I do for creating *MembershipModule.war??*
> >
> > * *
> >
> > Please help…
> >
> >
> >
> > Thanks in Advance
> >
> > Anshuman
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Dependency on other folders in project
Posted by Alexandre Poitras <al...@gmail.com>.
Do some search about multi-modules project. Unfortunately, the
documentation is lacking some explanations about it.
On 4/20/06, Anshuman Srivastava <an...@gmail.com> wrote:
> ---------- Forwarded message ----------
> From: Anshuman Srivastava <an...@gmail.com>
> Date: Apr 20, 2006 5:18 PM
> Subject: Dependency on other folders in project
> To: users-digest@maven.apache.org
>
> Hi
>
>
>
> I have a project with following structure--
>
>
>
> Active---
>
> --0.props
>
> --0.userlibs
>
> --1.lib.framework
>
> --1.lib.junitframework
>
> --1.lib.services
>
> --2.webapp. MembershipModule
>
> --3.ejb. AddressEnterpriseBean
>
> --3.ejb. MembershipModuleBean
>
> --3.ejb. MenuEnterpriseBean
>
> --8.jar.customtags
>
>
>
> I have to create MembershipModule.war for webapp folder but it has
> dependency on 3.ejb.MembershipModuleBean & 8.jar.customtags.
>
>
>
> 3.ejb.MembershipModuleBean has dependency on 1.lib.framework &
> 1.lib.services.
>
>
>
> 8.jar.customtags has dependency on 1.lib.framework, 1.lib.services & 3.ejb.
> MenuEnterpriseBean.
>
>
>
> What should I do for creating *MembershipModule.war??*
>
> * *
>
> Please help…
>
>
>
> Thanks in Advance
>
> Anshuman
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org